Skip to content

Instantly share code, notes, and snippets.

@kika
Created December 30, 2019 01:13
Show Gist options
  • Save kika/c1153567346945694bb93f31b582a1fd to your computer and use it in GitHub Desktop.
Save kika/c1153567346945694bb93f31b582a1fd to your computer and use it in GitHub Desktop.
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