Files
flux/lib/features/notes/blocs/notes_state.dart

31 lines
675 B
Dart
Raw Normal View History

2026-05-30 18:06:43 +02:00
part of 'notes_cubit.dart';
2026-05-21 14:43:47 +02:00
enum NotesStatus { initial, loading, success, failure }
2026-05-30 18:06:43 +02:00
class NotesState extends Equatable {
2026-05-21 14:43:47 +02:00
final NotesStatus status;
final List<NoteModel> notes;
final String? errorMessage;
const NotesState({
this.status = NotesStatus.initial,
this.notes = const [],
this.errorMessage,
});
NotesState copyWith({
NotesStatus? status,
List<NoteModel>? notes,
String? errorMessage,
}) {
return NotesState(
status: status ?? this.status,
notes: notes ?? this.notes,
errorMessage: errorMessage ?? this.errorMessage,
);
}
@override
2026-05-30 18:06:43 +02:00
List<Object?> get props => [status, notes, errorMessage];
2026-05-21 14:43:47 +02:00
}