mena 1.0.1
mena: ^1.0.1 copied to clipboard
Comprehensive offline MENA country data with Arabic-first localization, ISO codes, currencies, and dial codes. Includes automatic locale switching and Arabic/English support.
1.0.1 2025-01-XX #
π§ͺ Enhanced Testing & Quality Assurance #
- Comprehensive Test Suite: Added 102 tests covering all package functionality
- Core Tests: Locale management, data collections, search functionality (47 tests)
- Model Tests: Country, Currency, MenaItemModel validation (18 tests)
- Enum Tests: CurrencyType, EmojiSize, ImageSize, ImageType, MenaKeys (18 tests)
- Data Integrity Tests: All 19 countries validation, edge cases, performance (19 tests)
- Palestine Validation: Comprehensive tests ensuring correct Palestine data (ILS currency, Jerusalem capital, +970 dial code)
- Performance Testing: Efficient lookup validation (1000+ operations under 100ms)
- Unicode Support: Full Arabic text handling and validation
- Error Handling: Comprehensive edge case coverage for production reliability
- Code Quality: Zero linting errors, proper test organization across 4 test files
1.0.0 2025-01-XX #
π Initial Release - Complete MENA Support with Arabic-First Localization #
MenaItemModel.codeandMenaItemModel.dialCodemoved intoCountryascountry.codeandcountry.dialCodecountryNamefield renamed tocountry(typeCountry)- Removed internal search enum file; searching APIs remain the same
π Core Features
- Complete MENA Dataset: 19 countries across Middle East and North Africa
- Arabic-First Localization: Defaults to Arabic with English support
- Dynamic Locale Switching:
MENA.setDefaultLocale('ar'|'en')for runtime locale changes - Advanced Flag System: SVG, PNG (emoji-style), and JPEG/PNG with flexible sizing
- Zero Dependencies: Pure Dart implementation, offline-first
π Unified Search Method
getBy(query: String, key: MenaKeys): Unified search with specific keysMenaKeys.code: ISO 3166-1 alpha-2 country codesMenaKeys.englishName/MenaKeys.arabicName: Country namesMenaKeys.dialCode: International dialing codesMenaKeys.currencyCode: ISO 4217 currency codesMenaKeys.capitalEn/MenaKeys.capitalAr: Capital city namesMenaKeys.officalEn/MenaKeys.officalAr: Official country names
π Locale-Aware API
- MenaItemModel.getCountryName / getOfficialName / getCapitalName: Locale-aware country names
- MenaItemModel.getCurrencyName / getCurrencySymbol: Locale-aware currency names and symbols
π° Enhanced Currency System
- Separate Symbols:
englishSymbol(ISO codes) andarabicSymbol(traditional symbols) - Localized Names: Full English and Arabic currency names
- Country Adjectives: Private
_enAdjective/_arAdjectiveproperties
π Data Collections
MENA.allCountries: Complete list (19 countries)MENA.middleEast: Middle Eastern countries (12 countries)MENA.northernAfrica: North African countries (7 countries)
ποΈ Models
- MenaItemModel: Core country data with comprehensive flag URL support
- Country: Localized names + metadata (
code,dialCode, capitals) - Currency: Complete currency data with English/Arabic symbols and names
- CurrencyType: Currency type classification with
englishName/arabicNameproperties
π Countries Included
Middle East (12): Saudi Arabia, UAE, Kuwait, Qatar, Bahrain, Oman, Jordan, Lebanon, Palestine, Iraq, Syria, Yemen
North Africa (7): Egypt, Sudan, Libya, Tunisia, Algeria, Morocco, Mauritania
βοΈ Technical Specifications
- Dart SDK: ^3.9.2
- Dependencies: None (pure Dart)
- Null Safety: Complete null safety support
- Performance: Optimized for mobile and web applications
- Platform Support: Flutter (Android, iOS, Web, Desktop), Dart server-side
π Documentation
- Comprehensive README: Complete API reference with Arabic/English examples
- Locale Management Guide: Detailed examples of locale switching
- Professional Examples: Country selectors, phone inputs, currency displays
- API Documentation: Full Dartdoc with examples and use cases