Files
Client/lib/storage/notification_settings.dart
T

19 lines
610 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'notification_settings.g.dart';
@JsonSerializable()
class NotificationSettings {
/// Whether push notifications are enabled. Defaults to `true` — the OS
/// permission prompt at login is now the gate, so there is no separate
/// in-app opt-in step anymore.
@JsonKey(defaultValue: true)
bool enabled;
NotificationSettings({this.enabled = true});
factory NotificationSettings.fromJson(Map<String, dynamic> json) =>
_$NotificationSettingsFromJson(json);
Map<String, dynamic> toJson() => _$NotificationSettingsToJson(this);
}