At the moment, I am using the following bit of code :
body: new Container(
child: new Column(
crossAxisAlignment: CrossAxisAlignm
You can use LayoutBuilder to dynamically get the parent size during build.
A working example :
void main() {
runApp(new MaterialApp(
home: new TestIcon(),
));
}
class TestIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Container(
color: Colors.white,
child: new LayoutBuilder(builder: (context, constraint) {
return new Icon(Icons.access_alarms, size: constraint.biggest.height);
}),
);
}
}