number_to_word_arabic 0.0.8 number_to_word_arabic: ^0.0.8 copied to clipboard
A new Flutter package that allows converting Integer number to Arabic word, it supports numbers up to 99 Trillion.
import 'package:flutter/material.dart';
import 'package:number_to_word_arabic/number_to_word_arabic.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
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(
'1397 تعنى : ${Tafqeet.convert('1397')}',
//الف وثلاثمائة وسبعة وتسعون
textDirection: TextDirection.rtl,
style: Theme.of(context).textTheme.headline6,
),
],
),
),
);
}
}