Created
December 30, 2019 01:13
-
-
Save kika/c1153567346945694bb93f31b582a1fd to your computer and use it in GitHub Desktop.
This file contains hidden or 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/material.dart'; | |
void main() => runApp(MyApp()); | |
double kHeight = 100; | |
double kWidth = 100; | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: Scaffold( | |
body: SafeArea( | |
child: Card( | |
child: Wrap( | |
alignment: WrapAlignment.end, | |
children: [ | |
Row(mainAxisSize: MainAxisSize.min, children: [ | |
Container(child: Text("A"), height: kHeight, width: kWidth), | |
Container(child: Text("B"), height: kHeight, width: kWidth), | |
Container(child: Text("C"), height: kHeight, width: kWidth), | |
]), | |
Wrap( | |
children: [ | |
Container( | |
child: Text("1"), | |
height: kHeight / 2, | |
width: kWidth / 2), | |
Container( | |
child: Text("2"), | |
height: kHeight / 2, | |
width: kWidth / 2), | |
Container( | |
child: Text("3"), | |
height: kHeight / 2, | |
width: kWidth / 2), | |
Container( | |
child: Text("4"), height: kHeight / 2, width: kWidth / 2), | |
Container( | |
child: Text("5"), height: kHeight / 2, width: kWidth / 2), | |
Container( | |
child: Text("7"), height: kHeight / 2, width: kWidth / 2), | |
]) | |
], | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment