Skip to main content

AppBar

A top application bar for mobile screens.

When to use it

Use AppBar as the header of a mobile screen — a centred title, an optional back button, and trailing actions. When automaticallyImplyLeading is true (the default) and the current route can be popped, a back button is shown automatically; on iOS this uses a chevron, on other platforms an arrow (via context.iconography.backIcon).

Import

import 'package:catalyst_ui/catalyst_ui.dart';

Usage

AppBar(
title: const Text('Settings'),
actions: [
AppBarAction(
icon: LucideIcons.search,
semanticsLabel: 'Search',
onTap: _onSearch,
),
],
)

Parameters

ParameterTypeDefaultDescription
titleWidget?nullAn optional centred widget, typically a Text title.
automaticallyImplyLeadingbooltrueWhether to auto-show a back button when the route can pop.
leadingWidget?nullOverrides the auto-generated leading widget.
actionsList<AppBarAction>[]Actions shown on the trailing end of the bar.
backIconIconData?nullIcon for the default back button. Falls back to Iconography.backIcon.

AppBarAction

ParameterTypeDefaultDescription
iconIconDatarequiredThe icon to display in the app bar.
semanticsLabelStringrequiredA semantics label and tooltip text.
onTapVoidCallbackrequiredCalled when the user taps this action.
toneActionToneActionTone.neutralThe color scheme for this action.

ActionTone

Enum values: primary (brand color), success, danger, neutral (neutral foreground color, default).

Iconography

When automaticallyImplyLeading is true and no leading is supplied, the auto-generated back button uses backIcon, falling back to context.iconography.backIcon.