ThemedLayout class

Inheritance

Constructors

ThemedLayout({Key? key, ThemedLayoutStyle style = ThemedLayoutStyle.mini, ThemedMobileLayoutStyle mobileStyle = ThemedMobileLayoutStyle.bottomBar, required Widget body, 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, List<ThemedNavigatorItem> additionalActions = const [], Color? backgroundColor, List<ThemedNavigatorItem> persistentItems = const [], List<ThemedNotificationItem> notifications = const [], double mobileBreakpoint = kMediumGrid, EdgeInsetsGeometry padding = const EdgeInsets.all(10), bool disableSafeArea = false, ThemedNavigatorPushFunction? onNavigatorPush, ThemdNavigatorPopFunction? onNavigatorPop, bool isBackEnabled = true, String? currentPath, bool enableNotifications = true})
ThemedLayout is the layout of the application. It is the parent of all
const

Properties

additionalActions List<ThemedNavigatorItem>
additionalActions is the list of additional actions to be displayed in the app bar. By default is [].
final
appTitle String
appTitle is the title of the app.
final
backgroundColor Color?
Its important to note that the additional actions are displayed in the app bar only if enableAlternativeUserMenu is true. backgroundColor is the background color of the app bar. Overrides the default background color from Theme.of(context).scaffoldBackgroundColor.
final
body Widget
body is the body of the layout. It is the main content of the application.
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
final
disableSafeArea bool
disableSafeArea is a boolean that disables the safe area. By default is false.
final
enableAbout bool
enableAbout is a boolean that enables the about button.
final
enableNotifications bool
enableNotifications is a boolean that enables the notifications button.
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
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
items List<ThemedNavigatorItem>
items 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 for mobile devices. By default is kMediumGrid.
final
mobileStyle ThemedMobileLayoutStyle
mobileStyle is the style of the mobile layout. Defaults to ThemedMobileLayoutStyle.bottomBar.
final
notifications List<ThemedNotificationItem>
notifications is the list of notifications to be displayed in the taskbar or sidebar. By default is [].
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?
buttons is the list of buttons to be displayed in the drawer. displayed. onSettingsTap is the callback to be executed when the settings button
final
onThemeSwitchTap VoidCallback?
onThemeSwitchTap is the callback to be executed when the theme switch button
final
padding EdgeInsetsGeometry
padding is the padding of the layout. By default is EdgeInsets.all(10).
final
persistentItems List<ThemedNavigatorItem>
persistentItems is the list of persistent items to be displayed in the taskbar. By default is [].
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style ThemedLayoutStyle
style is the style of the layout. Defaults to ThemedLayoutStyle.modern.
final
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<ThemedLayout>
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