どうも、ちょげ(@chogetarou)です。
FloatingActionButtonの位置を変える方法を紹介します。
方法

FloatingActionButtonの位置を変えるには、Scaffoldの引数「floatinActionButtonLocation」を使います。
return Scaffold(
body: Column(),
floatingActionButtonLocation: /*位置*/,
floatingActionButton: FloatingActionButton(
onPressed: () {},
child: Icon(Icons.add),
),
);
FloatingActionButtonの位置は、「FloatingActionButtonLocation」クラスの値で指定します。
以下は、中央の下を指定する例です。
class Test extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: FloatingActionButton(
onPressed: () {},
child: Icon(Icons.add),
),
);
}
}

まとめ
FloatingActionButtonの位置を変えるには、「Scaffold」の引数「floatingActionButtonLocation」を使います。
位置の指定は、「FloatingActionButtonクラス」で行います。
コメント