arabic_font 0.0.9 arabic_font: ^0.0.9 copied to clipboard
Flutter package allows you to add arabic fonts in your flutter projects
import 'package:arabic_font/arabic_font.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
fontFamily:
ArabicThemeData.font(arabicFont: ArabicFont.dinNextLTArabic),
package: ArabicThemeData.package,
primarySwatch: Colors.blue,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('خط عربي'),
),
body: const Center(
child: Text(
'تجربة الخط',
style: ArabicTextStyle(
arabicFont: ArabicFont.dinNextLTArabic, fontSize: 25),
),
),
);
}
}