money_to_text 1.0.1 copy "money_to_text: ^1.0.1" to clipboard
money_to_text: ^1.0.1 copied to clipboard

It converts any double variable you send with this dart package to text as money

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Money Text Demo',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const HomePage(),
    );
  }
}

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

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  String moneyText = "";
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Money to Text")),
      body: Padding(
        padding: const EdgeInsets.symmetric(horizontal: 40),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            TextField(
              onChanged: (value) {
                Future.microtask(() {
                  setState(() {
                    moneyText = moneyToText(value, unit: "₺", lang: "tr");
                    debugPrint(moneyText);
                  });
                });
              },
            ),
            const SizedBox(height: 20),
            Text(moneyText),
          ],
        ),
      ),
    );
  }
}
6
likes
0
pub points
0%
popularity

Publisher

verified publisherahmetveysel.com

It converts any double variable you send with this dart package to text as money

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

More

Packages that depend on money_to_text