SFLToast class

Constructors

SFLToast()

Properties

hashCode int
The hash code for this object.
no setterinherited
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

Static Methods

display({required BuildContext context, Widget? child, String? message, TextStyle? messageStyle, Color? messageContainerColor, Duration duration = const Duration(milliseconds: 3000), ToastDirection direction = ToastDirection.bottom, TextAlign textAlignment = TextAlign.center}) → void
Display Widget child or String message based on specified direction for specified duration Build Context context is required to be passed Either child or String message will be displayed and If both passed child will be displayed, for passed Duration() value to duration parameter. direction will define from where Widget needs to be displayed on the screen. Value ToastDirection.top will display from top & ToastDirection.bottom will display from bottom. Passing TextStyle value to messageTextStyle will be used to style passed String message & override default TextStyle specified for it. Color value to messageContainerColor will take effect only when String message is passed & override default backgroundColor specified for it. Default color is Theme.of(context).primaryColorDark. textAlign will handle alignment of message displayed in Toast.