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 - 图标与文本的间距