UIProAppBar class

A customizable app bar with consistent styling.

UIProAppBar provides a consistent app bar experience across your app.

Example:

UIProAppBar(
  title: "Home",
  onBackPressed: () => Navigator.pop(context),
)

With actions:

UIProAppBar(
  title: "Settings",
  actions: [
    UIProAppBarAction(
      icon: Icons.search,
      onPressed: () => openSearch(),
    ),
  ],
)
Inheritance
Implemented types

Constructors

UIProAppBar({Key? key, dynamic title, bool showBackButton = false, VoidCallback? onBackPressed, IconData? backIcon, Widget? leading, List<UIProAppBarAction>? actions, Widget? trailing, Color? backgroundColor, Color? foregroundColor, double? elevation, bool? centerTitle, TextStyle? titleStyle, PreferredSizeWidget? bottom, SystemUiOverlayStyle? systemOverlayStyle, bool isSliver = false, bool largeTitle = false, Widget? flexibleSpace, bool automaticallyImplyLeading = true})
Creates a customizable app bar.
const
UIProAppBar.transparent({Key? key, dynamic title, bool showBackButton = false, VoidCallback? onBackPressed, IconData? backIcon, Widget? leading, List<UIProAppBarAction>? actions, Widget? trailing, Color? foregroundColor, bool? centerTitle, TextStyle? titleStyle, PreferredSizeWidget? bottom, SystemUiOverlayStyle? systemOverlayStyle, Widget? flexibleSpace, bool automaticallyImplyLeading = true})
Creates a transparent app bar (useful for overlays).
const

Properties

actions List<UIProAppBarAction>?
Action buttons.
final
automaticallyImplyLeading bool
Whether to automatically imply leading.
final
backgroundColor Color?
Background color (overrides theme).
final
backIcon IconData?
Custom back button icon.
final
bottom PreferredSizeWidget?
Bottom widget (e.g., TabBar).
final
centerTitle bool?
Whether to center the title (overrides theme).
final
elevation double?
Elevation (overrides theme).
final
flexibleSpace Widget?
Flexible space widget.
final
foregroundColor Color?
Foreground/icon color (overrides theme).
final
hashCode int
The hash code for this object.
no setterinherited
isSliver bool
Whether this app bar is for a sliver.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
largeTitle bool
Whether the title should be large (for sliver).
final
leading Widget?
Leading widget (overrides back button).
final
onBackPressed VoidCallback?
Custom back button callback. If null, uses Navigator.pop when back button is pressed.
final
preferredSize Size
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showBackButton bool
Whether to show the back button.
final
systemOverlayStyle SystemUiOverlayStyle?
System UI overlay style.
final
title → dynamic
The title text or widget.
final
titleStyle TextStyle?
Custom title text style.
final
trailing Widget?
Custom trailing widget (overrides actions).
final

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