Skip to content

2.0.0

Choose a tag to compare

@O-Nics O-Nics released this 10 Oct 12:47
· 26 commits to master since this release
67aa643

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 Widget instead of SvgIcon
  • βœ… New opacity parameter (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 .si format for compact storage
  • βœ… Powered by jovial_svg for 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 .si format for compact storage
  • βœ… Powered by jovial_svg for 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.0

Run:

flutter pub upgrade

Step 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


Full Changelog: https://github.com/O-Nicks/amazing_icons/blob/master/CHANGELOG.md