Migration to Flutter Guide
Discover our battle-tested 21-step framework for a smooth and successful migration to Flutter!
Home
Glossary

AppBar in Flutter

What is an AppBar in Flutter?

An AppBar is a Material Design widget that implements the top application bar according to platform conventions. It is most commonly used as the appBar property of a Scaffold.

It supports:

  • titles and subtitles
  • leading navigation widgets
  • action buttons
  • bottom widgets (e.g. TabBar)
  • scroll-aware behavior when combined with Slivers

How AppBar works with Scaffold

AppBar is tightly integrated with Scaffold. When assigned to the Scaffold's appBar property, it automatically:

  • Positions itself below the system status bar.
  • Adjusts height based on platform and text scaling.
  • Participates in Material behaviors like elevation and scrolling.

Using AppBar outside of Scaffold is possible and useful when you're building your own layout.

AppBar example in Flutter

Scaffold(
  appBar: AppBar(
    title: const Text('Profile'),
    actions: [
      IconButton(
        icon: const Icon(Icons.search),
        onPressed: () {},
      ),
    ],
  ),
  body: const Center(
    child: Text('Content'),
  ),
);

This is the most common and recommended usage pattern.

Common mistakes when using AppBar

A few issues frequently confuse beginners:

  • Manually adding a back button: Flutter automatically displays a back button in the AppBar when navigating to a new screen using Navigator. In most cases, defining the leading widget manually is unnecessary.
  • Thinking AppBar color changes are a bug: When using Material 3, the AppBar may slightly change its background color as content scrolls underneath it. This is expected behavior and part of the Material design system.
  • Overloading the AppBar with actions: Placing too many icons in the AppBar reduces clarity and usability. Actions should be limited to the most important operations.

For advanced layouts, widgets like SliverAppBar is usually a better fit.

Learn more

Design system Flutter

Building a Design System in a Large Flutter App

Flutter is known for its seamless UI/UX features and robust design elements. It allowed us to deliver a unique customer experience in the “CA24 Mobile” banking app. This article shares some of the learnings and pain points behind implementing it in this large project.

RTL in Flutter by LeanCode

Right to Left (RTL) in Flutter App - Developer's Guide

Find the most important things to keep in mind when introducing RTL design in your Flutter mobile app and how you can use Flutter to support various text directions with little effort. Follow the guide on RTL prepared by Flutter Developer.

accessibility in web design

Essential Accessibility: How to Lower the Cost of Building Accessible Web

Most digital products fail to address the rising needs of users with impairments. One of the reasons why business owners don’t decide to implement accessibility standards is a concern that it may raise the cost of web development. Read how to improve web and web app accessibility at a low cost.