isArabicText static method

bool isArabicText(
  1. String text
)

Validate Arabic text format (basic check for Arabic characters)

Implementation

static bool isArabicText(String text) {
  // Basic regex to check if text contains Arabic characters
  final arabicRegex = RegExp(
      r'[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]');
  return arabicRegex.hasMatch(text);
}