ToastUtils class

Name: 吐司工具类 基于 fluttertoast Created by Fitem on 2023/6/1

Constructors

ToastUtils()

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 背景色 textColor Text颜色 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 背景色 textColor Text颜色 fontSize 字体大小