GFAppBar class

An app bar consists of a toolbar and potentially other widgets, such as a TabBar and a FlexibleSpaceBar. The GFAppBar displays the toolbar widgets, leading, title, and actions, above the bottom (if any). The bottom is usually used for a TabBar.

Inheritance
Implemented types

Constructors

GFAppBar({Key? key, Widget? leading, bool automaticallyImplyLeading = true, Widget? title, List<Widget>? actions, Widget? flexibleSpace, PreferredSizeWidget? bottom, double? elevation, ShapeBorder? shape, Color? backgroundColor, Brightness? brightness, IconThemeData? iconTheme, IconThemeData? actionsIconTheme, TextTheme? textTheme, bool primary = true, bool? centerTitle, double titleSpacing = NavigationToolbar.kMiddleSpacing, double toolbarOpacity = 1.0, double bottomOpacity = 1.0, bool searchBar = false, String searchHintText = 'Search...', TextStyle searchHintStyle = const TextStyle(color: Colors.white, fontSize: 14), TextStyle searchTextStyle = const TextStyle(color: Colors.white), Color searchBarColorTheme = Colors.white, TextEditingController? searchController, GestureTapCallback? onTap, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted})
Creates a material design app bar.

Properties

actions List<Widget>?
Widgets to display after the title widget.
final
actionsIconTheme IconThemeData?
The color, opacity, and size to use for the icons that appear in the app bar's actions. This should only be used when the actions should be themed differently than the icon that appears in the app bar's leading widget.
final
automaticallyImplyLeading bool
Controls whether we should try to imply the leading widget if null.
final
backgroundColor Color?
The color to use for the app bar's material. Typically this should be set along with brightness, iconTheme, textTheme.
final
bottom PreferredSizeWidget?
This widget appears across the bottom of the app bar.
final
bottomOpacity double
How opaque the bottom part of the app bar is.
final
brightness Brightness?
The brightness of the app bar's material. Typically this is set along with backgroundColor, iconTheme, textTheme.
final
centerTitle bool?
Whether the title should be centered.
final
elevation double?
The z-coordinate at which to place this app bar relative to its parent.
final
flexibleSpace Widget?
This widget is stacked behind the toolbar and the tab bar. It's height will be the same as the app bar's overall height.
final
hashCode int
The hash code for this object.
no setterinherited
iconTheme IconThemeData?
The color, opacity, and size to use for app bar icons. Typically this is set along with backgroundColor, brightness, textTheme.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
A widget to display before the title.
final
onChanged ValueChanged<String>?
Called when the user initiates a change to the TextField's value: when they have inserted or deleted text.
final
onSubmitted ValueChanged<String>?
Called when the user indicates that they are done editing the text in the field.
final
onTap GestureTapCallback?
Called for the first tap in a series of taps.
final
preferredSize Size
A size whose height is the sum of kToolbarHeight and the bottom widget's preferred height.
final
primary bool
Whether this app bar is being displayed at the top of the screen.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
If true, displays search bar in the title space
final
searchBarColorTheme Color
It defines the search bar icons color
final
searchController TextEditingController?
Controls the text being edited.
final
searchHintStyle TextStyle
It styles the searchHintText
final
searchHintText String
It takes text to displays the search bar hint text
final
searchTextStyle TextStyle
It styles the search text
final
shape ShapeBorder?
The material's shape as well its shadow.
final
textTheme TextTheme?
The typographic styles to use for text in the app bar. Typically this is set along with brightness backgroundColor, iconTheme.
final
title Widget?
The primary widget displayed in the app bar.
final
titleSpacing double
The spacing around title content on the horizontal axis. This spacing is applied even if there is no leading content or actions. If you want title to take all the space available, set this value to 0.0.
final
toolbarOpacity double
How opaque the toolbar part of the app bar is.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _GFAppBarState
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