flutter_currency_picker 1.4.1 copy "flutter_currency_picker: ^1.4.1" to clipboard
flutter_currency_picker: ^1.4.1 copied to clipboard

Currency Picker -- simple representation layer (double to formatted number), wrapper on top of SearchAnchor

Flutter Currency Picker #

Test Status Build Status

Wrapper on top of SearchAnchor with a localization (en, be, uk, pl, pt, fr, de) support.

Representation layer of conversion number to a currency as string. Native selector extension for Currency Selector with a dependency injection (list representation layer) approach, and localization support.

https://pub.dev/packages/flutter_currency_picker

Converter #

// locale 'en_US'
1234.5.toCurrency(code: 'EUR') // 1 234,50 €
1234.5.toCurrency(code: 'EUR', withPattern: false) // €1,234.50 

Currencies Localization #

// Init from context
CurrencyProvider.initFromContext(context);

// [OR] Inject your own
import 'package:flutter_gen/gen_l10n/app_localization_de.dart';
CurrencyDefaults.labels = AppLocalizationsDe();

Selector #

Currency? currency;

@override
Widget build(BuildContext context) {
  return CurrencySelector(
    value: currency?.code,
    hintText: 'Currency Type (Code)',
    hintStyle: Theme.of(context).textTheme.copyWith(
      color: textTheme.headlineSmall?.color!.withOpacity(0.4),
      overflow: TextOverflow.ellipsis,
    ),
    fieldBackground: Theme.of(context).colorScheme.onBackground.withOpacity(0.1),
    update: (value) => setState(() => currency = value),
  );
}

Selector Sample

In addition to thanking, you may treat us to ☕.

1
likes
140
pub points
69%
popularity

Publisher

verified publishertercad.com

Currency Picker -- simple representation layer (double to formatted number), wrapper on top of SearchAnchor

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

dart_intl_search, flutter, flutter_localizations, intl, shared_preferences

More

Packages that depend on flutter_currency_picker