DashboardState class
State class for the dashboard screen.
Holds user email, sidebar state, selected child index, and statistics for organizations, devices, mothers, and tests. Used by DashboardCubit to manage dashboard UI state.
- Annotations
Constructors
- DashboardState.new({required String userEmail, required bool isSidebarOpen, required int childIndex, required int organizationCount, required int deviceCount, required int motherCount, required int testCount})
-
Creates a DashboardState with the given values.
const
Properties
- childIndex → int
-
The index of the currently selected child widget.
final
- deviceCount → int
-
The number of devices.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSidebarOpen → bool
-
Whether the sidebar is open.
final
- motherCount → int
-
The number of mothers.
final
- organizationCount → int
-
The number of organizations.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- testCount → int
-
The number of tests.
final
- userEmail → String
-
The email address of the current user.
final
Methods
-
copyWith(
{String? userEmail, bool? isSidebarOpen, int? childIndex, int? organizationCount, int? deviceCount, int? motherCount, int? testCount}) → DashboardState - 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