Toast class
Reusable Toast alert / notification banner component for the Alter Design System.
Figma Specifications (Node 342:12219):
- Variants:
status=Neutral(342:12218): FillbaseBlack(#1E2939), Text & IcontextInverse(#FFFFFF)status=Gray(342:12220): FillbaseGray(#F9FAFB), Border 1pxstroke200(#E5E7EB), Text & IcontextPrimary(#000000)status=White(342:12224): FillbaseWhite(#FFFFFF), Border 1pxstroke100(#F3F4F6), Text & IcontextPrimary(#000000)status=Danger(342:12228): FillcolorsRed800(#9F0712), Text & IcontextInverse(#FFFFFF)status=Warning(342:12232): FillstatusWarning/colorsOrange800(#8A2C0D), Text & IcontextInverse(#FFFFFF)status=Caution(342:12236): FillstatusCaution/colorsYellow400(#FDC700), Text & IcontextPrimary(#000000)status=Success(342:12240): FillcolorsGreen800(#016630), Text & IcontextInverse(#FFFFFF)
- Dimensions: Width 320px, Padding 10px vertical, 12px horizontal
- Border Radius: 16px
- Gap: 4px between icon and feedback text
- Icon: 16x16px (default
Icons.error_outline) - Typography:
Body/caption-> AlterTypography.caption (Geist 12px, Regular 400, line-height 16px)
- Inheritance
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasIcon → bool
-
Whether the leading icon should be rendered.
final
- icon → IconData
-
Icon data for the leading status icon.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
Message string displayed in the toast.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → ToastStatus
-
Visual status theme variant of the toast.
final
- width → double?
-
Optional fixed width of the toast (defaults to 320.0).
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