gcc_currency 0.0.1 copy "gcc_currency: ^0.0.1" to clipboard
gcc_currency: ^0.0.1 copied to clipboard

GCC currency symbols as Flutter icons and text

gcc_currency #

A lightweight Flutter package that provides GCC currency symbols (SAR, AED, QAR, OMR, KWD, BHD) as a custom icon font.

This package is designed for POS systems, invoicing, receipts, financial apps, and anywhere you need clean, scalable currency symbols that behave like icons or text.


โœจ Features #

  • Custom font-based currency symbols (sharp at any size)
  • Works with Icon, Text, RichText, and TextSpan
  • Colorable & scalable
  • No SVG or image assets at runtime
  • Optimized for Flutter packages (uses fontPackage)
  • ISO-style currency naming

๐Ÿ“ฆ Supported Currencies #

Currency Code
Saudi Riyal SAR
UAE Dirham AED
Qatari Riyal QAR
Omani Rial OMR
Kuwaiti Dinar KWD
Bahraini Dinar BHD

๐Ÿš€ Installation #

Add this to your pubspec.yaml:

dependencies:
  gcc_currency: ^0.0.1

Then run:

flutter pub get

๐Ÿงฑ How It Works #

This package ships a custom icon font (GCCCurrency) internally. Each currency symbol is mapped to a Unicode value in the Private Use Area and exposed via Dart constants.

This is the same technique used by Material Icons and Font Awesome.


๐Ÿงฉ Usage #

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

Icon(
  GCCCurrencyIcon.sar,
  size: 24,
  color: Colors.green,
)

2. Inside Text (RichText / Invoice Style) #

RichText(
  text: TextSpan(
    children: [
      GCCCurrencyText.span(
        GCCCurrency.aed,
        size: 18,
        color: Colors.black,
      ),
      const TextSpan(
        text: '1,250.00',
        style: TextStyle(color: Colors.black),
      ),
    ],
  ),
)

3. With Enum-Based API #

GCCCurrency currency = GCCCurrency.omr;

Icon(GCCCurrencyText.icon(currency))

๐Ÿง  API Reference #

GCCCurrencyIcon #

Provides static IconData constants.

GCCCurrencyIcon.sar
GCCCurrencyIcon.aed
GCCCurrencyIcon.qar
GCCCurrencyIcon.omr
GCCCurrencyIcon.kwd
GCCCurrencyIcon.bhd

GCCCurrencyText #

Get IconData from enum

IconData icon = GCCCurrencyText.icon(GCCCurrency.kwd);

Create a TextSpan

TextSpan span = GCCCurrencyText.span(
  GCCCurrency.bhd,
  size: 16,
  color: Colors.blue,
);

๐Ÿ–จ๏ธ Printing & PDF Support #

Because this uses a font:

  • Works perfectly in PDF generation (e.g. printing, pdf packages)
  • Ideal for thermal receipts and invoices
  • No rasterization issues

Ensure the font is registered in your PDF engine if required.


๐Ÿ”ง Technical Notes #

  • Font family: GCCCurrency
  • Unicode range: Private Use Area (0xE001 โ†’ 0xE006)
  • Font package name is correctly set to gcc_currency
  • All symbols are monochrome by design

๐Ÿงช Example #

See the example/ folder for a runnable demo app.


๐Ÿค Contributing #

Pull requests are welcome. Please ensure:

  • Proper Unicode mapping
  • Consistent naming
  • No breaking API changes

๐Ÿ“„ License #

MIT License


๐Ÿ™Œ Author #

Developed for real-world GCC fintech, POS, and invoicing systems.

For Custom ERP & POS Solutions connect me

If you find this useful, consider giving it a โญ on GitHub.

https://github.com/fathah/gcc_currency

1
likes
140
points
106
downloads

Publisher

verified publisherfathaaah.com

Weekly Downloads

GCC currency symbols as Flutter icons and text

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on gcc_currency