LocalNotification class

Class for handling LocalPush notifications.

Notification can be set by addSchedule. removeSchedule allows you to remove a notification you have set.

Various settings can be overridden by passing adapter. If this is not used, LocalNotificationMasamuneAdapter.primary is used.

LocalPush通知を取り扱うためのクラス。

addScheduleで通知の設定が可能です。removeScheduleで設定した通知を削除することが可能です。

adapterを渡すことで各種設定を上書きすることができます。これが利用されない場合はLocalNotificationMasamuneAdapter.primaryが利用されます。

Inheritance

Constructors

LocalNotification({LocalNotificationMasamuneAdapter? adapter})
Class for handling LocalPush notifications.

Properties

adapter LocalNotificationMasamuneAdapter
TAdapter to be used.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
listening bool
Returns true if notification receipt has been initiated.
no setter
Callback when the URL is launched.
no setter
primaryAdapter LocalNotificationMasamuneAdapter
Specifies the default TAdapter if adapter is Null.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value NotificationValue?
The content of the most recent notice received.
no setteroverride

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addSchedule(String uid, {required DateTime time, required String title, required String text, int? badgeCount, LocalNotificationRepeatSettings repeat = LocalNotificationRepeatSettings.none, NotificationSound sound = NotificationSound.none, DynamicMap? data, Uri? link}) Future<void>
Add a schedule.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
listen({FutureOr<void> onLink(Uri? link)?}) Future<void>
Start receiving notifications.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeAllSchedule() Future<void>
Remove all schedules.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeSchedule(String uid) Future<void>
Remove the schedule.
setValueInternal(NotificationValue? value) → void
Set method is used to update the current state.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

query → const _$LocalNotificationQuery
Query for Picker.
schedule → const _$LocalNotificationSchedule
Model for Schedule.