DoctorDetailsState class
State class for the doctor details screen.
Holds all doctor data, filtered doctor data, date filters, loading and error states. Used by DoctorDetailsCubit to manage the UI state for doctor details.
Constructors
-
DoctorDetailsState.new({required List<
Document> allDoctors, required List<Document> filteredDoctors, required DateTime? fromDate, required DateTime? tillDate, required bool isLoading, required String? error}) -
Creates a DoctorDetailsState with the given values.
const
- DoctorDetailsState.initial()
-
Returns the initial state for doctor details.
factory
Properties
-
allDoctors
→ List<
Document> -
List of all doctor documents fetched from Appwrite.
final
- error → String?
-
Error message, if any, during data fetching or processing.
final
-
filteredDoctors
→ List<
Document> -
List of doctors after applying filters and search.
final
- fromDate → DateTime?
-
The start date filter for doctor data.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLoading → bool
-
Whether doctor data is currently being loaded.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - tillDate → DateTime?
-
The end date filter for doctor data.
final
Methods
-
copyWith(
{List< Document> ? allDoctors, List<Document> ? filteredDoctors, DateTime? fromDate, DateTime? tillDate, bool? isLoading, String? error}) → DoctorDetailsState - Returns a copy of this state with updated fields if provided.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited