notes cubit
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user