CustomAppBar class

This is a custom app bar.

used to reduce the common widgets that are passed to the material appbar.

Inheritance
Implemented types

Constructors

CustomAppBar({Key? key, String? titleText, bool showTitle = false, bool showBackButton = false, bool showLeadingIcon = false, bool showTrailingIcon = false, Widget? trailingIcon, double elevation = 0, Function? onTrailingIconPressed, Widget? leadingIcon, Color? appBarColor, TextStyle? backTextStyle, TextStyle? titleTextStyle, Function? onLeadingIconPressed, bool closeOnRight = false, bool isDesktop = false, double toolbarHeight = 70})
const

Properties

appBarColor Color?
sets the appBar color.
final
backTextStyle TextStyle?
sets the textStyle for CLOSE text.
final
closeOnRight bool
This displays CLOSE instead of trailing icon.
final
elevation double
sets the appBar elevation.
final
hashCode int
The hash code for this object.
no setterinherited
isDesktop bool
If used in a desktop screen.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leadingIcon Widget?
takes in a leading widget.
final
onLeadingIconPressed Function?
defines the function to execute on press of leadingIcon.
final
onTrailingIconPressed Function?
defines the function to execute on press of trailingIcon.
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
showBackButton bool
This automatically implies leading functionality, with Icons.arrow_back if set to false it displays a CLOSE String instead of Icons.arrow_back.
final
showLeadingIcon bool
This toggles the visibility of CLOSE and Icons.arrow_back and displays the leadingIcon widget instead.
final
showTitle bool
This toggles the display of the center aligned title.
final
showTrailingIcon bool
This toggles the visibility of trailing icon, if set to false nothing is displayed.
final
titleText String?
A string to display the title of the appbar.
final
titleTextStyle TextStyle?
sets the textStyle for the titleText.
final
toolbarHeight double
Defines the height of the toolbar component of an CustomAppBar. By default, the value of toolbarHeight is 70pt
final
trailingIcon Widget?
takes in a trailing widget.
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.
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, int wrapWidth = 65}) 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