I want to create the following layout:
It's a Container, containing a Row, children:
The size of the square Container should be the height of the parent Container (its width = its height). the Column with the 3 Text widgets should expand to the rest of the parent Container.
Is it possible in Flutter? if so, how?
Try creating a custom widget:
class BoxWidget extends StatelessWidget {
BoxWidget(/*...*/);
Widget build(_) {
return Row(
children: [
AspectRatio(
aspectRatio: 1,
child: Container(
decoration: BoxDecoration(
color: Colors.red,
),
),
),
Column(
children: [
Text(widget.text1, style: style),
Text(widget.text2, style: style),
Text(widget.text3, style: style),
],
),
],
);
}
}