islamic_text 1.0.2 copy "islamic_text: ^1.0.2" to clipboard
islamic_text: ^1.0.2 copied to clipboard

A Flutter package for processing Islamic text, including ligature replacement and glyph rendering.

Islamic Text #

A Flutter widget to render Islamic phrases with compact ligatures and custom font.
This package replaces common phrases like "صلى الله عليه وسلم" with symbols such as "ﷺ" and paints them in a dedicated font. It is designed to be safe, performant, and extensible for future glyph rendering.

Features #

  • Replace Islamic phrases with compact ligatures
  • Render ligatures using a custom font
  • Configurable vertical offset for perfect alignment
  • Support for multi-line text and text styling
  • Safe fallback if the font is missing (Web or misconfigured apps)
  • Future-ready: can extend to glyph rendering and complex shaping
  • Fully reversible text encoding/decoding for serialization or testing

Preview #

Without IslamicText With IslamicText
[] []

Getting Started #

Prerequisites #

  • Flutter >= 3.7.0
  • Dart >= 3.0.0
  • Add the custom font as shown above

Installation #

Add to your pubspec.yaml:

dependencies:
  islamic_text: ^1.0.2

Then run:

flutter pub get

Add the islamic font loaded to your app entry point

import 'package:islamic_text/islamic_text.dart';

void main() async {
  ...
  await IslamicTextFontLoader.load();
  runApp(...);
}

Usage #

Simple Example #

import 'package:flutter/material.dart';
import 'package:islamic_text/islamic_text.dart';

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('IslamicText Example')),
      body: const Padding(
        padding: EdgeInsets.all(16),
        child: IslamicText(
          text: 'محمد صلى الله عليه وسلم',
          islamicVerticalOffset: -0.05,
        ),
      ),
    );
  }
}

Custom Styles #

IslamicText(
  text: 'محمد صلى الله عليه وسلم',
  normalTextStyle: TextStyle(fontSize: 18, color: Colors.black87),
  islamicTextStyle: TextStyle(fontSize: 20, color: Colors.green),
  islamicVerticalOffset: 0.0,
  textAlign: TextAlign.center,
)

The islamicVerticalOffset helps align the ligatures correctly with surrounding text.


Additional Information #

Contributing #

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request
  4. Include tests for new features

Issues #

  • File issues on GitHub
  • Include Flutter/Dart version and error details
  • Expect response within 1–3 business days

License #

MIT License. See LICENSE file.

0
likes
0
points
233
downloads

Publisher

verified publishertripletroop.com

Weekly Downloads

A Flutter package for processing Islamic text, including ligature replacement and glyph rendering.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on islamic_text