FlJPush class
Constructors
- FlJPush()
-
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
-
addEventHandler(
{FlJPushEventHandler? eventHandler, FlJPushIOSEventHandler? iosEventHandler, FlJPushAndroidEventHandler? androidEventHandler}) → void - 初始化 JPush 必须先初始化才能执行其他操作(比如接收事件传递)
-
addTags(
List< String> tags) → Future<TagResultModel?> - 在原有 tags 的基础上添加 tags
-
applyAuthorityWithIOS(
[NotificationSettingsWithIOS iosSettings = const NotificationSettingsWithIOS()]) → Future< bool> - iOS Only 申请推送权限,注意这个方法只会向用户弹出一次推送权限请求(如果用户不同意,之后只能用户到设置页面里面勾选相应权限),需要开发者选择合适的时机调用。
-
cleanTags(
) → Future< TagResultModel?> - 清空所有 tags。
-
clearNotification(
{int? notificationId, bool delivered = true, bool clearLocal = false}) → Future< bool> -
清空通知栏上某个通知
notificationId
= null 清空通知栏上的所有通知。 -
deleteAlias(
) → Future< AliasResultModel?> - 删除原有 alias
-
deleteTags(
List< String> tags) → Future<TagResultModel?> - 删除指定的 tags
-
getAlias(
) → Future< AliasResultModel?> - 获取 alias.
-
getAllTags(
) → Future< TagResultModel?> - 获取所有当前绑定的 tags
-
getLaunchAppNotificationWithIOS(
) → Future< Map?> - iOS Only 点击推送启动应用的时候原生会将该 notification 缓存起来,该方法用于获取缓存 notification 注意:notification 可能是 remoteNotification 和 localNotification,两种推送字段不一样。 如果不是通过点击推送启动应用,比如点击应用 icon 直接启动应用,notification 会返回 @{}。
-
getRegistrationID(
) → Future< String?> - 获取 RegistrationId, JPush 可以通过制定 RegistrationId 来进行推送。
-
getUDIDWithAndroid(
) → Future< String?> - 获取UDID only android
-
isNotificationEnabled(
) → Future< bool?> - 检测通知授权状态是否打开
-
isPushStopped(
) → Future< bool?> - Push Service 是否已经被停止 only android
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openSettingsForNotification(
) → Future< bool> - 跳转至系统设置中应用设置界面
-
requestPermission(
) → Future< bool> - android 请求权限
-
resume(
) → Future< bool> - 恢复推送功能。
-
sendLocalNotification(
{required LocalNotificationWithAndroid android, required LocalNotificationWithIOS ios}) → Future< bool?> - 发送本地通知到调度器,指定时间出发该通知。
-
setAlias(
String alias) → Future< AliasResultModel?> - 重置 alias.
-
setBadge(
int badge) → Future< bool> - 设置应用 Badge(小红点) 清空应用Badge(小红点)设置 badge = 0 注意:如果是 Android 手机,目前仅支持华为手机
-
setTags(
List< String> tags) → Future<TagResultModel?> - 设置 Tag (会覆盖之前设置的 tags)
-
setup(
{required String appKey, bool production = false, String? channel = '', bool debug = false}) → Future< bool> -
stop(
) → Future< bool> - 停止接收推送,调用该方法后应用将不再受到推送,如果想要重新收到推送可以调用 resumePush。
-
toString(
) → String -
A string representation of this object.
inherited
-
validTag(
String tag) → Future< TagResultModel?> - 验证tag是否绑定
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited