ReferenceFormatter class final

Formats parsed references with localized book names.

Full names use the first nonempty registered name. Abbreviations use the shortest nonempty registered term, with registration order breaking ties. Formatting falls back to English when language is auto, the language has no registered data, or a particular book is missing from that data.

Constructors

ReferenceFormatter({BibleLanguageEnum language = BibleLanguageEnum.english, ReferenceBookNameStyle bookNameStyle = ReferenceBookNameStyle.long, bool compactRanges = true})
Creates a formatter with deterministic English defaults.
const

Properties

bookNameStyle → ReferenceBookNameStyle
Whether book names are written in long or short form.
final
compactRanges → bool
Whether repeated range components are omitted.
final
hashCode → int
The hash code for this object.
no setterinherited
language → BibleLanguageEnum
The requested output language.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

format(Reference reference) → String
Formats reference according to this formatter's options.
formatBookName(BibleBookEnum book) → String
Returns the localized display name for book.
formatPassage(Passage passage) → String
Formats a whole-book, chapter, verse-selection, or sequence passage.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited