简体   繁体   中英

ListView Scrolling not working in dart/flutter

I need scrolling but not scrolling. at this moment, some data/item show but maximum data has been hide. so how to overcome/scrolling the all data items. I need scrolling but not scrolling. at this moment, some data/item show but maximum data has been hide. so how to overcome/scrolling the all data items. I need scrolling but not scrolling. at this moment, some data/item show but maximum data has been hide. so how to overcome/scrolling the all data items. my source code below:

   body: 
        ListView(
          children: [
            ListView.builder(
                scrollDirection: Axis.vertical,
                shrinkWrap: true,
                itemCount: _mOfferListRemoveDuplicate == null ? 0 : _mOfferListRemoveDuplicate.length,
                // itemCount: _mOfferList == null ? 0 : _mOfferList.length,
                itemBuilder: (BuildContext context, index) {
                  return Card(
                      margin: EdgeInsets.all(5.0),
                      elevation: 1,
                      child: SizedBox(
                        height: 100,
                        child: ListView(
                          children: [
                            Padding(
                              padding: const EdgeInsets.all(8.0),
                              child: Text(
                                _mOfferListRemoveDuplicate[index],
                                textAlign: TextAlign.left,
                                style: TextStyle(fontSize: 4.0, color: Colors.green,),
                              ),
                            ),
                            Padding(
                              padding: const EdgeInsets.all(8.0),
                              child: ListView.builder(
                                  scrollDirection: Axis.vertical,
                                  shrinkWrap: true,
                                  itemCount:
                                      _mOfferList == null ? 0 : _mOfferList.length,
                                  itemBuilder: (BuildContext context, index) {
                                    return Column(
                                      children: [
                                        Text("" + _mOfferList[index].offerTitle,style: TextStyle(fontSize: 5.0),)
                                      ],
                                    );
                                  }),
                            ),
                          ],
                        ),
                      ));
                }),
          ],
        ));

in each listview and listview.builder (expect first one) use this code:

physics: ScrollPhysics(),
shrinkWrap: true,

it must work

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM