ToastLocation enum

Screen position enumeration for toast notification placement.

ToastLocation defines six standard positions around the screen edges where toast notifications can appear. Each location includes alignment information for both the toast container and the stacking direction of multiple toasts.

The enum ensures consistent positioning behavior across different screen sizes and orientations while providing intuitive placement options for various UI patterns and user experience requirements.

Inheritance
Available extensions

Values

topLeft → const ToastLocation

Top-left corner with downward stacking.

Toasts appear in the top-left area with new toasts stacking below existing ones. Suitable for notifications that shouldn't interfere with main content areas.

const ToastLocation(childrenAlignment: Alignment.bottomCenter, alignment: Alignment.topLeft)
topCenter → const ToastLocation

Top-center with downward stacking.

Toasts appear centered at the top with new toasts stacking below existing ones. Ideal for important notifications that need prominent visibility.

const ToastLocation(childrenAlignment: Alignment.bottomCenter, alignment: Alignment.topCenter)
topRight → const ToastLocation

Top-right corner with downward stacking.

Toasts appear in the top-right area with new toasts stacking below existing ones. Common choice for status updates and non-critical notifications.

const ToastLocation(childrenAlignment: Alignment.bottomCenter, alignment: Alignment.topRight)
bottomLeft → const ToastLocation

Bottom-left corner with upward stacking.

Toasts appear in the bottom-left area with new toasts stacking above existing ones. Useful for contextual actions and secondary notifications.

const ToastLocation(childrenAlignment: Alignment.topCenter, alignment: Alignment.bottomLeft)
bottomCenter → const ToastLocation

Bottom-center with upward stacking.

Toasts appear centered at the bottom with new toasts stacking above existing ones. Popular for confirmation messages and user action feedback.

const ToastLocation(childrenAlignment: Alignment.topCenter, alignment: Alignment.bottomCenter)
bottomRight → const ToastLocation

Bottom-right corner with upward stacking.

Toasts appear in the bottom-right area with new toasts stacking above existing ones. Default location providing unobtrusive notification placement.

const ToastLocation(childrenAlignment: Alignment.topCenter, alignment: Alignment.bottomRight)

Properties

alignment AlignmentGeometry
The alignment of the toast container within the screen.
final
childrenAlignment AlignmentGeometry
The alignment direction for stacking multiple toast notifications.
final
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Constants

values → const List<ToastLocation>
A constant List of the values in this enum, in order of their declaration.