0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Flutter】AppBarの高さ(height)を変更する

Last updated at Posted at 2020-09-30

rectangle_large_type_2_e5970f34261d446ad5114b17f7269099.png

最後にFlutterのオンライン講座のリンクも載せていますので、ぜひそちらもご覧ください。

今回は、AppBarの高さを変更する方法をご紹介します。
AppBarは、Container等のサイズを変更できるWidgetで囲うという、Flutter開発でよくある方法で高さ(height)の指定をすることができず、PreferredSizeというWidgetで囲う必要があります。

main.dart
PreferredSize(
   preferredSize: Size.fromHeight(40.0),
   child: AppBar(
     title: Text('AppBarの高さを変更する'),
   ),
)

リンク
Flutter学習スクール

0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?