HuaweiPushPlatform class abstract

Inheritance
  • Object
  • PlatformInterface
  • HuaweiPushPlatform
Implementers

Constructors

HuaweiPushPlatform()
Constructs a HuaweiPushPlatform.

Properties

hashCode int
The hash code for this object.
no setterinherited
onBadgeCountChanged Stream<int>
Badge数量变化流
no setter
onMessageClicked Stream<HuaweiPushMessage>
设置消息点击监听器
no setter
onMessageReceived Stream<HuaweiPushMessage>
设置推送消息监听器
no setter
onTokenRefresh Stream<HuaweiPushToken>
设置Token刷新监听器
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearBadge() Future<bool>
清除badge
createNotificationChannel({required String channelId, required String channelName, String? channelDescription, int? importance, bool? enableLights, bool? enableVibration, String? sound}) Future<bool>
设置通知渠道
decrementBadgeCount({int decrement = 1}) Future<int>
减少badge数量
deleteNotificationChannel(String channelId) Future<bool>
删除通知渠道
deleteToken() Future<bool>
删除推送Token
getAAID() Future<String?>
获取AAID(匿名应用标识符)
getBadgeCount() Future<int>
获取当前badge数量
getCreationTime() Future<String?>
获取创建时间
getInitialMessage() Future<HuaweiPushMessage?>
获取初始消息(应用从推送通知启动时)
getODID() Future<String?>
获取ODID(开放设备标识符)
getPlatformVersion() Future<String?>
获取平台版本
getToken() Future<String?>
获取推送Token
incrementBadgeCount({int increment = 1}) Future<int>
增加badge数量
initialize() Future<bool>
初始化华为推送服务
isAutoInitEnabled() Future<bool>
检查自动初始化是否启用
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAutoInitEnabled(bool enabled) Future<bool>
启用自动初始化
setBadgeCount(int count) Future<bool>
设置应用图标badge数量
subscribe(String topic) Future<bool>
订阅主题
toString() String
A string representation of this object.
inherited
unsubscribe(String topic) Future<bool>
取消订阅主题

Operators

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

Static Properties

instance HuaweiPushPlatform
The default instance of HuaweiPushPlatform to use.
getter/setter pair