Created
August 24, 2020 18:50
-
-
Save kirshiyin89/04ebf5c874699fdee56966454ab3e5ae to your computer and use it in GitHub Desktop.
Snippet for displaying the GridView.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Widget _buildGridView(BuildContext context, List<ServerInfo> serverInfo) { | |
return GridView.count( | |
primary: false, | |
padding: const EdgeInsets.all(1.5), | |
crossAxisCount: determineCrossAxisCount(context), | |
childAspectRatio: 1.2, | |
mainAxisSpacing: 1.0, | |
crossAxisSpacing: 1.0, | |
children: _prepareServerInfoCards(serverInfo), //new Cards() | |
shrinkWrap: true, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment