mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2024-10-01 06:55:46 -04: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;
|
|
}
|