SafaehMorphingAppBar class

An app bar whose title and host-provided chrome follow a page position.

The host owns the title widgets and any domain-specific actions. Safaeh keeps the title centered, crossfades adjacent titles while a page view is moving, and gives the host one stable action slot. bottom can be a SafaehMorphingAppBarBottom when its height should follow the page.

Inheritance
Implemented types

Constructors

SafaehMorphingAppBar({Key? key, required double page, required List<Widget> titles, Widget? leading, double? leadingWidth, bool automaticallyImplyLeading = false, bool centerTitle = true, SafaehMorphingAppBarActionBuilder? actionsBuilder, double actionSlotWidth = kToolbarHeight, PreferredSizeWidget? bottom})
Creates a page-positioned app bar.
const

Properties

actionsBuilder SafaehMorphingAppBarActionBuilder?
Builds the fixed-width trailing action slot.
final
actionSlotWidth double
Width reserved for the widget returned by actionsBuilder.
final
automaticallyImplyLeading bool
Whether Material should infer a leading back button when leading is absent.
final
bottom PreferredSizeWidget?
Optional bottom chrome. Its preferred height is included in this app bar's preferredSize.
final
centerTitle bool
Whether the title is centered according to Material's app-bar rules.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
Leading widget. Pass a fixed-width spacer when the title must remain on the physical center line while the action slot changes.
final
leadingWidth double?
Width reserved for leading when it is present.
final
page double
Current page position, usually PageController.page.
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
titles List<Widget>
Title widgets in page order. The host supplies already-localized text.
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