google_fonts_arabic 1.1.7 google_fonts_arabic: ^1.1.7 copied to clipboard
Arabic fonts by google right into your flutter application. Just import the fonts file and use the constant in example to browse the available fonts.
import 'package:flutter/material.dart';
import 'package:google_fonts_arabic/fonts.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHomePage(title: 'google_fonts_arabic_example'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"كيف حالك يا أخ العرب؟",
style: new TextStyle(
fontFamily: ArabicFonts.Cairo,
package: 'google_fonts_arabic',
fontSize: 25.0,
),
),
],
),
),
);
}
}