getBookNames static method

Map<String, String> getBookNames(
  1. dynamic book
)

Returns the osis, abbr, name, and short versions of a book title.

Implementation

static Map<String, String> getBookNames(dynamic book) {
  if (book is String) {
    book = findBookNumber(book);
  }
  if (book is! int) {
    return {};
  }
  var list = BibleData.bookNames[book - 1];
  return {
    'osis': list[0],
    'abbr': list[1],
    'name': list[2],
    'short': list[3]
  };
}