FToast class
帮助开发者创建灵活的,简洁的,精美的 Toast
Help developers create flexible, concise and beautiful Toast
e.g.:
FToast.toast(context, msg: "Hi, FWidget");
Constructors
- FToast()
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
-
toast(
BuildContext context, {Widget? toast, String msg = "", TextStyle? msgStyle, String? subMsg, TextStyle? subMsgStyle, double subMsgSpace = 12.0, double corner = 6.0, Color color = Colors.black54, int duration = 1800, EdgeInsets padding = const EdgeInsets.only(left: 16.0, right: 16.0, top: 16.0, bottom: 16.0), Widget? image, AxisDirection imageDirection = AxisDirection.up, double imageSpace = 9.0}) → dynamic -
context
- 页面环境 toast - 自定义 toast 视图,会覆盖默认视图msg
- 主信息msgStyle
- 主信息文本样式subMsg
- 副信息subMsgStyle
- 副信息文本样式subMsgSpace
- 副信息与主信息的间距corner
- 边角color
- 颜色duration
- 展示时长padding
- 内间距image
- 图标imageDirection
- 图标相对文本的位置imageSpace
- 图标与文本的间距