Toast class
Constructors
- Toast()
-
factory
Properties
- globalBuildToastStyle ↔ BuildToastStyle?
-
构建toast样式,外部自定义方式
getter/setter pair
- globalPosition ↔ ToastPosition
-
显示位置
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- intervalTime ↔ int
-
两次toast的间隔时间
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showTime ↔ int
-
toast显示时间 单位 毫秒
getter/setter pair
Methods
-
initBaseStyle(
{EdgeInsetsGeometry? globalToastMargin, EdgeInsetsGeometry? globalToastPadding, AlignmentGeometry? globalToastAlignment, TextStyle? globalToastTextStyle, BoxDecoration? globalToastDecoration}) → void -
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 Properties
-
如果不关心,context调用,需在入口函数的 MaterialApp( navigatorKey: Toast.navigatorState ) 添加绑定
如果路由2.0 则使用 RouterDelegate 下面的 navigatorKey
final
Static Methods
-
cancel(
OverlayEntryManger? manger) → void -
cancelAll(
) → void - 取消toast 显示
-
show(
String msg, {BuildContext? context, BuildToastStyle? buildToastStyle, ToastPosition? position, int? showTime}) → Future< OverlayEntryManger?> - 显示一个吐司