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

A ready-to-use currency picker dialog with world currencies, symbols and flags.

example/lib/main.dart

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

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Currency Selector Test',
      home: const MyHomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Currency Selector Example')),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              onPressed: () async {
                await showCurrencySelectorDialog(
                  context: context,
                  title: 'Pick a currency',
                  primaryColor: Colors.blue,
                  selectedCurrency: 'USD'
                );
              },
              child: const Text('Show Dialog'),
            ),
            const SizedBox(height: 20),
            ElevatedButton(
              onPressed: () async {
                await showCurrencySelectorBottomSheet(
                  context: context,
                  title: 'Pick a currency',
                  primaryColor: Colors.green
                );
              },
              child: const Text('Show Bottom Sheet'),
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
160
points
162
downloads

Publisher

unverified uploader

Weekly Downloads

A ready-to-use currency picker dialog with world currencies, symbols and flags.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on currency_selector