copyWith method

JuzResult copyWith({
  1. int? juz,
  2. int? totalAyat,
  3. List<AyahWithSurah>? ayat,
  4. String? source,
})

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

Implementation

JuzResult copyWith({
  int? juz,
  int? totalAyat,
  List<AyahWithSurah>? ayat,
  String? source,
}) {
  return JuzResult(
    juz: juz ?? this.juz,
    totalAyat: totalAyat ?? this.totalAyat,
    ayat: ayat ?? this.ayat,
    source: source ?? this.source,
  );
}