ApplicationHeader class

An application app-bar / header with title, subtitle, navigation return button, action slots, and profile trigger.

Inheritance

Constructors

ApplicationHeader({Key? key, String title = 'Alter', String subtitle = 'Design System', bool hasReturnButton = false, VoidCallback? onReturnTap, bool hasStyleButton = true, String styleButtonTitle = 'STREAK', String styleButtonSubtitle = '7 DAYS', VoidCallback? onStyleButtonTap, bool hasActionOne = true, IconData actionOneIcon = Icons.favorite_border, VoidCallback? onActionOneTap, bool hasActionTwo = false, IconData actionTwoIcon = Icons.favorite_border, VoidCallback? onActionTwoTap, bool hasProfileAction = true, ImageProvider<Object>? profileImage, VoidCallback? onProfileTap, Widget? slot})
Creates an ApplicationHeader instance.
const

Properties

actionOneIcon → IconData
Icon rendered in the first action button.
final
actionTwoIcon → IconData
Icon rendered in the second action button.
final
hasActionOne → bool
Whether the first generic action button is shown.
final
hasActionTwo → bool
Whether the second generic action button is shown.
final
hashCode → int
The hash code for this object.
no setterinherited
hasProfileAction → bool
Whether the user profile avatar button is shown.
final
hasReturnButton → bool
Whether the leading return/back button is displayed.
final
hasStyleButton → bool
Whether the streak/graphic style badge button is shown.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onActionOneTap → VoidCallback?
Callback executed when the first action button is tapped.
final
onActionTwoTap → VoidCallback?
Callback executed when the second action button is tapped.
final
onProfileTap → VoidCallback?
Callback executed when the profile avatar is tapped.
final
onReturnTap → VoidCallback?
Callback executed when the return button is tapped.
final
onStyleButtonTap → VoidCallback?
Callback executed when the style button is tapped.
final
profileImage → ImageProvider<Object>?
Image provider for the profile avatar.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
slot → Widget?
Optional widget slot embedded below the header bar.
final
styleButtonSubtitle → String
Subtitle of the streak/graphic style badge.
final
styleButtonTitle → String
Title of the streak/graphic style badge.
final
subtitle → String
Secondary subtitle or brand tag text.
final
title → String
Primary headline 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

Constants

version → const String
Component version for reference. v1.1.0: Added hasReturnButton, onReturnTap, custom action icons, and profileImage matching Figma node 119:5716. v1.0.2: Dynamically hug action elements with spacing only between adjacent active items, eliminating trailing space when subsequent actions are absent. v1.0.1: Updated outer layout to 24px padding all around and 16px itemSpacing between headerContainer and Slot as per Figma node 119:5716.