StreamAppBar class

A top-of-screen header for full-page surfaces in the Stream design system.

StreamAppBar arranges an optional centered title (and optional subtitle) between optional leading and trailing widget slots — typically a back button on the leading side and a primary action on the trailing side.

The heading occupies the flexible center of the row, with the wider of leading / trailing mirrored on the opposite side so the title stays geometrically centred.

When leading is null and automaticallyImplyLeading is true (the default), a dismissal button is inserted if the enclosing route can pop:

  • Inside a fullscreen dialog → a cross (xmark).
  • Otherwise on iOS-style platforms (iOS / macOS) → a back chevron.
  • Otherwise (Android / web / desktop) → an arrow-left.

A hairline borderSubtle border is drawn along the bottom edge to separate the bar from page content — it's part of the bar's identity rather than a configurable divider.

StreamAppBar implements PreferredSizeWidget so it can be passed directly to Scaffold.appBar.

{@tool snippet}

Use as a Scaffold.appBar with a centered title — the leading back button is auto-implied:

Scaffold(
  appBar: StreamAppBar(title: const Text('Details')),
  body: const _DetailsBody(),
)

{@end-tool}

Theming

StreamAppBar uses StreamAppBarThemeData for default styling — colors, padding, spacing, title/subtitle text styles, and per-slot button style propagation. Defaults are derived from StreamColorScheme, StreamTextTheme, and StreamSpacing.

See also:

Inheritance
Implemented types

Constructors

StreamAppBar({Key? key, Widget? leading, bool automaticallyImplyLeading = true, Widget? title, Widget? subtitle, Widget? trailing, bool primary = true, bool excludeHeaderSemantics = false, StreamAppBarStyle? style})
Creates a Stream app bar.

Properties

hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
preferredSize → Size
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
props → StreamAppBarProps
The properties that configure this app bar.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

resolveSurfaceStyle(BuildContext context, {StreamAppBarStyle? style}) → StreamSurfaceStyle
The surface style this app bar renders with in context.