copyWith method

OrganizationDetailsModel copyWith({
  1. List<Document>? organizations,
  2. int? deviceCount,
  3. int? motherCount,
  4. int? testCount,
  5. int? doctorCount,
})

Returns a copy of this model with updated fields if provided.

If a parameter is not provided, the current value is used.

Implementation

OrganizationDetailsModel copyWith({
  List<models.Document>? organizations,
  int? deviceCount,
  int? motherCount,
  int? testCount,
  int? doctorCount,
}) {
  return OrganizationDetailsModel(
    organizations: organizations ?? this.organizations,
    deviceCount: deviceCount ?? this.deviceCount,
    motherCount: motherCount ?? this.motherCount,
    testCount: testCount ?? this.testCount,
    doctorCount: doctorCount ?? this.doctorCount,
  );
}