flag_plus 0.0.3
flag_plus: ^0.0.3 copied to clipboard
A Flutter package for displaying world flags with customizable shapes and sizes.
Changelog #
All notable changes to the Flag Plus package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.0.3 - 2025-03-12 #
Added #
- SVG validation before rendering to prevent parsing errors
- Emoji fallback support when SVG validation fails
- Enhanced error handling for invalid SVG dimensions
Fixed #
- Critical issue: SVG files with percentage dimensions causing
FormatException: Invalid doubleerrors - Unhandled exceptions in vector_graphics_compiler during SVG parsing
- Improved error builder to gracefully handle SVG parsing failures
Enhanced #
- Pre-validation of SVG assets to catch format issues early
- Better error recovery with automatic fallback to emoji rendering
- More robust SVG asset loading with comprehensive error handling
0.0.2 - 2024-03-12 #
Added #
- Support for country names in addition to country codes
- Comprehensive country data with detailed information
- New utility functions for country code handling:
getCountryCode(): Convert country names to ISO codesgetCountryName(): Get full country name from codeisValidCountry(): Validate country inputsgetCountryDisplayName(): Get formatted display name
Enhanced #
- Improved error handling with specific error states
- Better error messages and UI for invalid inputs
- Added themed error widget with different states
- Case-insensitive country name matching
Fixed #
- Country code validation and conversion
- Error widget layout issues
- Asset path handling for country codes
0.0.1 - 2025-03-11 #
Added #
- Initial release of Flag Plus package
- Basic flag display functionality using SVG format
- Multiple flag shapes:
- Rectangular (default)
- Rounded corners
- Circular
- Flexible sizing options
- Smart fitting modes:
- Fill
- Contain
- Cover
- Fit Width
- Fit Height
- None
- Loading state customization
- Error state handling
- Background color support
- Border radius customization
- Asset caching for better performance