Skip to content

Instantly share code, notes, and snippets.

@ebubekirsezer
Created July 25, 2020 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebubekirsezer/5c0e2d1ec41c53a5d73b6919eeb02ce4 to your computer and use it in GitHub Desktop.
Save ebubekirsezer/5c0e2d1ec41c53a5d73b6919eeb02ce4 to your computer and use it in GitHub Desktop.
Column buildColumnWithAspectRatios() {
return Column(
children: [
AspectRatio(
aspectRatio: 10 / 5,
child: Container(
color: Colors.purple,
),
),
AspectRatio(
aspectRatio: 15 / 5,
child: Container(
color: Colors.yellow,
),
),
AspectRatio(
aspectRatio: 20 / 5,
child: Container(
color: Colors.red,
),
),
AspectRatio(
aspectRatio: 9 / 4,
child: Container(
color: Colors.blue,
),
),
],
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment