フロント側をFlutter(スマホ)Thymeleaf(PC)、バックエンド側SpringBootの自動作成勉強中
10:03
①昨日、日記に書いた、
そおだ別件だけど、開発途中気が付いたら「FloatingActionButton」(カメラボタン、フォルダボタンなどに使ってた。青丸がついて綺麗だったのだけど)を1画面中に複数おけない!みたいなエラーが出てたので「IconButton」(青丸がついてなくてちょっとそっけない感じになった)に変更した。
が、『FloatingActionButtonにUniqueなheroTagを設定すること』で簡単に解決した。(エラーがでなくなった)
Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ FloatingActionButton( <<追加 start>> heroTag: 'camera', <<追加 end>> onPressed: getImageFromCamera, tooltip: 'Pick Image From Camera', child: const Icon(Icons.add_a_photo), ), FloatingActionButton( <<追加 start>> heroTag: 'gallery', <<追加 end>> onPressed: getImageFromGallery, tooltip: 'Pick Image From Gallery', child: const Icon(Icons.photo_library), ), ], ),