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 json) => _$NotificationSettingsFromJson(json); Map toJson() => _$NotificationSettingsToJson(this); }