HomeiOS Developmentandroid - Listview.builder -> Top of Container is stretching in Flutter, even...

android – Listview.builder -> Top of Container is stretching in Flutter, even when I put smaller worth?


I’m utilizing Listview.builder with expanded as its mum or dad as a consequence of column, however I get empty house on the backside of this Discover Board widget.

Click to view Image

I had used each kind of technique to forestall this house however fail to get the specified outcomes.

Options might be appreciated.

Right here is the code that I’m utilizing:

Expanded(
          little one: StreamBuilder<Record<NoticeBoardModel>>(
              stream: FireBaseNoticeBoardService().getAllNotice(),
              builder: (context, snapshot) {
                if (snapshot.connectionState == ConnectionState.ready) {
                  return const Heart(
                    little one: CircularProgressIndicator(),
                  );
                } else {
                  if (snapshot.information?.isNotEmpty == true) {
                    return ListView.builder(
                      shrinkWrap: true,
                      scrollDirection: Axis.horizontal,
                      itemCount: snapshot.information?.size,
                      itemBuilder: (context,index) {
                        return Padding(
                          padding: const EdgeInsets.solely(left: 8.0,proper: 8.0),
                          little one: Align(
                            alignment: Alignment.topCenter,
                            little one: Container(
                              peak: 150,
                              width: 150,
                              ornament: BoxDecoration(
                                  borderRadius: BorderRadius.round(8),
                                  colour: Coloration(int.parse(snapshot.information![index].noticeColor ?? AppColors.noticeModelColorPink.worth.toString(),radix: 16))
                              ),
                              little one: Column(
                                crossAxisAlignment: CrossAxisAlignment.begin,
                                kids: [
                                  Expanded(
                                    child: Padding(
                                      padding: const EdgeInsets.only(top: 8,left: 8, right: 8),
                                      child: Text(snapshot.data![index].noticeTitle ?? "No title discovered for this discover",
                                        model: Theme.of(context).textTheme.headline3?.copyWith(fontWeight: FontWeight.daring),
                                      ),
                                    ),
                                  ),
                                  Expanded(little one: Container()),
                                  Padding(
                                    padding: const EdgeInsets.solely(backside: 8,left: 8, proper: 8),
                                    little one: Textual content(snapshot.information![index].createdDate !=null ? dateFormatString(snapshot.information![index].createdDate!) : "No Date Discovered",
                                      model: Theme.of(context).textTheme.headline3?.copyWith(colour: AppColors.appBlackColor.withOpacity(0.5),fontWeight: FontWeight.daring),
                                      overflow: TextOverflow.ellipsis,
                                    ),
                                  ),
                                ],
                              ),
                            ),
                          ),
                        );
                      },);
                  } else {
                    return const Heart(
                      little one: Textual content('No Knowledge Exist'),
                    );
                  }
                }
              }),
        ),

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments