AlarmNotification class
The purpose of this class is to show a notification to the user when the alarm rings so the user can understand where the audio comes from. He also can tap the notification to open directly the app.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- localNotif → FlutterLocalNotificationsPlugin
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
int id) → Future< void> - Cancels notification. Called when the alarm is cancelled or when an alarm is overriden.
-
init(
) → Future< void> - Adds configuration for local notifications and initialize service.
-
nextInstanceOfTime(
Time time) → TZDateTime -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestPermission(
) → Future< bool> - Shows notification permission request.
-
scheduleAlarmNotif(
{required int id, required DateTime dateTime, required String title, required String body}) → Future< void> -
Schedules notification at the given
dateTime
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → AlarmNotification
-
final