NZToast class
NZToast 提示组件
模仿微信小程序风格设计,提供全局的轻量级反馈。 支持成功、错误、加载中、信息提示和纯文本五种模式。
Constructors
- NZToast()
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
-
error(
BuildContext context, String message) → void - 显示错误提示的快捷方法
-
hide(
) → void - 隐藏当前显示的 Toast
-
loading(
BuildContext context, String message) → void - 显示加载中提示的快捷方法(默认开启遮罩,需手动调用 hide 关闭)
-
show(
BuildContext context, {required String message, NZToastType type = NZToastType.text, Duration duration = const Duration(seconds: 2), bool mask = false}) → void - 显示 Toast 提示
-
success(
BuildContext context, String message) → void - 显示成功提示的快捷方法