Implemented structure for push Notifications
This commit is contained in:
14
lib/storage/notification/notificationSettings.dart
Normal file
14
lib/storage/notification/notificationSettings.dart
Normal file
@ -0,0 +1,14 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'notificationSettings.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class NotificationSettings {
|
||||
bool askUsageDismissed;
|
||||
bool enabled;
|
||||
|
||||
NotificationSettings({required this.askUsageDismissed, required this.enabled});
|
||||
|
||||
factory NotificationSettings.fromJson(Map<String, dynamic> json) => _$NotificationSettingsFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$NotificationSettingsToJson(this);
|
||||
}
|
21
lib/storage/notification/notificationSettings.g.dart
Normal file
21
lib/storage/notification/notificationSettings.g.dart
Normal file
@ -0,0 +1,21 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'notificationSettings.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
NotificationSettings _$NotificationSettingsFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
NotificationSettings(
|
||||
askUsageDismissed: json['askUsageDismissed'] as bool,
|
||||
enabled: json['enabled'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$NotificationSettingsToJson(
|
||||
NotificationSettings instance) =>
|
||||
<String, dynamic>{
|
||||
'askUsageDismissed': instance.askUsageDismissed,
|
||||
'enabled': instance.enabled,
|
||||
};
|
Reference in New Issue
Block a user