✨ Notification screen
This commit is contained in:
26
lib/types/notification.dart
Normal file
26
lib/types/notification.dart
Normal file
@ -0,0 +1,26 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'notification.freezed.dart';
|
||||
part 'notification.g.dart';
|
||||
|
||||
@freezed
|
||||
class SnNotification with _$SnNotification {
|
||||
const factory SnNotification({
|
||||
required int id,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
required DateTime? deletedAt,
|
||||
required String topic,
|
||||
required String title,
|
||||
required String? subtitle,
|
||||
required String body,
|
||||
@Default({}) Map<String, dynamic> metadata,
|
||||
required int priority,
|
||||
required int? senderId,
|
||||
required int accountId,
|
||||
required DateTime? readAt,
|
||||
}) = _SnNotification;
|
||||
|
||||
factory SnNotification.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnNotificationFromJson(json);
|
||||
}
|
Reference in New Issue
Block a user