AsukaMaterialBanner class

Defines the layout and behavior of a AsukaMaterialBanner.

For an example on how to use it, please check the example folder.

Inheritance

Constructors

AsukaMaterialBanner.alert(String content, {Key? key, double? width, double elevation = 2, Duration? duration = const Duration(seconds: 4)})
Creates a subclass of AsukaMaterialBanner called AsukaMaterialBanner.Alert passing the key, content, setting the color to Color(0xffFA5456) and the icon to Icons.report. This AsukaMaterialBanner was created to with the purpose of supply the user with an alert Snackbar.
factory
AsukaMaterialBanner.info(String content, {Key? key, List<Widget>? actions, double elevation = 2, Duration? duration = const Duration(seconds: 4)})
Creates a subclass of AsukaMaterialBanner called AsukaMaterialBanner.Info passing the key, content, setting the color to Color(0xff3196DA), an action and the icon to Icons.help. This AsukaMaterialBanner was created to with the purpose of supply the user with an info Snackbar.
factory
AsukaMaterialBanner.message(String content, {Key? key, double elevation = 2, Duration? duration = const Duration(seconds: 4)})
Creates a subclass of AsukaMaterialBanner called AsukaMaterialBanner.Message passing the key, content, setting the color to Color(0xff484848). This AsukaMaterialBanner was created to with the purpose of supply the user with a message Snackbar.
factory
AsukaMaterialBanner.success(String content, {Key? key, List<Widget>? actions, double elevation = 2, Duration? duration = const Duration(seconds: 4)})
Creates a subclass of AsukaMaterialBanner called AsukaMaterialBanner.Success passing the key, content, setting the color to Color(0xFF80AD49), an action and the icon to Icons.check_circle. This AsukaMaterialBanner was created to with the purpose of supply the user with a success Snackbar.
factory
AsukaMaterialBanner.warning(String content, {Key? key, double elevation = 2, Duration? duration = const Duration(seconds: 4)})
Creates a subclass of AsukaMaterialBanner called AsukaMaterialBanner.Warning passing the key, content, setting the color to Color(0xFFE6CA72) and the icon to Icons.warning. This AsukaMaterialBanner was created to with the purpose of supply the user with a warning Snackbar.
factory

Properties

actions List<Widget>
The set of actions that are displayed at the bottom or trailing side of the MaterialBanner.
finalinherited
animation Animation<double>?
The animation driving the entrance and exit of the material banner when presented by the ScaffoldMessenger.
finalinherited
backgroundColor Color?
The color of the surface of this MaterialBanner.
finalinherited
content Widget
The content of the MaterialBanner.
finalinherited
contentTextStyle TextStyle?
Style for the text in the content of the MaterialBanner.
finalinherited
dividerColor Color?
The color of the divider.
finalinherited
duration Duration?
final
elevation double?
The z-coordinate at which to place the material banner.
finalinherited
forceActionsBelow bool
An override to force the actions to be below the content regardless of how many there are.
finalinherited
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?
The (optional) leading widget of the MaterialBanner.
finalinherited
leadingPadding EdgeInsetsGeometry?
The amount of space by which to inset the leading widget.
finalinherited
margin EdgeInsetsGeometry?
Empty space to surround the MaterialBanner.
finalinherited
onVisible VoidCallback?
Called the first time that the material banner is visible within a Scaffold when presented by the ScaffoldMessenger.
finalinherited
overflowAlignment OverflowBarAlignment
The horizontal alignment of the actions when the actions laid out in a column.
finalinherited
padding EdgeInsetsGeometry?
The amount of space by which to inset the content.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowColor Color?
The color of the shadow below the MaterialBanner.
finalinherited
surfaceTintColor Color?
The color used as an overlay on backgroundColor to indicate elevation.
finalinherited

Methods

call() → void
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<MaterialBanner>
Creates the mutable state for this widget at a given 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
show() → void
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
withAnimation(Animation<double> newAnimation, {Key? fallbackKey}) MaterialBanner
Creates a copy of this material banner but with the animation replaced with the given animation.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited