mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2024-12-18 12:34:29 -05:00
24 lines
600 B
Dart
24 lines
600 B
Dart
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'notifications_state.freezed.dart';
|
|
|
|
enum NotificationType {
|
|
info,
|
|
error,
|
|
}
|
|
|
|
@freezed
|
|
class NotificationItem with _$NotificationItem {
|
|
const factory NotificationItem(
|
|
{required NotificationType type,
|
|
required String text,
|
|
String? title}) = _NotificationItem;
|
|
}
|
|
|
|
@freezed
|
|
class NotificationsState with _$NotificationsState {
|
|
const factory NotificationsState({required IList<NotificationItem> queue}) =
|
|
_NotificationsState;
|
|
}
|