ToastService class

Toast 服务 基于dencend_toast: ^0.0.1包实现

Constructors

ToastService()
工厂构造函数
factory

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

cancel() Future<bool?>
取消当前显示的所有Toast
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show({required String message, Duration duration = const Duration(seconds: 2), DencendToastGravity? position, ToastStyle? style}) Future<bool?>
显示基本Toast消息
showError({required String message, Duration duration = const Duration(seconds: 2), DencendToastGravity position = DencendToastGravity.top}) Future<bool?>
显示错误Toast
showInfo({required String message, Duration duration = const Duration(seconds: 2), DencendToastGravity position = DencendToastGravity.top}) Future<bool?>
显示信息Toast
showSuccess({required String message, Duration duration = const Duration(seconds: 2), DencendToastGravity position = DencendToastGravity.top}) Future<bool?>
显示成功Toast
showWarning({required String message, Duration duration = const Duration(seconds: 2), DencendToastGravity position = DencendToastGravity.top}) Future<bool?>
显示警告Toast
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited