I'm new to flutter. I'm trying to insert to the "AppBar" a simple "contained button" with text on it. (For example the material design "contained button" here)
The problem is that no matter what height I insert in the Constructor, the button still fills the full height of the AppBar.
I can visibly solve the problem with setting padding as I did in the example below, but it frustrates me that I don't understand why I can't change the button's height itself. I tried also to wrap it with a container or a sizedBox like shown in the answers here but it didn't make any visible change (still the button filled the whole appBar height)
I would really appreciate it if also someone could explain to me why the code acts like that.
appBar: AppBar(
automaticallyImplyLeading: false,
title: Text(widget.title),
actions: <Widget>[
Padding(
padding: EdgeInsets.only(top: 7.0, bottom: 7),
child: Container(
width: 80,
child: FlatButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0),
),
color: Color.fromRGBO(58, 90, 128, 1),
onPressed: () {},
child: Text('Button')
),
)
),
]
)