2.0.0
Amazing Icons 2.0.0 - Performance Revolution π
We're excited to announce Amazing Icons 2.0.0, a major release focused on performance optimization and modern rendering techniques!
π― What's New
β‘ 10x Performance Boost for Bulk & TwoTone Icons
Bulk and TwoTone icons now use icon fonts instead of SVG, delivering:
- 10x faster rendering - instant display with no parsing overhead
- Lower memory usage - native icon rendering by Flutter
- Smaller app size - compact font files instead of thousands of SVG assets
- Smooth animations - no lag when displaying multiple icons
π¨ New Customizable Opacity Control
Fine-tune the depth effect of Bulk and TwoTone icons:
// Subtle effect
AmazingIconBulk.home(size: 24, color: Colors.blue, opacity: 0.2)
// Default effect
AmazingIconBulk.home(size: 24, color: Colors.blue, opacity: 0.4)
// Strong effect
AmazingIconBulk.home(size: 24, color: Colors.blue, opacity: 0.6)π³οΈ Enhanced Country Flags with Shape Options
Country flags now support 3 shape styles:
// Circular flags
AmazingIconCountry.fromCountryCode(countryCode: "fr", size: 30, shape: IconShape.circle)
// Rounded corners (default)
AmazingIconCountry.fromCountryCode(countryCode: "us", size: 30, shape: IconShape.rounded)
// Sharp corners
AmazingIconCountry.fromCountryCode(countryCode: "jp", size: 30, shape: IconShape.sharp)π³ Optimized Payment Icons
Payment icons migrated to jovial_svg with .si format for:
- Faster loading times
- Reduced memory footprint
- Better web compatibility
π Breaking Changes
This is a major version with API changes. Please review the migration guide below.
API Changes Summary
| Icon Type | Old (v1.x) | New (v2.0) |
|---|---|---|
| Bulk Icons | SvgBulk.home(...) |
AmazingIconBulk.home(size: 24, color: Colors.blue, opacity: 0.4) |
| TwoTone Icons | SvgTwoTone.heart(...) |
AmazingIconTwotone.heart(size: 24, color: Colors.red, opacity: 0.4) |
| Country Flags | SvgCountry.fromCountryCode("fr", ...) |
AmazingIconCountry.fromCountryCode(countryCode: "fr", size: 25) |
| Payment Icons | SvgPayment.visa(...) |
AmazingIconPayment.visa(size: 50) |
Detailed Breaking Changes
1. Bulk & TwoTone Icons (Icon Fonts)
Before (v1.x):
SvgBulk.home(size: 24, color: Colors.blue)
SvgTwoTone.heart(size: 24, color: Colors.red)After (v2.0):
AmazingIconBulk.home(size: 24, color: Colors.blue, opacity: 0.4)
AmazingIconTwotone.heart(size: 24, color: Colors.red, opacity: 0.4)Changes:
- β
Returns
Widgetinstead ofSvgIcon - β
New
opacityparameter (default:0.4) - β Uses dual IconData stack for rendering
- β
No longer requires
flutter_svg
2. Country Flags (Jovial SVG)
Before (v1.x):
SvgCountry.fromCountryCode("fr", size: 25, shape: IconShape.rounded)After (v2.0):
AmazingIconCountry.fromCountryCode(
countryCode: "fr",
size: 25,
shape: IconShape.rounded
)Changes:
- β Named parameters required
- β
Uses
.siformat for compact storage - β
Powered by
jovial_svgfor better performance
3. Payment Icons (Jovial SVG)
Before (v1.x):
SvgPayment.visa(size: 50)After (v2.0):
AmazingIconPayment.visa(size: 50)Changes:
- β Class renamed
- β
Uses
.siformat for compact storage - β
Powered by
jovial_svgfor better performance
4. Package Structure
All icon classes moved to lib/src/ directory.
Recommended import:
import 'package:amazing_icons/amazing_icons.dart';π¦ Dependencies
- Added:
jovial_svg: ^1.1.24- High-performance SVG rendering for Country and Payment icons - Removed:
flutter_svg: ^2.0.10+1- No longer needed for Bulk and TwoTone icons
π Migration Guide
Step 1: Update pubspec.yaml
dependencies:
amazing_icons: ^2.0.0Run:
flutter pub upgradeStep 2: Update Bulk Icons
Find & Replace:
# Old pattern
SvgBulk.iconName(size: X, color: Y)
# New pattern
AmazingIconBulk.iconName(size: X, color: Y, opacity: 0.4)Step 3: Update TwoTone Icons
Find & Replace:
# Old pattern
SvgTwoTone.iconName(size: X, color: Y)
# New pattern
AmazingIconTwotone.iconName(size: X, color: Y, opacity: 0.4)Step 4: Update Country Flags
Find & Replace:
# Old pattern
SvgCountry.fromCountryCode("XX", size: Y)
# New pattern
AmazingIconCountry.fromCountryCode(countryCode: "XX", size: Y)Step 5: Update Payment Icons
Find & Replace:
# Old pattern
SvgPayment.iconName(size: X)
# New pattern
AmazingIconPayment.iconName(size: X)Step 6: Clean & Rebuild
flutter clean
flutter pub get
flutter runπ Performance Comparison
| Metric | v1.x (SVG) | v2.0 (Icon Fonts) | Improvement |
|---|---|---|---|
| Rendering Speed | ~50ms | ~5ms | 10x faster |
| Memory Usage | ~2MB for 100 icons | ~200KB for 100 icons | 90% reduction |
| Package Size | ~8MB | ~3MB | 62% smaller |
| First Paint | 100-200ms | Instant | Instant |
π Bug Fixes
- Fixed clip-path issues in some SVG country flags
- Improved web compatibility for all icon types
- Better rendering on low-end devices
π Documentation
- Added comprehensive API documentation to all icon classes
- Updated README with new examples
- Enhanced code comments for better IntelliSense support
π Thank You
Thank you to all contributors and users who provided feedback to make this release possible!
π Resources
- Repository: https://github.com/O-Nicks/amazing_icons
- Pub.dev: https://pub.dev/packages/amazing_icons
- Issues: https://github.com/O-Nicks/amazing_icons/issues
Full Changelog: https://github.com/O-Nicks/amazing_icons/blob/master/CHANGELOG.md