flutter_mmcalendar 3.2.3
flutter_mmcalendar: ^3.2.3 copied to clipboard
A comprehensive Flutter package for Myanmar calendar with date conversions, astrological calculations, and multi-language support
3.2.3 #
π New Features #
Exception Handling
- Added custom exception classes for better error handling throughout the package
InvalidMyanmarDateException- For invalid Myanmar date components with helpful suggestionsInvalidWesternDateException- For invalid Western date componentsDateConversionException- For date conversion failures with factory methodsDateParseException- For date string parsing failuresInvalidConfigurationException- For invalid configuration parametersDateOutOfRangeException- For dates outside supported rangesCacheException- For caching system issuesAstrologicalCalculationException- For astrological calculation failuresHolidayCalculationException- For holiday calculation failures
- All exceptions include detailed error messages and recovery suggestions
Performance Utilities
- Added
LRUCache<K, V>- Generic Least Recently Used cache with TTL support- Automatic eviction of least recently used items
- Optional Time-To-Live for cache entries
- Statistics tracking (hits, misses, hit rate)
- Useful for general-purpose caching needs (Note: Use built-in
CalendarCachefor calendar dates)
- Added
PerformanceMonitor- Track and measure operation performance- Measure synchronous and async operations
- Track min/max/average execution times
- Generate performance reports
- Added
BatchOptimizer- Process large datasets without blocking UI- Configurable batch sizes and delays
- Support for both sync and async processing
- Added
DebouncerandThrottler- Control operation frequency- Prevent excessive function calls
- Useful for search inputs and scroll handlers
Accessibility Features
- Added
CalendarAccessibility- Comprehensive screen reader support- Generate semantic labels for dates (Myanmar + Western)
- Include holiday and astrological information in labels
- Screen reader announcements for date selection
- Month navigation hints
- Added
CalendarKeyboardHandler- Full keyboard navigation support- Arrow keys for date navigation
- Enter/Space for selection
- Home/End for quick navigation
- Escape for dismissal
- Added
HighContrastHelper- High contrast theme support- Detect high contrast mode
- Apply appropriate colors and borders
- Added
TextScalingHelper- Text scaling support- Respect system text scaling settings
- Clamp font sizes within acceptable ranges
- Support for large text mode
Optimized Widgets
- Added
OptimizedCalendarCell- Best-practice calendar cell widget- Wrapped in
RepaintBoundaryfor better performance - Full semantic labels for accessibility
- High contrast theme support
- Custom
MyanmarCalendarThemesupport - Automatic text scaling
- Holiday and astrological indicators
- Wrapped in
Date Selection Modes
- Added
CalendarSelectionModesupport toMyanmarCalendarWidget- Single selection: Default behavior
- Range selection: Select start and end dates with connected visual highlights and themed corners
- Multi selection: Select multiple independent dates
- Added new callbacks:
onRangeSelectedandonMultiSelected
Advanced Astrology & AI
- Added
HoroscopeWidget- A comprehensive widget for detailed astrological readings- Displays Nakhat, Mahabote, and auspiciousness status
- Integrated AI prompt generation menu
- Enhanced AI Prompt Generation
- Expanded
AIPromptTypeto support Horoscope, Fortune Telling, and Divination - Fully localized prompt templates in all 6 supported languages
- Expanded
- New Public API:
MyanmarCalendar.generateAIPromptfor easy access to the AI prompt engine
Localization
- Extended localization for all new astrological features in Mon, Shan, and Karen
- Improved astrological term descriptions across all languages
π§ Improvements #
- Refactored
MyanmarCalendarWidgetto useOptimizedCalendarCell- Reduced code by ~155 lines
- Better performance with
RepaintBoundary - Automatic accessibility support
- Consistent theming
- Added
westernWeekdayNamegetter toCompleteDatemodel - Updated to modern Flutter APIs
MediaQuery.textScalerOf()instead of deprecatedtextScaleFactorMediaQuery.highContrastOf()instead of deprecatedhighContrastColor.withValues(alpha:)instead of deprecatedwithOpacity()SemanticsService.sendAnnouncement()with View
- Simplified API: Publicly exported
AIPromptServiceandAIPromptType - Improved
MyanmarCalendarThemewith new selection style properties
π Documentation #
- Added comprehensive implementation guide
- Added detailed API documentation for all new utilities
- Added usage examples for exceptions, performance, and accessibility features
π§ͺ Testing #
- Added comprehensive tests for exception classes (258 lines)
- Added tests for performance utilities (200+ lines)
- Total test coverage: 450+ lines of new tests
π¦ Exports #
All new features are properly exported from the main library:
src/exceptions/calendar_exceptions.dartsrc/utils/performance_utils.dartsrc/utils/accessibility_utils.dartsrc/widgets/optimized_calendar_cell.dart
β οΈ Notes #
- The new
LRUCacheis a general-purpose utility. For caching calendar dates, continue using the built-inCalendarCachewhich is optimized for calendar operations. - All accessibility features are optional and work seamlessly with existing code.
- Performance utilities are available for monitoring and optimization but don't affect existing functionality.
3.2.2 #
- Redo
&fand&ffformat by removing Yat inFormatService - Shan calendar year calculation support.
3.2.1 #
- Fixed: Diwali, Eid, Chinese new year holidays - Instead of hard-coded arrays, calculate these dates dynamically. Can be extend more in the future.
- Fixed:
MyanmarDateTimecached with better approach - Added anniversary days and other holidays getter to
MyanmarDateTime - Publically export
translateNumbers()inFormatService
3.2.0 #
- Added
Cachesystem: See Cache Docs for usage.
3.1.1 #
- Added
MoonPhaseIndicatorwidget - Added chronicles and dynasties data
3.1.0 #
- Fixed myanmar
National Daycalculation. - Added
National Daytranslation - Remove unrelated holidays like
UN Day,Valentines Day, etc. - Added chronicles and dynasties data and can be used via public api
3.0.0 #
- Fixed
isTodaycalculation inCompleteDate - Fixed weekday style with compact mode flag
- Fixed myanmar month translation
- Added condition for special years in
getMyanmarMonth() - Added
MoonPhasepainter and widget for early use. There is a plan to make more advance.
3.0.0-dev.3 #
- Added more getter values like
isTodayinCompleteDate. - Fixed wrong information in document comments
3.0.0-dev.2 #
- Fixed: Widget theme color
- Update example application
- Minor improvements
3.0.0-dev.1 #
Breaking Changes #
- Complete rewrite of core date calculation engine
- Restructured API for better consistency and type safety
- Renamed and consolidated various utility methods
New Features #
- π Complete Myanmar Calendar System: Full support for Myanmar calendar with accurate date conversions
- π Astrological Calculations: Buddhist era, sabbath days, moon phases, yatyaza, pyathada, and more
- π― Multi-language Support: Myanmar, English, Mon, Shan, Karen, and Zawgyi scripts
- π¨ Beautiful UI Components: Pre-built calendar widgets and date pickers
- π Holiday Support: Myanmar public holidays, religious days, and cultural events
- βοΈ Highly Configurable: Customizable themes, date formats, and display options
- π± Responsive Design: Works perfectly on mobile, tablet, and desktop
- π Date Arithmetic: Easy date calculations and manipulations
- π‘οΈ Type Safe: Full null safety support with comprehensive error handling
Improvements #
- Optimized performance for date conversions
- Comprehensive documentation and examples
- Calendar and picker widgets with theme customization options
- Improved error handling and validation
Documentation #
- Added detailed API documentation
- New example applications
- Comprehensive README with usage examples
- Added contributing guidelines
- Improved inline code documentation
Dependencies #
- Requires Flutter 3.0.0 or higher
- Dart SDK ">=3.0.0 <4.0.0"
Internal Changes #
- Restructured project architecture
- Added comprehensive test suite
- New build and deployment pipeline
- Improved code organization and modularity
2.0.1 #
- Added
puntuationandpuntuationtranslation.
2.0.0 #
Breaking Changes
MmCalendarConfigimprovement for calendar language translation.- Refactor code base for cleaness
- Remove some unnecessay helper functions and files
1.1.2 #
Calculationclasses are now available to use.- Documentation update
1.1.1 #
- Add
MoonPhaseWidget - Fixed language does not change while config change
1.1.0 #
BREAKING CHANGES
- Remove
MmCalendarConfig.initDefault().
1.0.1 #
- Fixed
fortnightDaywrong for some year.
1.0.0 #
- Update
flutter_lintsto4.0.0 - Stable version release.
0.0.8 #
- Upgrade
flutter_lintsto3.0.0 - Update
README.mddocument
0.0.7 #
- Fixed:
getSabbath()return wrong value
0.0.6 #
- Fixed:
Thingyancalculation wrong - Add more example
0.0.5 #
- Add
TaiandKarenlanguage maps - Change to name parameters in
MyanmarDate.formatByPatternAndLanguageandMyanmarDate.format
0.0.4 #
- Update
README.md - Fixed: calculator not exported
Myanmar Thingyandays retrieving.
0.0.3 #
- Update
README.md - Update example code
0.0.2 #
- Redesign code base
0.0.1 #
MyanmarDateConverterWesternDateConverterAstrologicalConverterHolidayscalculation including myanmarThingyanholidays.
