Невозможно установить размер FAB. Вместо этого вы должны использовать RawMaterialButton
, скопировать атрибуты FAB по умолчанию и изменить размер:
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
alignment: Alignment.bottomCenter,
children: <Widget>[
CustomScrollView(
slivers: <Widget>[
...
],
),
RawMaterialButton(
elevation: 6,
highlightElevation: 12.0,
constraints: BoxConstraints(
minHeight: 48.0,
minWidth: double.infinity,
maxHeight: 48.0,
),
fillColor: Theme.of(context).accentColor,
textStyle: Theme.of(context).accentTextTheme.button.copyWith(
color: Theme.of(context).accentIconTheme.color,
letterSpacing: 1.2,
),
child: Text("SAVE THE CHANGE"),
onPressed: () {},
)
],
),
);
}