indian_formatters 0.0.2 copy "indian_formatters: ^0.0.2" to clipboard
indian_formatters: ^0.0.2 copied to clipboard

A comprehensive Flutter/Dart package for India-specific number formatting, currency, validators (PAN, Aadhaar, GST, IFSC, UPI), date utilities, and address tools. All-in-one — one import, everything included.

Changelog #

0.0.2 #

🎉 Major Release: Enhanced Validation, Tree-Shaking, and Parsing #

Released: April 24, 2026

✨ New Features

1. Pincode Mapper 📍

  • Lightweight utility for accurate PIN code to state/region mapping using official India Post allocation logic
  • Maps 70+ postal regions using first 2 digits
  • Accurate state detection (e.g., 41xxxx → Pune Region, Maharashtra)
  • Union Territory identification
  • Search and filter capabilities
  • Lightweight (~5KB) - no massive database required

2. Tree-Shaking Support 🌳

  • Granular import options for optimal bundle size
  • Import only validators: ~40% smaller bundle
  • Import only formatters: ~35% smaller bundle
  • Import individual validators: ~70-80% smaller bundle

3. Deep Checksum Validation 🔐

  • Mathematical checksum verification for PAN and GST numbers
  • PAN: Implements weighted sum algorithm for 10th character
  • GST: Implements modulo-36 algorithm for 15th character
  • Optional verification (defaults to enabled)
  • Utility methods to calculate checksums

4. Reverse Parsing 🔄

  • Robust utilities to parse formatted Indian number strings back to numbers
  • Supports Indian comma grouping, currency symbols, compact notation
  • Negative numbers and ranges support
  • Round-trip format/parse validation

🔧 Improvements

  • Enhanced validation with mathematical checksums
  • 258 total tests (up from 47 in v0.0.1)
  • 100% backward compatible - no breaking changes
  • Enhanced API with new utility methods
  • Better error handling and validation feedback

📦 Package Size Optimization

  • Tree-shaking support reduces bundle size by up to 80%
  • Granular imports for optimal performance

0.0.1 #

  • Initial release
  • Number formatting (Indian system with lakhs and crores, words in English and Hindi, compact notation)
  • Currency formatting (₹ symbol, cheque format, words, compact notation)
  • Validators: PAN, Aadhaar (with Verhoeff algorithm), GST, Mobile, IFSC, Pincode, Driving License, Voter ID, UPI
  • Date formatting (Indian format, Hindi numerals, fiscal year, financial quarter, Hindu month names)
  • Address utilities (all 28 states + 8 UTs with GST codes, capitals, Hindi names)
  • Full extension support on num and DateTime types
  • Zero external dependencies (except meta for annotations)
  • Support for all platforms: Android, iOS, Web, macOS, Windows, Linux
4
likes
150
points
233
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter/Dart package for India-specific number formatting, currency, validators (PAN, Aadhaar, GST, IFSC, UPI), date utilities, and address tools. All-in-one — one import, everything included.

Repository (GitHub)
View/report issues

Topics

#formatting #india #validation #utilities

License

MIT (license)

Dependencies

flutter, meta

More

Packages that depend on indian_formatters