ZdsAppBar class
An app bar with Zds styling.
Typically used in Scaffold.appBar, placing it at the top of the screen. By using the bottom property, another widget can be displayed below this appbar, typically a ZdsResponsiveTabBar or a ZdsTabBar.
Scaffold(
appBar: ZdsAppBar(
title: Text("I'm an appbar!")
bottom: ZdsTabBar()
),
)
By default, if no leading widget is provided, the appbar will provide an IconButton to return to the previous page in the Navigator's stack.
See also:
- ZdsResponsiveTabBar and ZdsTabBar, typically used to display tabs below this widget.
- ZdsPopupMenu, typically used in actions to display a kebab menu for further actions that would pollute the appbar if they were all shown.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ZdsAppBar
- Implemented types
- Available Extensions
Constructors
-
ZdsAppBar({Key? key, Widget? leading, Widget? title, List<
Widget> ? actions, Widget? subtitle, Widget? icon, PreferredSizeWidget? bottom, SystemUiOverlayStyle? systemUiOverlayStyle, bool applyTopSafeArea = true, ZdsTabBarColor color = ZdsTabBarColor.appBar}) -
Creates an appbar that is typically shown at the top of the screen.
const
Properties
-
actions
→ List<
Widget> ? -
Widgets that will be shown at the end of the appbar. Typically a list of IconButton.
final
- applyTopSafeArea → bool
-
(
applyTopSafeArea
) Determines if the top safe area should be applied to theZdsAppBar
or not.final - bottom → PreferredSizeWidget?
-
This widget appears below the app bar. Typically a ZdsResponsiveTabBar or a ZdsTabBar.
final
- color → ZdsTabBarColor
-
Color for app bar. Defaults to primary color.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget?
-
A widget that will be shown between the leading and title widgets.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
The widget shown at the start of the appbar. Typically an IconButton.
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
- subtitle → Widget?
-
The widget that will be shown below the title. Typically a Text widget, it is usually used to display
secondary information about the current page.
final
- systemUiOverlayStyle → SystemUiOverlayStyle?
-
Specifies a preference for the style of the system's overlays when this appbar is used. If null,
ThemeData.appBarTheme will be used. If null, SystemUiOverlayStyle.dark will be used by default.
final
- title → Widget?
-
The appBar's main text. Typically a Text widget, it is usually used to show the page's name.
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.
override
-
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 Methods
-
buildTheme(
BuildContext context, ZdsTabBarColor color) → AppBarTheme - Builds theme variants for ZdsAppBar.