MethodChannelDencendToast class
DencendToastPlatform 的方法通道实现 这是连接Flutter和原生平台的桥梁,负责调用各平台的原生Toast功能
方法通道(MethodChannel)允许Flutter代码与原生平台代码进行通信 每个平台(Android、iOS)都需要实现相应的原生代码来处理这些方法调用
- Inheritance
-
- Object
- PlatformInterface
- DencendToastPlatform
- MethodChannelDencendToast
Constructors
Properties
- channel → MethodChannel
-
与原生平台交互的方法通道
final
- 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
override
-
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 消息
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited