ThemedAppBar class

Inheritance
Implemented types

Constructors

ThemedAppBar({Key? key, List<ThemedNavigatorItem> items = const [], String homePath = '/home', bool disableLeading = false, bool enableAbout = true, VoidCallback? onSettingsTap, VoidCallback? onProfileTap, VoidCallback? onLogoutTap, VoidCallback? onThemeSwitchTap, required String appTitle, String companyName = 'Golden M, Inc', required AppThemedAsset favicon, String userName = "Golden M", Avatar? userDynamicAvatar, String? version, bool isDesktop = false, bool enableAlternativeUserMenu = false, List<ThemedNavigatorItem> additionalActions = const [], Color? backgroundColor, List<ThemedNotificationItem> notifications = const [], double mobileBreakpoint = kMediumGrid, bool enableNotifications = true, ThemedNavigatorPushFunction? onNavigatorPush, ThemdNavigatorPopFunction? onNavigatorPop, bool isBackEnabled = true, String? currentPath, bool hideAvatar = false})
ThemedAppBar is the app bar of the app.
const

Properties

additionalActions List<ThemedNavigatorItem>
additionalActions is the list of additional actions to be displayed in the app bar. By default is []. Its important to note that the additional actions are displayed in the app bar only if enableAlternativeUserMenu is true.
final
appTitle String
appTitle is the title of the app.
final
backgroundColor Color?
backgroundColor is the background color of the app bar. Overrides the default background color from Theme.of(context).scaffoldBackgroundColor.
final
companyName String
companyName is the name of the company.
final
currentPath String?
currentPath is the current path of the navigator. Overrides the default path detection. By default, we get the current path from ModalRoute.of(context)?.settings.name.
final
disableLeading bool
disableLeading is a boolean that prevents the back button from being displayed.
final
enableAbout bool
enableAbout is a boolean that enables the about button.
final
enableAlternativeUserMenu bool
enableAlternativeUserMenu is the flag to know if the user menu is displayed as a button or as a menu. By default is false. If true, the user menu will be displayed as a button and enables the option to contract it and display the user menu as a menu.
final
enableNotifications bool
enableNotifications is the flag to force the notification icon to be displayed. By default is false.
final
favicon → AppThemedAsset
favicon is the favicon of the app. Can be a path or a url.
final
hashCode int
The hash code for this object.
no setterinherited
hideAvatar bool
hideAvatar is the flag to hide the avatar. By default is false.
final
homePath String
homePath is the path of the home page.
final
isBackEnabled bool
isBackEnabled is the flag to enable the back button. By default is true.
final
isDesktop bool
isDesktop is the flag to know if the drawer is in desktop mode. By default is false. If true, the drawer will be displayed as a drawer and enables the option to contract it
final
items List<ThemedNavigatorItem>
buttons is the list of buttons to be displayed in the drawer.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
logo is the logo of the app. Can be a path or a url.
final
mobileBreakpoint double
mobileBreakpoint is the breakpoint to display the notifications. By default is kMediumGrid.
final
notifications List<ThemedNotificationItem>
notifications is the list of notifications to be displayed in the app bar. By default is []. Only will appear when the mobileBreakpoint is reached.
final
onLogoutTap VoidCallback?
onLogoutTap is the callback to be executed when the logout button
final
onNavigatorPop ThemdNavigatorPopFunction?
onNavigatorPop is the callback to be executed when the back button is tapped. By default is Navigator.of(context).pop
final
onNavigatorPush ThemedNavigatorPushFunction?
onNavigatorPush is the callback to be executed when a navigator item is tapped. By default is Navigator.of(context).pushNamed
final
onProfileTap VoidCallback?
onProfileTap is the callback to be executed when the profile button
final
onSettingsTap VoidCallback?
onSettingsTap is the callback to be executed when the settings button
final
onThemeSwitchTap VoidCallback?
onThemeSwitchTap is a callback that is called when the theme switch button is tapped.
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
userDynamicAvatar → Avatar?
userDynamicAvatar is the dynamic avatar of the user. In other components like ThemedDrawer, the prop is ThemedDrawer.userDynamicAvatar.
final
userName String
userName is the name of the user.
final
version String?
version is the version of the app.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ThemedAppBar>
Creates the mutable state for this widget at a given location in the tree.
override
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}) 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 Properties

isMacOS bool
no setter
size Size
no setter