copyWith method
Creates a copy of this Surah with the given fields replaced with new values
Implementation
Surah copyWith({
int? id,
String? name,
String? englishName,
String? revelationType,
int? numberOfAyahs,
int? revelationOrder,
List<Ayah>? ayat,
String? source,
}) {
return Surah(
id: id ?? this.id,
name: name ?? this.name,
englishName: englishName ?? this.englishName,
revelationType: revelationType ?? this.revelationType,
numberOfAyahs: numberOfAyahs ?? this.numberOfAyahs,
revelationOrder: revelationOrder ?? this.revelationOrder,
ayat: ayat ?? this.ayat,
source: source ?? this.source,
);
}