AppBarin 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
appBarparameter 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.
AppBarabove, So let's look at its constructor.
PreferredSizeis a good choice to use. The
childis a widget, the
AppBar.It is similar with
RaiseButtonI have tell before.
elevation = 4.
AppBar, you can use the
IconThemeData, its constructor is below. We have used the color, size several times, so I do not explain it. The
opacitycontrols the transparency of the
Icon. The value is from 0 to 1.
bottomabove, so the
bottomOpacitywill control the transparency of the part of the
AppBar, it is not so useful. So I will use a
SliverAppBarto replace the
AppBarto describe this parameter.
AppBarin 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.