Quran Controller

Pub Version Static Badge

Quran Controller that offering a Quran Verses With Quran font which is Called Uthmani script


Content

Installation

Add the package to your dependencies:

dependencies:
  quran_controller: ^1.6.7

OR

dependencies:
  quran_controller:
    git: https://github.com/hassony105/quran_controller.git

Finally, run dart pub get to download the package.

Projects using this library should use the stable channel of Flutter

Get Started

You must to initialize QuranController by calling await QuranController.instance.initializing(); because it takes a few seconds to load all verses.

Methods And Properties

Properties Type Description
initializing() Future<void> Required. initialize QuranController
gettingVersesByPageNumber(int pageNumber) List<Verse> Returns list of Verses filtered by page number
gettingVersesBySurahNumber(int surahNumber) Surah Returns Surah by given number
gettingVersesByJuzNumber(int juzNumber) Juz Returns Juz by given number
gettingVerseByVerseKey(String key) Verse Returns Verse by given key
search(String text) Future<List<Verse>> Returns list of Verses filtered by given text
getSurahName(int surahNumber) String Returns String from the charcode of surah name
instance QuranController An Instance of QuranController
allVerses List<Verse> A list of Verses that loaded after initializing
surahsDetails List<Surah> A list of Surahs that contains each Surah details
juzsDetails List<Juz> A list of Juzs that contains each Juz details
basmalaText String The unicode character of Basmala
surahText String The unicode character of "Surah" word
borderText String The unicode character of Border of Surah name
basmalaAndSurahsNameFontsFamily String The Font Family Basmala and Surahs names

How To Use

It is very simple to use, just like these examples:

Require: You must to use the fontFamily in TextStyle to get Quran styled text.

  • Basmala
Text(
    QuranController.instance.basmalaText,
    style: TextStyle(fontFamily: QuranController.instance.basmalaAndSurahsNameFontsFamily),
)

  • "Surah" Word
Text(
    QuranController.instance.surahText,
    style: TextStyle(fontFamily: QuranController.instance.basmalaAndSurahsNameFontsFamily),
)

  • Border
Text(
    QuranController.instance.borderText,
    style: TextStyle(fontFamily: QuranController.instance.basmalaAndSurahsNameFontsFamily),
)

  • Verse
Text(
    verse.fullVerse,
    style: TextStyle(fontFamily: verse.font),
)

Localization

Quran Controller package currently supports only Arabic language view.

Contribution

Feel free to file an issue if you find a problem or make pull requests.

All contributions are welcome :)