I want to align the buttons just below the appBar but I am getting this:
I want to remove the space between buttons and the appBar. How can I achieve this?
This is the code:
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
'Home',
),
),
body: Column(
children: <Widget>[
Row(
children: <Widget>[
Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width*0.5,
child: RaisedButton(
onPressed: (){},
child: Text('SORT'),
),
)
],
),
Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width*0.5,
child: RaisedButton(
onPressed: (){},
child: Text('FILTER'),
),
)
],
)
],
),
],
),
);
}
}
Inside the RaisedButton, add this argument:
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap