Skip to content

Instantly share code, notes, and snippets.

@becek2n
Created May 8, 2020 16:23
Show Gist options
  • Save becek2n/da21e6c7d6f7a38891db76c4752e2f60 to your computer and use it in GitHub Desktop.
Save becek2n/da21e6c7d6f7a38891db76c4752e2f60 to your computer and use it in GitHub Desktop.
Widget buildMenu() {
return Container(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8),
child: Column(
children: [
Padding(
padding: EdgeInsets.all(10.0),
child: Text("Menu", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0),),
),
GridView(
shrinkWrap: true,
padding: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 16),
physics: const NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
children: List.generate(
iconListData.length,
(index) {
return buildIconMenu(
iconListData[index],
iconListDataText[index],
);
},
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 15.0,
crossAxisSpacing: 15.0,
childAspectRatio: 1.0,
),
),
],
)
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment