copyWith method
Returns a copy of this state with updated fields if provided.
Implementation
DashboardState copyWith({
String? userEmail,
bool? isSidebarOpen,
int? childIndex,
int? organizationCount,
int? deviceCount,
int? motherCount,
int? testCount,
}) {
return DashboardState(
userEmail: userEmail ?? this.userEmail,
isSidebarOpen: isSidebarOpen ?? this.isSidebarOpen,
childIndex: childIndex ?? this.childIndex,
organizationCount: organizationCount ?? this.organizationCount,
deviceCount: deviceCount ?? this.deviceCount,
motherCount: motherCount ?? this.motherCount,
testCount: testCount ?? this.testCount,
);
}