kashida 0.1.2 copy "kashida: ^0.1.2" to clipboard
kashida: ^0.1.2 copied to clipboard

Flutter kashida (tatweel) for Arabic and Syriac: find insertion points and justify text with KashidaText, layoutParagraphStyled, and TextWidthCache.

example/kashida_example.dart

/// Minimal example for [package:kashida](https://pub.flutter-io.cn/packages/kashida).
///
/// For the full interactive demo (fonts, justify / find / rules tabs):
/// `cd example && flutter run`
library;

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

void main() {
  final set = requiredBuiltinPatternSet('arabic-naskh');

  // Find points and insert a fixed count (not line justification).
  final found = findKashidaPoints('بيت', set);
  for (final point in found.points) {
    debugPrint('${point.priority} @ grapheme ${point.index}');
  }
  debugPrint(insertKashida('بيت', set));

  runApp(
    MaterialApp(
      home: Scaffold(
        body: Padding(
          padding: const EdgeInsets.all(16),
          child: KashidaText(
            'بسم الله الرحمن الرحيم',
            patternSet: set,
            width: 280,
            style: const TextStyle(fontSize: 22),
            // justifyLastLine: true,
          ),
        ),
      ),
    ),
  );
}
1
likes
160
points
230
downloads

Documentation

API reference

Publisher

verified publisherbaselhadrous.com

Weekly Downloads

Flutter kashida (tatweel) for Arabic and Syriac: find insertion points and justify text with KashidaText, layoutParagraphStyled, and TextWidthCache.

Repository (GitHub)
View/report issues

Topics

#arabic #rtl #i18n #text #unicode

License

MIT (license)

Dependencies

flutter, kashida_core

More

Packages that depend on kashida