Я думаю, что это должно помочь вам
class _HelperState extends State<Helper> {
RaisedButton button1 = RaisedButton(
child: Text('Button 1'),
onPressed: () {},
);
RaisedButton button2 = RaisedButton(
child: Text('Button 2'),
onPressed: () {},
);
@override
Widget build(BuildContext context) {
final _isPortrait = false;
print(_isPortrait);
return Scaffold(
body: SafeArea(
child: Center(
child: Flex(
direction: _isPortrait ? Axis.horizontal : Axis.vertical,
children: <Widget>[
Expanded(
flex: _isPortrait ? 2 : 1,
child: _isPortrait ? button1 : button2,
),
Expanded(
flex: _isPortrait ? 1 : 0,
child: _isPortrait ? button2 : button1,
),
],
),
),
),
);
}
}
Очевидно, вам нужно заменить в ваших виджетах, дайте мне знать, если вам нужно что-то еще