MotherDetailsState class

State class for the mother details screen.

Holds all mother data, filtered mother data, date filters, search query, loading and error states. Used by MotherDetailsCubit to manage the UI state for mother details.

Inheritance
Annotations

Constructors

MotherDetailsState.new({List<Document> allMothers = const [], List<Document> filteredMothers = const [], DateTime? fromDate, DateTime? tillDate, String searchQuery = '', bool isLoading = false, String? errorMessage})
Creates a MotherDetailsState with the given values.
const

Properties

allMothers List<Document>
List of all mother documents fetched from Appwrite.
final
errorMessage String?
Error message, if any, during data fetching or processing.
final
filteredMothers List<Document>
List of mothers after applying filters and search.
final
fromDate DateTime?
The start date filter for mother data.
final
hashCode int
The hash code for this object.
no setterinherited
isLoading bool
Whether mother 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
searchQuery String
The current search query for filtering mothers.
final
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 mother data.
final

Methods

copyWith({List<Document>? allMothers, List<Document>? filteredMothers, DateTime? fromDate, bool clearFromDate = false, DateTime? tillDate, bool clearTillDate = false, String? searchQuery, bool? isLoading, String? errorMessage, bool clearError = false}) MotherDetailsState
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