Skip to content

Commit d7b6604

Browse files
committed
Add new static methods
1 parent e8aa333 commit d7b6604

File tree

2 files changed

+136
-2
lines changed

2 files changed

+136
-2
lines changed

lib/api/model/notification_model.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import 'data_model.dart';
66
part 'notification_model.g.dart';
77
part 'notification_model.freezed.dart';
88

9+
NotificationModel notificationFromJson(Object? json) =>
10+
NotificationModel.fromJson(json as Map<String, dynamic>);
11+
12+
Map<String, dynamic> notificationModelToJson(NotificationModel item) => item.toJson();
13+
914
@freezed
1015
abstract class NotificationModel with _$NotificationModel, DataModel {
1116
const NotificationModel._(); // Add this private constructor

lib/api/model/notification_model.freezed.dart

Lines changed: 131 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)