I am working on an app in Flutter, and I want to use ButtonBar
. however, when trying to make the children utilize the space the buttons only utilize the minimal space
Padding(
padding: const EdgeInsets.all(8.0),
child: ButtonBar(
mainAxisSize: MainAxisSize.max,
alignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
child: Text('Save'),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => OtpPage()));
},
),
],
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: ButtonBar(
mainAxisSize: MainAxisSize.max,
alignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
child: Text('Save'),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => OtpPage()));
},
),
],
),
),
Any idea how to get the button to utilize more space