ToastUtils class
Name: 吐司工具类 基于 fluttertoast Created by Fitem on 2023/6/1
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 Properties
- toastBgColor ↔ Color
-
背景色
getter/setter pair
- toastFontSize ↔ double
-
字体大小
getter/setter pair
- toastTextColor ↔ Color
-
Text颜色
getter/setter pair
Static Methods
-
init(
{Color? bgColor, Color? textColor, double? fontSize}) → void -
初始化 Toast
bgColor背景色textColorText颜色fontSize字体大小 -
show(
String msg) → void -
显示底部的Toast
msg显示的内容 -
showCenter(
String msg) → void -
显示中间的Toast
msg显示的内容 -
showToast(
String msg, {FToast toast = FToast.lengthShort, FToastGravity gravity = FToastGravity.bottom, Color? bgColor, Color? textColor, double? fontSize}) → void -
显示的Toast
msg显示的内容toast显示的时间gravity显示的位置bgColor背景色textColorText颜色fontSize字体大小