double_to_words 0.0.4+1 copy "double_to_words: ^0.0.4+1" to clipboard
double_to_words: ^0.0.4+1 copied to clipboard

A Flutter package to convert numbers, including decimals, into readable words. Ideal for financial, educational, or accessibility-focused applications.

example/lib/main.dart

import 'package:double_to_words/double_to_words.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(
      title: 'double_to_words_example',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'double_to_words_example'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            Text(
              '102.00 in words :${DoubleToWords.convert(102.00)}',
            ),
            Text(
              '1234.56 in words :${DoubleToWords.convert(1234.56)}',
            ),
            Text(
              '0.99 in words :${DoubleToWords.convert(0.99)}',
            ),
            Text(
              '11 in words :${DoubleToWords.convert(11)}',
            ),
          ],
        ),
      ),
    );
  }
}
4
likes
160
points
8
downloads

Publisher

verified publisherfango.solutions

Weekly Downloads

A Flutter package to convert numbers, including decimals, into readable words. Ideal for financial, educational, or accessibility-focused applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on double_to_words