Я добавил плавающую кнопку в нижней навигационной панели. Местоположение по умолчанию должно быть в правом нижнем углу, но мое остается в центре.
Я пытался использовать это floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
, но FAB по-прежнему находится в центре экрана.
Вот мой полный код экрана:
Widget build(BuildContext context) {
return Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(55.0),
child: CustomAppBar(title: 'Customers (2)',),
),
drawer: Theme(
data: Theme.of(context).copyWith(
canvasColor: Colors.white
),
child: MyDrawer(),
),
body: Container(
padding: EdgeInsets.all(15.0),
decoration: BoxDecoration(color: Colors.white),
child: SingleChildScrollView(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
FaIcon(FontAwesomeIcons.search, color: Colors.greenAccent,),
SizedBox(width: 15.0,),
Text("Search Customers"),
],
),
],
),
),
),
bottomNavigationBar: FloatingActionButton(
child: FaIcon(FontAwesomeIcons.plus),
backgroundColor: Colors.greenAccent,
foregroundColor: Colors.white,
splashColor: Colors.black,
onPressed: () {
},
),
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
);
}
Любая идея как это решить?