AppBarのチャットiconを左よせにする方法がわかった。
![](https://masurao-record.com/wp-content/uploads/2022/10/スクリーンショット-2022-10-11-15.58.48.png)
actionsを設定すればいけた。
appBar: AppBar(
bottom: PreferredSize(
preferredSize: const Size.fromHeight(1),
child: Container(
height: 1,
color: const Color.fromARGB(255, 194, 194, 194),
)),
elevation: 0.0,
backgroundColor: Colors.white,
title: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: const [
Icon(
Icons.camera_alt,
color: Colors.black,
),
SizedBox(width: 8),
Text(
'instagram',
style: TextStyle(
fontFamily: 'PassionsConflict',
fontSize: 40,
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
],
),
// ↓これ
actions: const [
Icon(
Icons.chat,
color: Colors.black,
),
],
),
右に寄りすぎているので、これはpaddingとか設定すればいいのだろうか。
とりあえず、よし!
参考
![](https://masurao-record.com/wp-content/uploads/cocoon-resources/blog-card-cache/3c59e6aa9cca07be915b78869d31e755.png)
【Flutter】AppBarの使い方まとめ|Flutterラボ
Flutterアプリ開発で頻出Widgetの『AppBar』ですが、初心に戻って改めて使い方を解説したいと思います。
Flutterラボ|動画で学ぶFlutter学習サイト
Flutter・Dart・Firebaseに関するアプリ制作の技術を学ぶことができます。プログラミング初心者から経験者まで
flu...
コメント