OptimusBanner class
Contextual banners display a notification relevant to a specific part of the system.
They appear at the top of the page or section they apply to, but always below the page header or navigation. They don't cover content, but push it down.
At its most basic, the component is comprised of a background layer (colored according to the meaning of the message) and text; other elements (left icon, description, link, close icon) are optional.
A banner always takes the full width of the component it is within.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- OptimusBanner
Constructors
- OptimusBanner({Key? key, required Widget title, OptimusFeedbackVariant variant = OptimusFeedbackVariant.info, bool hasIcon = false, Widget? description, bool isDismissible = false, VoidCallback? onDismiss})
-
const
Properties
- description → Widget?
-
Banner's description rendered as a second line.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasIcon → bool
-
If
true
the icon will be displayed. Which icon is used depends on variant.final - isDismissible → bool
-
If
true
close button will be rendered as well.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onDismiss → VoidCallback?
-
Called when close button is pressed (if isDismissible == true).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → Widget
-
The title of the banner.
final
- variant → OptimusFeedbackVariant
-
Variant of the banner which determines background color and icon
(if hasIcon == true).
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}) → 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