copyWith method

VerseRef copyWith({
  1. BibleBookEnum? book,
  2. int? chapter,
  3. int? verse,
  4. String? subdivision,
  5. bool clearSubdivision = false,
})

Copies this verse, retaining its subdivision unless clearSubdivision is true or a replacement subdivision is supplied.

Implementation

VerseRef copyWith({
  BibleBookEnum? book,
  int? chapter,
  int? verse,
  String? subdivision,
  bool clearSubdivision = false,
}) =>
    VerseRef.checked(
      book: book ?? this.book,
      chapter: chapter ?? this.chapter,
      verse: verse ?? this.verse,
      subdivision: clearSubdivision ? null : subdivision ?? this.subdivision,
    );