NotificationSettings class

Model for notification settings.

Annotations
  • @JsonSerializable.new()

Constructors

NotificationSettings({required String title, required String body, String? stopButton, String? androidSnoozeButton, String? icon, Color? iconColor, bool keepNotificationAfterAlarmEnds = false, bool androidStopAlarmOnDismiss = true})
Constructs an instance of NotificationSettings.
const
NotificationSettings.fromJson(Map<String, dynamic> json)
Converts the JSON object to a NotificationSettings instance.
factory

Properties

androidSnoozeButton → String?
The text to display on the snooze button of the notification.
final
androidStopAlarmOnDismiss → bool
Whether swiping the notification away also stops the alarm.
final
body → String
Body of the notification to be shown when alarm is triggered.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → String?
The icon to display on the notification.
final
iconColor → Color?
The color of the notification icon.
final
keepNotificationAfterAlarmEnds → bool
Keeps the notification banner visible even after the alarm sound ends.
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stopButton → String?
The text to display on the stop button of the notification.
final
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
title → String
Title of the notification to be shown when alarm is triggered.
final

Methods

copyWith({String? title, String? body, String? stopButton, String? androidSnoozeButton()?, String? icon, Color? iconColor, bool? keepNotificationAfterAlarmEnds, bool? androidStopAlarmOnDismiss}) → NotificationSettings
Creates a copy of this notification settings but with the given fields replaced with the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts the NotificationSettings instance to a JSON object.
toString() → String
A string representation of this object.
inherited
toWire() → NotificationSettingsWire
Converts to wire datatype which is used for host platform communication.

Operators

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