copyWith method

AyahRange copyWith({
  1. Surah? surah,
  2. AyahRangeInfo? range,
  3. List<Ayah>? ayat,
  4. String? source,
})

Creates a copy of this AyahRange with the given fields replaced with new values

Implementation

AyahRange copyWith({
  Surah? surah,
  AyahRangeInfo? range,
  List<Ayah>? ayat,
  String? source,
}) {
  return AyahRange(
    surah: surah ?? this.surah,
    range: range ?? this.range,
    ayat: ayat ?? this.ayat,
    source: source ?? this.source,
  );
}