Skip to content
pubscout

currency_code_to_currency_symbol

0.0.4, released 3 years ago by an unverified publisher

Converts currency codes to their corresponding currency symbols in Flutter applications.

WASM-ready
$ flutter pub add currency_code_to_currency_symbol
Source repository

What it does

Provides functions and widgets to map currency codes like USD and EUR to their symbols such as $ and €. It supports over 100 currencies and includes enums for type-safe handling.

AI-written summary of version 0.0.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display currency symbols based on standard currency codes in your UI
  • You want type-safe currency handling using provided enums

Skip it when

  • You need full internationalized currency formatting including locale-specific number formatting
  • You require currency conversion rates or financial transaction features

Strengths

  • Supports over 100+ currencies
  • Includes both a utility function returning a string and a customizable widget
  • Supports type-safe currency code handling using enums

Weaknesses

  • Does not handle full locale-aware currency and number formatting
  • Limited feature set beyond basic code-to-symbol mapping

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

none

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: CurrencyToSymbolWidget(
            currencyCode: 'USD',
            textStyle: TextStyle(
              fontSize: 24,
              fontWeight: FontWeight.bold,
              color: Colors.blue,
            ),
          ),
        ),
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace currency_code_to_currency_symbol.

  • bharat_fx

    Indian localization, fintech toolkit, currency formatters, PIN lookup, and ID validators for Flutter.

  • intl

    A Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.

  • phonecodes

    Provides a list of countries with names, ISO codes, dial codes, flags, and currencies.

  • intl_translation

    Generates Dart code for intl messages from ARB files for localization.