At the moment, I am using the following bit of code :
body: new Container(
child: new Column(
crossAxisAlignment: CrossAxisAlignm
Thanks to Darky, I ended up using the LayoutBuilder, along with the Expanded Widget, the Column Widget, and the use of the flex parameter to give the right proportions. As for the text sizing, I couldn't find a better way than using some kind of ratio based on the available biggest height.
body: new Container(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
new Expanded(
child: new MaterialButton(
child: new Column(
children: [
new Expanded(
flex: 4,
child: new LayoutBuilder(
builder: (context, constraint) {
return new Icon(
Icons.timer,
size: constraint.biggest.height,
);
}),
),
new Expanded(child:
new LayoutBuilder(builder: (context, constraint) {
return new Text('TIMER',
style: DefaultTextStyle.of(context).style.apply(fontSizeFactor: constraint.biggest.height/30.0));
})),
],
),
onPressed: () {
showTimePicker(
context: context,
initialTime: new TimeOfDay.now(),
);
})),
new Expanded(
child: new MaterialButton(
child: new Column(
children: [
new Expanded(
flex: 4,
child: new LayoutBuilder(
builder: (context, constraint) {
return new Icon(
Icons.alarm,
size: constraint.biggest.height,
);
}),
),
new Expanded(child:
new LayoutBuilder(builder: (context, constraint) {
return new Text('ALARM',
style: DefaultTextStyle.of(context).style.apply(fontSizeFactor: constraint.biggest.height/30.0));
})),
],
),
onPressed: () {
showTimePicker(
context: context,
initialTime: new TimeOfDay.now(),
);
})),
]))