dirham_symbol 0.5.3
dirham_symbol: ^0.5.3 copied to clipboard
Official UAE Dirham (AED) currency symbol, widget, and formatter for Flutter. Display Dirham icon, Arabic (د.إ), prices, and inputs with .toDirham().
Changelog #
All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
0.5.3 - 2026-11-18 #
🔧 Static Analysis & Compatibility #
- Migrated core widgets (
DirhamIcon,DirhamSymbol,DirhamPrice,DirhamPriceRange,InlineDirhamText,DirhamSalePrice,DirhamBadge,AnimatedDirhamPrice,DirhamVectorIcon, andDirhamTheme) topackage:flutter/widgets.dartso they work in any Flutter app (MaterialApp,CupertinoApp, orWidgetsApp) without triggering Flutter 3.47+material.dartdeprecation notices on pub.dev. - Applied standard
dart formatacross all library, example, and test files for 50/50 static analysis points.
0.5.2 - 2026-11-11 #
✨ Improvements & Fixes #
- Smart Decimal Formatting: Fractional amounts (e.g.,
99.99.toDirham()and99.99.toDirhamString()) now preserve their decimals automatically instead of rounding to100, while whole integers (1500.toDirham()) stay clean without.00unlessshowDecimals: trueis set. - Single-String Font Glyph Support: Added
DirhamTextStyle,.toDirhamGlyphString(), andDirhamFormatter.formatWithGlyph()so the official UAE Dirham glyph can be used directly inside standard FlutterTextwidgets. - Smarter String Parsing:
"1,500.50".toDirham(),.toDirhamText(), and.toDirhamRange()now parse comma-formatted and currency-prefixed strings cleanly. - Restored
DirhamVectorIcon: Re-exportedDirhamVectorIconandDirhamCustomPainterfor full backward compatibility. - Package Size Optimization: Removed
screenshots/from the bundled Flutter app assets and added pub.devscreenshots:metadata inpubspec.yaml. - Streamlined Documentation: Simplified
README.mdwith a 10-second quick start.
0.5.1 - 2026-10-03 #
🔧 Cleanup & Metadata #
- Updated package description and documentation comments to reflect the native font glyph engine.
- Cleaned up obsolete asset files.
0.5.0 - 2026-10-03 #
⚡ Font Glyph Engine & Lightweight Architecture #
- 🔠 Native Dirham Font Glyph:
DirhamIconnow uses the official high-performance bundled Dirham font glyph (fonts/dirham_font.ttf), allowing native font scaling, text alignment, and rich text integration. - 📦 Removed
flutter_svgdependency: Reduced package size and eliminated external SVG dependencies for a lighter footprint. - 🔤 Exposed
kDirhamGlyph,kDirhamFontFamily, andkDirhamPackageconstants. - 🛡️ 100% Backward Compatible: All existing widget signatures (
DirhamPrice,DirhamSalePrice,DirhamTextField,DirhamBadge, extensions) continue to work seamlessly.
0.4.1 - 2026-10-03 #
🔧 Fixes & Docs #
- Fixed screenshot asset URLs in
README.mdto reference themainbranch. - Cleaned up symbol table rendering for pub.dev.
0.4.0 - 2026-10-03 #
🚀 Major Feature Update (100% Backward Compatible) #
- 💳 DirhamInputFormatter & DirhamTextField:
DirhamInputFormatter(TextInputFormatter): real-time thousands formatting, decimal precision limiter, and max amount restrictions.DirhamTextField: pre-built form field with built-in currency symbol prefix/suffix, clear button, and directdouble& Fils amount callbacks.
- 🏷️ E-Commerce DirhamSalePrice Widget:
- Displays original price (strikethrough) alongside discounted sale price with auto-calculated discount percentage or amount saved badges.
- ⚡ AnimatedDirhamPrice Widget:
- Smooth implicitly animated number ticker for shopping carts, wallet balances, and checkout screens.
- 🏷️ DirhamBadge & DirhamChip:
- Compact pill badges for promotional tags, delivery fees, and cashback chips.
- 🛠️ Pure Dart DirhamFormatter:
.toDirhamString()for generating currency strings without rendering Flutter widgets (ideal for API payloads, push notifications, and PDF invoices)..toDirhamCompact()for short notation (1.5K AED,2.4M د.إ)..toFils(),filsToDirham(), andDirhamFormatter.formatFils()for Fils subunit math.- Full Eastern Arabic Numerals (
١٢٣٤٥٦٧٨٩٠) support.
- 🎨 DirhamTheme / DirhamThemeData:
- App-wide default configuration for symbol type, decimals, formatting, and locale.
- 🖌️ Zero-Asset Canvas DirhamVectorIcon & DirhamCustomPainter:
- Pure Flutter canvas vector painter for the official UAE Dirham symbol.
- 📱 Interactive 4-Tab Example Application:
- Live interactive showcase including E-Commerce demo, FinTech wallet demo, form field input playground, and code generator.
- 🛡️ 100% Backward Compatibility Guaranteed:
- All existing code, widgets, and extension methods work identically without breaking changes.
0.3.2 - 2025-10-29 #
Added #
- ✨ Extension Methods for
numandString:.toDirham()→ clean and quick price display.toDirhamText()→ inline promotional text support.toDirhamRange()→ for displaying min–max price ranges
- InlineDirhamText Widget for embedding prices in sentences
- Improved Symbol Rendering — supports custom size, color, and style
- Adaptive Light/Dark Mode for better theme consistency
- Backward Compatibility with version
0.2.7
Updated #
- Smarter symbol positioning logic (auto-detect before/after)
- Enhanced documentation and examples for better developer experience
- Updated README.md and pub.dev description with cleaner examples
0.2.7 - 2025-10-27 #
🏁 Initial Release #
- Introduced Dirham symbol as an SVG widget (
DirhamIcon) - Added DirhamPrice and DirhamPriceRange widgets
- Support for symbol positioning (before or after price)
- Included decimal support and automatic number formatting
- Full customization via TextStyle
- Published under the MIT License
Dirham Symbol — built with ❤️ for the Flutter community.
