I want to show, first of all, the Group name then below all child products of the particular group. but I can not populate the data. still, now, show data 1) group name 2) product name of the particular group. I want to display the result
Group Name a) product name b) product name c) product name d) product name my source code given is below:
body: ListView.builder( scrollDirection: Axis.vertical, shrinkWrap: true, itemCount: _mOfferList == null ? 0 : _mOfferList.length, itemBuilder: (BuildContext context, index) { return Card( // margin: // EdgeInsets.only(left: 5.0, right: 10.0, top: 5.0), elevation: 1, child: Column( children: [ Text( _mOfferList[ index].offerBaseProductBrandTitle, textAlign: TextAlign.left, style: TextStyle( fontSize: 13.0), ), Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ // Emp Info Expanded( flex: 1, child: Container( padding: EdgeInsets.all(10.0), // color: Color(0xFF90EE90), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ Expanded( flex: 1, child: _mOfferList[index].offerTitle == null ? Text(" ", style: TextStyle( fontSize: 13.0)) : Text( "" + _mOfferList[ index].offerTitle, textAlign: TextAlign.left, style: TextStyle( fontSize: 13.0), ), ) ], ) ], ), ), ), // end of Emp Info ], ), ], )); }),
wanted result: enter image description here
Stil now my result: Group Name : AAA a) abc Group Name : AAA b) xxx Group Name : AAA c) yyy Group Name : AAA d) zzz Group Name : BBB a) gtt Group Name : BBB b) gbt Group Name : BBB c) kosadfa Group Name : BBB d) sdfsadf
But my wanted result: like below
Group Name : AAA
a) abc
b) xxx
c) yyy
d) zzz
Group Name : BBB
a) gtt
b) gbt
c) kosadfa
d) sdfsadf