id_card_formatter 0.0.22 copy "id_card_formatter: ^0.0.22" to clipboard
id_card_formatter: ^0.0.22 copied to clipboard

CARD FORMATTER

πŸ‡ΉπŸ‡Ώ ID Card Formatter #

A lightweight Flutter/Dart extension to format Tanzanian ID numbers (NIDA, Voter ID, and NCARD card style). Also supports currency formatting using intl.


✨ Features #

  • βœ… Format NIDA ID numbers like 00000000-00000-00000-00
  • βœ… Format Tanzanian Health Cards (e.g. NCARD) as XXXX XXXX XXXX XXXX
  • βœ… Format Voter IDs like A-1234-5678-901-X
  • βœ… Format double values into currency (e.g. TZS 1,000,000)

πŸ“¦ Installation #

Add this to your pubspec.yaml:

dependencies:
  id_card_formatter: ^0.0.1

🧠 Usage #

πŸ“₯ Import #

import 'package:id_card_formatter/id_card_formatter.dart';

πŸ’° Currency Format #

double amount = 2500000;

print(amount.toFormat());                         // TZS 2,500,000
print(amount.toFormat(decimalDigits: 2));         // TZS 2,500,000.00
print(amount.toFormat(symbol: '\$'));             // $ 2,500,000
print(amount.toFormat(locale: 'de_DE', symbol: '€')); // € 2.500.000

πŸ†” NIDA ID Format #

String nida = '0000000000000000000';
print(nida.nidaFormat()); // 00000000-00000-00000-00

πŸ†” NCard Format #

String n = '0000000000000000';
print(ncard.tzNcardFormat()); // 0000 0000 0000 0000

πŸ—³οΈ Voter ID Format #

String voter = 'A12345678901X';
print(voter.tzVoterFormat()); // A-1234-5678-901-X

πŸ” Extension Summary #

String.nidaFormat() #

Formats NIDA numbers:
XXXXXXXX-XXXXX-XXXXX-XX

String.tzNcardFormat() #

Formats Ncard numbers:
XXXX XXXX XXXX XXXX

String.tzVoterFormat() #

Formats Voter IDs:
A-1234-5678-901-X

double.toFormat({locale, symbol, decimalDigits}) #

Formats double to currency using intl.


🀝 Contributing #

Pull requests and issues are welcome! Let’s make Tanzanian Flutter utilities awesome πŸ‡ΉπŸ‡Ώβœ¨


id_card_formatter #

πŸ‘¨β€πŸ’» Author #

Collaborators
πŸ“§ hmanyinja@gmail.com
🌐 @hemmy6894 🌐 @barakadewise 🌐 @tfkcodes

Made with ❀️ in Tanzania πŸ‡ΉπŸ‡Ώ

0
likes
0
points
51
downloads

Publisher

unverified uploader

Weekly Downloads

CARD FORMATTER

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on id_card_formatter