numeric_to_word
Numeric to word for English Lao Thai Chinese Vietnamese
install with flutter
flutter pub add numeric_to_word
Then You have to import the package to your project
import 'package:numeric_to_word/numeric_to_word.dart';
Usage
//English
NumericToWord.numericToEnglish('987654321');
//Lao
NumericToWord.numericToLao('987654321');
//Thai
NumericToWord.numericToThai('987654321');
//Vietnamese
NumericToWord.numericToVietnamese('987654321');
//Chinese
NumericToWord.numericToChinese('987654321');
Please find the example Code:
Center(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
TextField(
controller: _controller,
onChanged: (value) {
setState(() {
// _controller.text = value;
});
},
keyboardType: TextInputType.number,
decoration:
const InputDecoration(label: Text('Input number'))),
SelectableText(
'English: ${NumericToWord.numericToEnglish(_controller.text)}'),
SelectableText(
'Lao: ${NumericToWord.numericToLao(_controller.text)}'),
SelectableText(
'Thai: ${NumericToWord.numericToThai(_controller.text)}'),
SelectableText(
'Vietnamese: ${NumericToWord.numericToVietnamese(_controller.text)}'),
SelectableText(
'Chinese: ${NumericToWord.numericToChinese(_controller.text)}'),
],
),
),
)