Created
December 15, 2019 16:41
-
-
Save ananevam/4fa50c41a5d5c1065cc3735bc09e88fa to your computer and use it in GitHub Desktop.
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
import 'package:flutter/cupertino.dart'; | |
main() => runApp(new CupertinoApp( | |
home: App() | |
) | |
); | |
class App extends StatelessWidget { | |
Widget build(BuildContext context) { | |
return SingleChildScrollView( | |
physics: AlwaysScrollableScrollPhysics(), | |
child: Column(children: [ | |
Expanded(child: Text("foo")), | |
Expanded( | |
child: GridView.count( | |
scrollDirection: Axis.horizontal, | |
physics: AlwaysScrollableScrollPhysics(), | |
shrinkWrap: true, | |
crossAxisCount: 2, | |
//padding: EdgeInsets.all(4.0), | |
childAspectRatio: 8.0 / 9.0, | |
children: List<String>.generate(100, (i) => "Item $i") | |
.map((item) => Column(children: [ | |
Container( | |
width: 100, | |
height: 100, | |
color: CupertinoColors.destructiveRed), | |
Text(item), | |
])) | |
.toList(), | |
), | |
), | |
]), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment