DeviceDetailsState class
State class for the device details screen.
Holds all device data, filtered device data, loading and error states, date filters, and search query. Used by DeviceDetailsCubit to manage the UI state for device details.
Constructors
-
DeviceDetailsState.new({required List<
Document> allDevices, required List<Document> filteredDevices, required bool isLoading, required String errorMessage, required DateTime? fromDate, required DateTime? tillDate, required String searchQuery}) - Creates a DeviceDetailsState with the given values.
- DeviceDetailsState.initial()
-
Returns the initial state for device details.
factory
Properties
-
allDevices
→ List<
Document> -
List of all device documents fetched from Appwrite.
final
- errorMessage → String
-
Error message, if any, during data fetching or processing.
final
-
filteredDevices
→ List<
Document> -
List of devices after applying filters and search.
final
- fromDate → DateTime?
-
The start date filter for device data.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLoading → bool
-
Whether device data is currently being loaded.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchQuery → String
-
The current search query for filtering devices.
final
- tillDate → DateTime?
-
The end date filter for device data.
final
Methods
-
copyWith(
{List< Document> ? allDevices, List<Document> ? filteredDevices, bool? isLoading, String? errorMessage, DateTime? fromDate, DateTime? tillDate, String? searchQuery}) → DeviceDetailsState - 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