ApplicationHeader class
A full-width desktop and web application header for the Alter Design System.
Figma Specifications (Node 706:8794 - ApplicationHeader / device=Web):
- Layout: 48px height horizontal bar, edge-to-edge layout,
#FFFFFFbackground, 1px bottom border#F3F4F6. - Left Group:
- Launcher Button (
hasLauncherButton, 48x48 ApplicationHeaderButtonIcon withIcons.apps). - Logo Container (
hasLogo, 34x34px logo image/widget). - Application Title (
applicationTitle, AlterTypography.h4Bold 16px).
- Launcher Button (
- Center Group (Navigation Tab Bar):
- Tab List (
hasPages, centered row of ApplicationHeaderButtonText buttons).
- Tab List (
- Right Group (Actions & Avatar):
- Action Buttons 1 to 4 (
showApplicationHeaderButton1..4via ApplicationHeaderButtonIcon). - Avatar Button (
showAvatarButtonvia ApplicationHeaderButtonIcon.avatar).
- Action Buttons 1 to 4 (
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ApplicationHeader
Constructors
-
ApplicationHeader({Key? key, bool hasLauncherButton = true, IconData launcherIcon = Icons.apps_rounded, VoidCallback? onLauncherTap, bool hasLogo = true, ImageProvider<
Object> ? logo, Widget? logoWidget, String? logoAssetPath, VoidCallback? onLogoTap, bool applicationTitle = true, String title = 'Application Title', Widget? titleWidget, VoidCallback? onTitleTap, bool hasPages = true, List<String> pages = const ['Label', 'Label', 'Label', 'Label', 'Label'], int selectedPageIndex = 0, ValueChanged<int> ? onPageSelected, List<Widget> ? pageWidgets, bool showApplicationHeaderButton1 = true, IconData action1Icon = Icons.face_outlined, Widget? action1Widget, VoidCallback? onAction1Tap, bool showApplicationHeaderButton2 = true, IconData action2Icon = Icons.face_outlined, Widget? action2Widget, VoidCallback? onAction2Tap, bool showApplicationHeaderButton3 = true, IconData action3Icon = Icons.face_outlined, Widget? action3Widget, VoidCallback? onAction3Tap, bool showApplicationHeaderButton4 = true, IconData action4Icon = Icons.face_outlined, Widget? action4Widget, VoidCallback? onAction4Tap, bool showAvatarButton = true, Widget? avatar, ImageProvider<Object> ? avatarImage, String? avatarImageUrl, String? avatarInitials, VoidCallback? onAvatarTap, Color? backgroundColor, Color? borderColor}) -
Creates an ApplicationHeader instance.
const
Properties
- action1Icon → IconData
-
Icon rendered in action button 1.
final
- action1Widget → Widget?
-
Custom widget override for action button 1.
final
- action2Icon → IconData
-
Icon rendered in action button 2.
final
- action2Widget → Widget?
-
Custom widget override for action button 2.
final
- action3Icon → IconData
-
Icon rendered in action button 3.
final
- action3Widget → Widget?
-
Custom widget override for action button 3.
final
- action4Icon → IconData
-
Icon rendered in action button 4.
final
- action4Widget → Widget?
-
Custom widget override for action button 4.
final
- applicationTitle → bool
-
Whether the application title is displayed.
final
- avatar → Widget?
-
Custom avatar widget override.
final
-
avatarImage
→ ImageProvider<
Object> ? -
Image provider for the profile avatar.
final
- avatarImageUrl → String?
-
Network image URL for the profile avatar.
final
- avatarInitials → String?
-
Initials text fallback for the profile avatar (e.g. 'RC').
final
- backgroundColor → Color?
-
Background color of the header bar.
final
- borderColor → Color?
-
Bottom border color of the header bar.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasLauncherButton → bool
-
Whether the leading application launcher button (apps icon) is displayed.
final
- hasLogo → bool
-
Whether the application logo is displayed.
final
- hasPages → bool
-
Whether the navigation tab list is displayed.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- launcherIcon → IconData
-
Icon rendered in the launcher button.
final
-
logo
→ ImageProvider<
Object> ? -
Image provider for the application logo.
final
- logoAssetPath → String?
-
Custom asset path for the logo (defaults to 'assets/alter_logo.png').
final
- logoWidget → Widget?
-
Custom widget override for the logo.
final
- onAction1Tap → VoidCallback?
-
Callback executed when action button 1 is tapped.
final
- onAction2Tap → VoidCallback?
-
Callback executed when action button 2 is tapped.
final
- onAction3Tap → VoidCallback?
-
Callback executed when action button 3 is tapped.
final
- onAction4Tap → VoidCallback?
-
Callback executed when action button 4 is tapped.
final
- onAvatarTap → VoidCallback?
-
Callback executed when the avatar button is tapped.
final
- onLauncherTap → VoidCallback?
-
Callback executed when the launcher button is tapped.
final
- onLogoTap → VoidCallback?
-
Callback executed when the logo is tapped.
final
-
onPageSelected
→ ValueChanged<
int> ? -
Callback fired when a navigation page item is selected.
final
- onTitleTap → VoidCallback?
-
Callback executed when the title is tapped.
final
-
pages
→ List<
String> -
List of tab/page string labels displayed in the center navigation bar.
final
-
pageWidgets
→ List<
Widget> ? -
Custom list of navigation page widgets (overrides pages strings if provided).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedPageIndex → int
-
Currently active page index in the center navigation bar.
final
- showApplicationHeaderButton1 → bool
-
Whether action button 1 is displayed.
final
- showApplicationHeaderButton2 → bool
-
Whether action button 2 is displayed.
final
- showApplicationHeaderButton3 → bool
-
Whether action button 3 is displayed.
final
- showApplicationHeaderButton4 → bool
-
Whether action button 4 is displayed.
final
- showAvatarButton → bool
-
Whether the user profile avatar button is displayed.
final
- title → String
-
Text string for the application title.
final
- titleWidget → Widget?
-
Custom widget override for the application title.
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