FkToast class
依赖 fluttertoast: ^8.2.0 minSdkVersion 21 否则 报错 use a compatible library with a minSdk of at most 19,
Constructors
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
-
show(
String msg, {Toast? toastLength = Toast.LENGTH_SHORT, int timeInSecForIosWeb = 1, ToastGravity? gravity = ToastGravity.CENTER, Color? backgroundColor = Colors.grey, Color? textColor = Colors.white, double? fontSize = 16}) → void -
使用默认toast
msg
内容toastLength
显示时长timeInSecForIosWeb
gravity
弹出位置backgroundColor
背景色textColor
文字颜色fontSize
文字大小 -
showCustomToast(
BuildContext context, Widget child, {ToastGravity gravity = ToastGravity.CENTER, int toastDuration = 2}) → void -
自定义Toast样式
context
上下文,已经没用了gravity
弹出位置toastDuration
显示时长