AppBar Widget in Flutter

Jeet BhaluJeet Bhalu
1 min read

AppBar class :

  • A Material Design app bar.

  • An app bar consists of a toolbar and potentially other widgets, such as a TabBar and a FlexibleSpaceBar. App bars typically expose one or more common actions with IconButtons which are optionally followed by a PopupMenuButton for less common operations (sometimes called the "overflow menu").

  •   AppBar(
        title: Text('Flutter AppBar '),
      )
    

Components and Structure of Flutter AppBar

The AppBar mainly comprises two parameterized properties:

  • The Title: title is a parameter in the AppBar Class that takes a text widget.

  • The Leading widget: leading defines the widget displayed before the title.

However, the AppBar can avail other widgets like icons and buttons to enrich its functionality and interactivity.

Let's take a simple example of an app bar with a leading menu icon and a title:

AppBar(
  leading: Icon(Icons.menu),
  title: Text('Flutter AppBar '),
)
0
Subscribe to my newsletter

Read articles from Jeet Bhalu directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jeet Bhalu
Jeet Bhalu

i am Jeet Bhalu i am flutter App developer