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

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

0

[ad_1]

I’m utilizing Listview.builder with expanded as its dad or mum because 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.

Strategies shall be appreciated.

Right here is the code that I’m utilizing:

Expanded(
          little one: StreamBuilder<Checklist<NoticeBoardModel>>(
              stream: FireBaseNoticeBoardService().getAllNotice(),
              builder: (context, snapshot) {
                if (snapshot.connectionState == ConnectionState.ready) {
                  return const Middle(
                    little one: CircularProgressIndicator(),
                  );
                } else {
                  if (snapshot.knowledge?.isNotEmpty == true) {
                    return ListView.builder(
                      shrinkWrap: true,
                      scrollDirection: Axis.horizontal,
                      itemCount: snapshot.knowledge?.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(
                              top: 150,
                              width: 150,
                              ornament: BoxDecoration(
                                  borderRadius: BorderRadius.round(8),
                                  shade: Shade(int.parse(snapshot.knowledge![index].noticeColor ?? AppColors.noticeModelColorPink.worth.toString(),radix: 16))
                              ),
                              little one: Column(
                                crossAxisAlignment: CrossAxisAlignment.begin,
                                youngsters: [
                                  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",
                                        type: 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.knowledge![index].createdDate !=null ? dateFormatString(snapshot.knowledge![index].createdDate!) : "No Date Discovered",
                                      type: Theme.of(context).textTheme.headline3?.copyWith(shade: AppColors.appBlackColor.withOpacity(0.5),fontWeight: FontWeight.daring),
                                      overflow: TextOverflow.ellipsis,
                                    ),
                                  ),
                                ],
                              ),
                            ),
                          ),
                        );
                      },);
                  } else {
                    return const Middle(
                      little one: Textual content('No Knowledge Exist'),
                    );
                  }
                }
              }),
        ),

[ad_2]