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