MiPush class

Constructors

MiPush()
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

clearLocalNotificationType(int notifyType) Future<void>
清除客户端设置的通知消息提醒类型
clearNotification(int? notifyId) Future<void>
清除小米推送弹出的通知
disablePush() Future<void>
禁用MiPush推送服务
enablePush() Future<void>
启用MiPush推送服务
getAllAlias() Future<List<String>>
客户端设置的别名列表
getAllTopic() Future<List<String>>
客户端订阅的主题列表
getAllUserAccount() Future<List<String>>
获取客户端所有设置的账号
getLogLevel() Future<LogLevel>
getRegId() Future<String>
获取当前设备的当前应用的唯一标识,后台可基于此标识发送通知
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pausePush([String? category]) Future<void>
暂停接收MSP服务推送的消息,扩展参数,暂时没有用途
registerPush(String appId, String appKey) Future<void>
注册MiPush推送服务
resumePush([String? category]) Future<void>
恢复接收MSP服务推送的消息,这时服务器会把暂停时期的推送消息重新推送过来, 扩展参数,暂时没有用途
setAlias(String alias, [String? category]) Future<void>
为指定用户设置alias,扩展参数,暂时没有用途
setLocalNotificationType(int notifyType) Future<void>
客户端设置通知消息的提醒类型。注:当服务端指定了消息的提醒类型,会优选考虑客户端设置的
setLogLevel(LogLevel level) Future<void>
setPushTime({required int startHour, int startMin = 0, required int endHour, int endMin = 0, String? category}) Future<void>
设置允许推送时间
setUserAccount(String userAccount, [String? category]) Future<void>
为指定用户设置userAccount, 扩展参数,暂时没有用途
subscribe(String topic, [String? category]) Future<void>
为指定用户设置订阅topic, 扩展参数,暂时没有用途
toString() String
A string representation of this object.
inherited
unregisterPush() Future<void>
关闭MiPush推送服务
unsetAlias(String alias, [String? category]) Future<void>
取消指定用户的alias,扩展参数,暂时没有用途
unsetUserAccount(String userAccount, [String? category]) Future<void>
取消指定用户的userAccount, 扩展参数,暂时没有用途
unsubscribe(String topic, [String? category]) Future<void>
取消指定用户的订阅topic, 扩展参数,暂时没有用途

Operators

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

Static Properties

instance MiPush
no setter