DEV Community

Cover image for Flutter AppBar Example
Easy Flutter
Easy Flutter

Posted on • Originally published at easyflutter.com

Flutter AppBar Example

As a part of our flutter tutorial series, we’re going to explore AppBar example. Usually AppBar can be seen in top header position to display title, navigation and few action buttons.

This article originally published in https://easyflutter.com/flutter-appbar-example/

Flutter AppBar Example Source code

Scaffold(
  appBar: AppBar(
    leading: Icon(Icons.menu),
    backgroundColor: Colors.brown,
    title: Text("EasyFlutter"),
    centerTitle: true,
    actions: [
      IconButton(
        icon: Icon(Icons.search),
        onPressed: () {
          print("Search Pressed");
        },
      ),
      IconButton(
        icon: Icon(Icons.more_vert),
        onPressed: () {
          print("More Pressed");
        },
      ),
    ],
  ),
)

Download latest source code at: https://easyflutter.com/flutter-appbar-example/

Top comments (0)