OrganizationState class

State class for the organization details screen.

Holds all organization data, filtered organization data, status, date filters, search query, and error state. Used by OrganizationCubit to manage the UI state for organization details.

Inheritance

Constructors

OrganizationState.new({List<OrganizationDetailsModel> organizationDetails = const [], List<OrganizationDetailsModel> filteredOrganizationDetails = const [], OrganizationStatus status = OrganizationStatus.initial, DateTime? fromDate, DateTime? tillDate, String searchQuery = '', String? errorMessage, String? selectedCity, String? selectedState, String? selectedType, String? selectedDesignation})
Creates an OrganizationState with the given values.

Properties

errorMessage String?
Error message, if any, during data fetching or processing.
final
filteredOrganizationDetails List<OrganizationDetailsModel>
List of organizations after applying filters and search.
final
fromDate DateTime?
The start date filter for organization data.
final
hashCode int
The hash code for this object.
no setterinherited
organizationDetails List<OrganizationDetailsModel>
List of all organization details models fetched from Appwrite.
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 organizations.
final
selectedCity String?
final
selectedDesignation String?
final
selectedState String?
final
selectedType String?
final
status OrganizationStatus
The current status of the organization data (loading, loaded, etc.).
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 organization data.
final

Methods

copyWith({List<OrganizationDetailsModel>? organizationDetails, List<OrganizationDetailsModel>? filteredOrganizationDetails, OrganizationStatus? status, DateTime? fromDate, bool clearFromDate = false, DateTime? tillDate, bool clearTillDate = false, String? searchQuery, String? errorMessage, bool clearError = false, String? selectedState, String? selectedCity, String? selectedType, String? selectedDesignation}) OrganizationState
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