numeric_to_word 0.0.2 copy "numeric_to_word: ^0.0.2" to clipboard
numeric_to_word: ^0.0.2 copied to clipboard

Numeric to word for English Lao Thai Chinese Vietnamese

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:numeric_to_word/numeric_to_word.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _controller = TextEditingController(text: '987654321');

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Numeric to Word Example'),
        ),
        body: 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)}'),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
1
likes
0
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

Numeric to word for English Lao Thai Chinese Vietnamese

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface, web

More

Packages that depend on numeric_to_word

Packages that implement numeric_to_word