AppBar
in our code above, just a simple one. It will show a app bar with a title. It is easy to use. It usually use with the appBar
parameter of the Scaffold
. But in this tutorial, I will try to use it as a common widget to describe its parameter. Hope you do not misunderstand my style.AppBar
above, So let's look at its constructor.InkWell
with a Icon
as below.PreferredSizeWidget
.PreferredSize
is a good choice to use. The child
is a widget, the preferredSize
is the Size
. AppBar
.It is similar with RaiseButton
I have tell before. elevation = 4
.AppBar
, you can use the backgroundColor
as follows.IconThemeData
, its constructor is below. We have used the color, size several times, so I do not explain it. The opacity
controls the transparency of the Icon
. The value is from 0 to 1.fontSize
to 30.AppBar
.bottom
above, so the bottomOpacity
will control the transparency of the part of the bottom
.AppBar
, it is not so useful. So I will use a SliverAppBar
to replace the AppBar
to describe this parameter. AppBar
in the flutter. It is so common and important to us. So just keep going, we can learn very well about the widgets in the flutter.