copyWith method

DashboardState copyWith({
  1. String? userEmail,
  2. bool? isSidebarOpen,
  3. int? childIndex,
  4. int? organizationCount,
  5. int? deviceCount,
  6. int? motherCount,
  7. int? testCount,
})

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,
  );
}