PaymentBanner class
Inline message for errors, warnings and explanations.
One anatomy in every tone (D48a): the 20 dp tone icon centres on the title's first line; title, message and actions share one text column (title → message 4, message → actions 8); the close button centres on the first line and its 48 dp target overlaps the 12 dp padding, so a dismissible banner is as tall as the same banner without close.
Actions are at most one hug secondary PaymentButton (an operation such as "Try again", drawn small) plus at most one PaymentLink (navigation such as "Review total"), never two buttons of equal weight.
A banner about a changed payment amount states old → new and has no onDismiss while the payment is open (D48), like a danger banner that blocks the flow.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PaymentBanner
Constructors
-
PaymentBanner({Key? key, required StatusTone tone, required String title, String? message, IconData? icon, List<
Widget> actions = const [], bool announce = false, VoidCallback? onDismiss}) -
const
Properties
-
actions
→ List<
Widget> -
At most one hug secondary PaymentButton plus one PaymentLink.
final
- announce → bool
-
Announces the banner to screen readers when it appears.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
Default trigger glyph.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- message → String?
-
Optional explanation.
final
- onDismiss → VoidCallback?
-
Shows Hide banner; reports at most once. The host removes the banner.
Leave it null on a changed-amount banner while the payment is open.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
Visible banner heading.
final
- tone → StatusTone
-
Semantic message tone.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< PaymentBanner> -
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, 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