DencendToastPlatform class abstract

DencendToast平台的抽象接口

定义了所有平台必须实现的Toast功能,遵循Flutter平台通道设计模式 平台接口允许统一调用不同平台的实现,提供一致的API

各平台实现类必须继承此类并实现抽象方法

Inheritance
  • Object
  • PlatformInterface
  • DencendToastPlatform
Implementers

Constructors

DencendToastPlatform()
构造函数

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
showToast({required String msg, Duration toastDuration = const Duration(seconds: 1), DencendToastGravity? gravity, ToastStyle? style}) Future<bool?>
显示Toast消息
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance DencendToastPlatform
获取当前平台实例
getter/setter pair