NumberConverterCallback typedef

NumberConverterCallback = String Function(String text, {String? languageCode})

A class that provides utility functions for interacting with the Quran library.

This class includes methods and properties that facilitate various operations related to the Quran, such as retrieving verses, chapters, and other relevant information.

Example usage:

QuranLibrary quranLibrary = QuranLibrary();
// Use quranLibrary to access various Quran-related utilities.

Note: Ensure that you have the necessary dependencies and configurations set up in your Flutter project to use this class effectively. A callback type for custom number conversion.

text is the original string containing numbers to convert. languageCode is the optional language code for the target numeral system.

Example:

await QuranLibrary.init(
  numberConverter: (text, {languageCode}) {
    return myCustomNumberConvert(text, lang: languageCode);
  },
);

Implementation

/// A callback type for custom number conversion.
///
/// [text] is the original string containing numbers to convert.
/// [languageCode] is the optional language code for the target numeral system.
///
/// Example:
/// ```dart
/// await QuranLibrary.init(
///   numberConverter: (text, {languageCode}) {
///     return myCustomNumberConvert(text, lang: languageCode);
///   },
/// );
/// ```
typedef NumberConverterCallback = String Function(
  String text, {
  String? languageCode,
});