leading property

Widget? leading
final

A widget to display before the toolbar's title.

Typically the leading widget is an Icon or an IconButton.

Becomes the leading component of the NavigationToolbar built by this widget. The leading widget's width and height are constrained to be no bigger than leadingWidth and toolbarHeight respectively.

If this is null and automaticallyImplyLeading is set to true, the AppBar will imply an appropriate widget. For example, if the AppBar is in a Scaffold that also has a Drawer, the Scaffold will fill this widget with an IconButton that opens the drawer (using Icons.menu). If there's no Drawer and the parent Navigator can go back, the AppBar will use a BackButton that calls Navigator.maybePop.

This property is used to configure an AppBar.

Implementation

final Widget? leading;