Контейнер в виджете floatinACtionButton
api радио экрана: MediaQuery
Например
// floatinButton слева
floatingActionButton: Container(
width: MediaQuery.of(context).size.width ,
height: MediaQuery.of(context).size.height / 8,
color: Colors.red,
child: Row(
children: <Widget>[
FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add , size: 30,),
),
Expanded(child: Container())
],
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
);
![enter image description here](https://i.stack.imgur.com/AnDmS.png)
// center floatingButton
floatingActionButton: Container(
width: MediaQuery.of(context).size.width ,
height: MediaQuery.of(context).size.height / 8,
color: Colors.red,
child: Row(
children: [
Expanded(child: Container()),
FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add , size: 30,),
),
Expanded(child: Container())
],
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
);
введите описание изображения здесь