hadith 1.0.0 copy "hadith: ^1.0.0" to clipboard
hadith: ^1.0.0 copied to clipboard

This dart plugin provides access to the Hadith data offline.

example/hadith_example.dart

import 'package:hadith/hadith.dart';

void main() {
  // Get available collections
  print(getCollections());

  // Get a single collection
  print(getCollection(Collections.bukhari));

  // Get collection data
  print(getCollectionData(Collections.bukhari, Languages.en));

  // Get books of a collection
  print(getBooks(Collections.bukhari));

  // Get a single book
  print(getBook(Collections.bukhari, 1));

  // Get book data
  print(getBookData(Collections.bukhari, 1, Languages.en));

  // Get hadiths of a book
  print(getHadiths(Collections.bukhari, 1));

  // Get a single hadith
  print(getHadith(Collections.bukhari, 1, 1));

  // Get hadith data
  print(getHadithData(Collections.bukhari, 1, 1, Languages.en));

  // Get hadith data by hadith number
  print(getHadithDataByNumber(Collections.bukhari, '1', Languages.en));
  print(getHadithDataByNumber(Collections.muslim, '36 b', Languages.en));

  // Get collection URL
  print(getCollectionURL(Collections.bukhari));

  // Get book URL
  print(getBookURL(Collections.bukhari, 1));
}
18
likes
150
points
72
downloads

Publisher

verified publisheraqeelshamz.com

Weekly Downloads

This dart plugin provides access to the Hadith data offline.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

More

Packages that depend on hadith