ZetaTopAppBar class Components
Top app bars provide content and actions related to the current screen.
To create Extended, Centered, or Search app bars, use the respective constructors.
Widgetbook: https://zeta-ds.web.app/flutter/widgetbook/index.html#/?path=components/top-app-bar/default
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ZetaStatefulWidget
- ZetaTopAppBar
- Implemented types
- Available Extensions
Constructors
-
ZetaTopAppBar({Key? key, bool? rounded, List<
Widget> actions = const [], bool automaticallyImplyLeading = true, Widget? leading, Widget? title, TextStyle? titleTextStyle, ZetaTopAppBarType type = ZetaTopAppBarType.defaultAppBar, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') ValueChanged<String> ? onSearch, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') String? searchHintText, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') ZetaSearchController? searchController, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') VoidCallback? onSearchMicrophoneIconPressed}) -
Creates a ZetaTopAppBar.
const
-
ZetaTopAppBar.centered({Key? key, bool? rounded, List<
Widget> actions = const [], bool automaticallyImplyLeading = true, Widget? leading, Widget? title, TextStyle? titleTextStyle, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') ValueChanged<String> ? onSearch, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') String? searchHintText, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') ZetaSearchController? searchController, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') VoidCallback? onSearchMicrophoneIconPressed}) -
Creates a ZetaTopAppBar with centered title.
const
-
ZetaTopAppBar.extended({Key? key, bool? rounded, List<
Widget> actions = const [], bool automaticallyImplyLeading = true, Widget? leading, Widget? title, TextStyle? titleTextStyle, bool shrinks = true, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') ValueChanged<String> ? onSearch, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') String? searchHintText, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') ZetaSearchController? searchController, @Deprecated('Use ZetaTopAppBar.search instead. ' 'Deprecated as of 0.16.0') VoidCallback? onSearchMicrophoneIconPressed}) -
Creates a ZetaTopAppBar with an extended title over 2 lines.
const
-
ZetaTopAppBar.search({Key? key, bool? rounded, ZetaTopAppBarType type = ZetaTopAppBarType.defaultAppBar, bool automaticallyImplyLeading = true, ZetaSearchController? searchController, Widget? leading, Widget? title, TextStyle? titleTextStyle, ValueChanged<
String> ? onSearch, String? searchHintText, VoidCallback? onSearchMicrophoneIconPressed, List<Widget> actions = const [], String? clearSemanticLabel, String? microphoneSemanticLabel, String? searchSemanticLabel, String? searchBackSemanticLabel}) -
Creates a ZetaTopAppBar with an expanding search field.
This will append a search icon to the right of the app bar.
When the search icon is pressed, the search field will expand and replace the title widget.
It will replace the leading widget with a back button which closes the search field.
The search field can be controlled externally by the searchController.
const
Properties
-
actions
→ List<
Widget> -
A list of Widgets to display in a row after the title widget.
final
- automaticallyImplyLeading → bool
-
Configures whether the back button to be displayed.
final
- clearSemanticLabel → String?
-
The semantic label for the clear icon.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
Widget displayed first in the app bar row.
final
- microphoneSemanticLabel → String?
-
The semantic label for the microphone icon.
final
-
onSearch
→ ValueChanged<
String> ? -
Called when text in the search field is submitted.
final
- onSearchMicrophoneIconPressed → VoidCallback?
-
If omitted the microphone icon won't show up. Called when the icon button is pressed. Normally used for speech recognition/speech to text.
final
- preferredSize → Size
-
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
- rounded → bool?
-
Sets rounded or sharp border of the containing box and the icon style.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchBackSemanticLabel → String?
-
The semantic label for the back icon when search is open.
final
- searchController → ZetaSearchController?
-
Used to control the search textfield and states.
final
- searchHintText → String?
-
Label used as hint text. If null, displays 'Search'.
final
- searchSemanticLabel → String?
-
The semantic label for the search icon.
final
- shrinks → bool
-
If
ZetaTopAppBarType.extend
shrinks. Does not affect other types of app bar.final - title → Widget?
-
Title of the app bar.
final
- titleTextStyle → TextStyle?
-
AppBar titleTextStyle
final
- type → ZetaTopAppBarType
-
Defines the styles of the app bar.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ZetaTopAppBar> -
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.
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