Flutter gridview inside listview. You can try to use Horizontal scrolling lists inside a vertical scrolling list to achieve this type of layout easily.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | Container ( child : ListView.builder( itemBuilder: (context, subMenuIndex) { return Container( padding: EdgeInsets.only(left: 20.0), child: sideMenuStuff.sideMenuData.elementAt(mainIndex).menu.subMenu.elementAt(subMenuIndex).subSubMenu != null ? ExpansionTile( title: Text(sideMenuStuff.sideMenuData.elementAt(mainIndex).menu.subMenu.elementAt(subMenuIndex).zero.info.title, ), children: <Widget>[ ListView.builder( shrinkWrap: true, itemCount: sideMenuStuff.sideMenuData.elementAt(mainIndex).menu.subMenu.elementAt(subMenuIndex).subSubMenu.length, itemBuilder: (context, subSubMenuIndex) { return Container( padding: EdgeInsets.only( left: 40.0, top: 10.0, bottom: 10.0), child: GestureDetector( onTap: () { Navigator .pop(context); Navigator .of(context) .push(MaterialPageRoute( builder: (context) => Products( sideMenuStuff .sideMenuData .elementAt( mainIndex) .menu .... .... ); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.