copyWith method
Implementation
DataSource copyWith({
String? dataKey,
FakerXLocale? locale,
List<Format>? formats,
List<String>? values,
Function? builder,
}) {
if (this is StringDataSource) {
return (this as StringDataSource)._copyWith(
dataKey: dataKey,
locale: locale,
formats: formats,
values: values,
builder: builder,
);
} else if (this is TypeDataSource) {
return (this as TypeDataSource)._copyWith(
dataKey: dataKey,
locale: locale,
values: values,
builder: builder,
);
}
throw Exception('could not clone the DataSource, Unknown Type');
}