MethodChannelHuaweiPush class
An implementation of HuaweiPushPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- HuaweiPushPlatform
- MethodChannelHuaweiPush
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
final
-
onBadgeCountChanged
→ Stream<
int> -
Badge数量变化流
no setteroverride
-
onMessageClicked
→ Stream<
HuaweiPushMessage> -
设置消息点击监听器
no setteroverride
-
onMessageReceived
→ Stream<
HuaweiPushMessage> -
设置推送消息监听器
no setteroverride
-
onTokenRefresh
→ Stream<
HuaweiPushToken> -
设置Token刷新监听器
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearBadge(
) → Future< bool> -
清除badge
override
-
createNotificationChannel(
{required String channelId, required String channelName, String? channelDescription, int? importance, bool? enableLights, bool? enableVibration, String? sound}) → Future< bool> -
设置通知渠道
override
-
decrementBadgeCount(
{int decrement = 1}) → Future< int> -
减少badge数量
override
-
deleteNotificationChannel(
String channelId) → Future< bool> -
删除通知渠道
override
-
deleteToken(
) → Future< bool> -
删除推送Token
override
-
getAAID(
) → Future< String?> -
获取AAID(匿名应用标识符)
override
-
getBadgeCount(
) → Future< int> -
获取当前badge数量
override
-
getCreationTime(
) → Future< String?> -
获取创建时间
override
-
getInitialMessage(
) → Future< HuaweiPushMessage?> -
获取初始消息(应用从推送通知启动时)
override
-
getODID(
) → Future< String?> -
获取ODID(开放设备标识符)
override
-
getPlatformVersion(
) → Future< String?> -
获取平台版本
override
-
getToken(
) → Future< String?> -
获取推送Token
override
-
incrementBadgeCount(
{int increment = 1}) → Future< int> -
增加badge数量
override
-
initialize(
) → Future< bool> -
初始化华为推送服务
override
-
isAutoInitEnabled(
) → Future< bool> -
检查自动初始化是否启用
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAutoInitEnabled(
bool enabled) → Future< bool> -
启用自动初始化
override
-
setBadgeCount(
int count) → Future< bool> -
设置应用图标badge数量
override
-
subscribe(
String topic) → Future< bool> -
订阅主题
override
-
toString(
) → String -
A string representation of this object.
inherited
-
unsubscribe(
String topic) → Future< bool> -
取消订阅主题
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited