bible_io 1.1.0 copy "bible_io: ^1.1.0" to clipboard
bible_io: ^1.1.0 copied to clipboard

Immutable, edition-aware Bible content and UI state for Dart, with validated JSON, multilingual references, navigation, metadata, and Unicode search.

example/bible_io_example.dart

import 'package:bible_io/bible_io.dart';

void main() {
  final bible = Bible.fromDecodedJson({
    'schemaVersion': 1,
    'language': 'English',
    'metadata': {
      'id': 'eng-example-1',
      'translationName': 'Example Translation',
      'abbreviation': 'EX',
      'languageCode': 'en',
    },
    'bookOrder': ['jo'],
    'books': {
      'jo': {
        'name': 'John',
        'chapters': {
          '3': {
            '16': {
              'text': 'For God so loved the world...',
              'paragraphStart': true,
            },
            '18': 'Whoever believes is not condemned...',
          },
        },
      },
    },
  });

  final verse = bible.getVerseByRef('John 3:16');
  print('${verse.reference} - ${verse.text}');

  final persistedKey = BibleVerseKey.fromVerse(
    bible.metadata.id!,
    verse,
  ).toJson();
  print('Stable UI key: $persistedKey');

  final passage = bible.getPassage('John 3:16,18');
  print('Selected ${passage.length} verses from ${bible.abbreviation}.');

  final search = bible.searchWithOptions(
    'believes',
    SearchOptions(mode: SearchMode.exact, maxResults: 10),
  );
  for (final hit in search.hits) {
    print('${hit.reference}: ${hit.snippet}');
  }
}
0
likes
150
points
27
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Immutable, edition-aware Bible content and UI state for Dart, with validated JSON, multilingual references, navigation, metadata, and Unicode search.

Repository (GitHub)
View/report issues

Topics

#bible #scripture #text-processing #search #async

License

AGPL-3.0 (license)

Dependencies

bible_io_references, characters, unorm_dart

More

Packages that depend on bible_io