-
-
Save harshsoni1110/f9d3c4110f16172c16a05eb8f6baa0f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part 'notification.g.dart'; | |
abstract class Notification | |
implements Built<Notification, NotificationBuilder> { | |
Notification._(); | |
factory Notification([updates(NotificationBuilder b)]) = _$Notification; | |
@nullable | |
String get notificationType; | |
@nullable | |
int get notificationId; | |
@nullable | |
String get notificationTitle; | |
@nullable | |
String get notificationBody; | |
String toJson() { | |
return json.encode(serializers.serializeWith(Notification.serializer, this)); | |
} | |
static Notification fromJson(String jsonString) { | |
return serializers.deserializeWith( | |
Notification.serializer, json.decode(jsonString)); | |
} | |
static Serializer<Notification> get serializer => _$notificationSerializer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment