PlToast class

One message.

A description rather than a widget, and for a sharper reason than usual: the thing a caller has at the moment a toast is warranted is a callback, not a place in the tree. A widget with an open flag would be a piece of state per message, kept mounted forever, which is the shape this exists to avoid.

Annotations

Constructors

PlToast({String? id, Widget? title, Widget? description, Duration? timeout, PlToastPriority priority = PlToastPriority.low, Widget? actionLabel, VoidCallback? onAction, VoidCallback? onClose, PlassColor? color, PlassVariant? variant, Widget? icon, bool showIcon = true})
Creates a message.
const

Properties

actionLabel Widget?
The label of the action button. Passing it is what makes the button appear.
final
color PlassColor?
Semantic colour role. The provider's if it is left out.
final
description Widget?
The detail under it. A toast with only this is a one-line toast.
final
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
The glyph before the message. The severity's own mark if it is left out.
final
id String?
Names the toast.
final
onAction VoidCallback?
Called when that button is pressed.
final
onClose VoidCallback?
Called when the toast closes, however it closed.
final
priority PlToastPriority
How loudly it asks to be announced. It is announced either way.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showIcon bool
Draws a glyph at all.
final
timeout Duration?
How long before it takes itself away.
final
title Widget?
The headline.
final
variant PlassVariant?
What the toast is made of. The provider's if it is left out.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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