notes cubit

This commit is contained in:
2026-05-30 18:06:43 +02:00
parent b69308e1ef
commit 44c85766fc
7 changed files with 146 additions and 120 deletions

View File

@@ -1,8 +1,8 @@
part of 'notes_bloc.dart';
part of 'notes_cubit.dart';
enum NotesStatus { initial, loading, success, failure }
class NotesState {
class NotesState extends Equatable {
final NotesStatus status;
final List<NoteModel> notes;
final String? errorMessage;
@@ -26,14 +26,5 @@ class NotesState {
}
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is NotesState &&
other.status == status &&
listEquals(other.notes, notes) &&
other.errorMessage == errorMessage;
}
@override
int get hashCode => status.hashCode ^ notes.hashCode ^ errorMessage.hashCode;
List<Object?> get props => [status, notes, errorMessage];
}