Skip to main content

flutter_mmcalendar 4.0.1 copy "flutter_mmcalendar: ^4.0.1" to clipboard
flutter_mmcalendar: ^4.0.1 copied to clipboard

Myanmar calendar widgets for Flutter in Material 3, Cupertino and Liquid Glass: month, lunar month and year views, pickers, holidays, moon phases and astrology.

4.0.1 #

  • Stacked labels make room for Myanmar script: the agenda's day number and weekday, the week strip's day labels and the holiday list's dates no longer overlap their vowel and tone marks. MmCalendarThemeData.lineHeight gives the line height a stacked label needs in a language.

4.0.0 #

A rewrite of every widget. The calendar UI now renders as Material 3, Cupertino or Liquid Glass from one scope and one theme, and shows what myanmar_calendar_dart computes: holiday types, Sabbath, moon days, astrology, the Shan and Sasana years and the chronicles. See the README's "Migrating from 3.x" section.

Breaking #

  • Requires myanmar_calendar_dart: ^3.0.1 and Flutter 3.41 (Dart 3.11). The core library is still re-exported, so its 3.0 changes apply here too (core changelog): MyanmarCalendar.generateAIPrompt is now AIPromptService.generatePrompt, getCacheStatistics() is typed, several exception classes are gone, and holidays follow the reference calendar.
  • Every 3.x widget is replaced (see the README's migration table): MyanmarCalendarWidget, MyanmarDatePickerWidget, showMyanmarDatePickerFullscreen, MyanmarDatePickerFormField, MyanmarDateField, MyanmarCalendarToolbar, MyanmarDateSummaryCard, HoroscopeWidget, MoonPhaseView, DailyMoonPhaseWidget, MoonPhasePainter, OptimizedCalendarCell and CalendarSelectionMode.
  • MyanmarCalendarTheme is replaced by MmCalendarThemeData, a ThemeExtension built from the app's ColorScheme.
  • showMyanmarDatePicker has new parameters and returns CompleteDate.
  • Removed PackageConstants, the performance utilities, the accessibility helpers, and the re-exports of myanmar_calendar_dart's src/ files.

Added #

  • Foundation: MyanmarCalendarScope (one client, language or the app locale, style, theme, week start), MmVisualStyle, MmCalendarThemeData, MyanmarCalendarController with SingleSelection, RangeSelection and MultiSelection, MyanmarDayData, TodayBuilder, MmStrings and languageForLocale.
  • Adaptive primitives: MmGlass (a refraction shader on Impeller, with a blur fallback on Skia and web and an opaque surface for high contrast), MmSurface, MmButton, MmIconButton, MmChip, MmSegmented, MmListGroup, MmListRow, showMmSheet and showMmPopover.
  • Calendars: MyanmarMonthCalendar (swipe paging, five cell styles, keyboard navigation, events), MyanmarWeekStrip, MyanmarMiniMonth, MyanmarYearCalendar, MyanmarLunarMonthCalendar (a Myanmar month by fortnight) and MyanmarAgenda.
  • Pickers: showMyanmarDatePicker, showMyanmarDateRangePicker, showMyanmarMultiDatePicker, the inline MyanmarDatePicker, MyanmarDateWheelPicker, MyanmarMonthYearPicker and MyanmarDateFormField.
  • Day information: MyanmarDateText, MyanmarTodayCard, MyanmarDayDetails, HolidayBadge, HolidayList, AstroBadges, AstrologyCard, NagahleCompass, MoonGlyph, MoonPhaseStrip and NextMoonCountdown.
  • Tools: MyanmarDateConverter, DateDifferenceCard, AIPromptAction and ChronicleCard.
  • Screen-reader labels in the calendar's language, text that scales without overflowing, and right-to-left support.
  • The example is a gallery of every widget, with switches for style, theme, language, platform and week start.

Fixed #

  • Days are looked up by their civil date, so the device's time zone can't shift a cell to the neighbouring day.

3.3.1 #

  • bumps myanmar_calendar_dart: ^2.0.1

3.3.0 #

Major Refactor #

  • Full package refactor aligned with myanmar_calendar_dart: ^2.0.0
  • Rebuilt calendar and picker widget architecture for clearer separation of concerns
  • Added internal widget repository/grid/localization utility layers

New Widgets & UX #

  • Added reusable MyanmarCalendarToolbar
  • Added reusable MyanmarDateSummaryCard
  • Reworked MyanmarCalendarWidget for cleaner selection-state handling
  • Reworked MyanmarDatePickerWidget with:
    • Responsive footer actions (no overflow on longer localized labels)
    • Scrollable year selector for long-range year selection
    • Improved month/year constraint handling from firstDate / lastDate

Moon Phase System #

  • Added new CustomPainter-based moon phase components:
    • MoonPhasePainter
    • MoonPhaseView
    • DailyMoonPhaseWidget
    • MoonPhaseMath helpers for daily phase/illumination mapping
  • Added moon phase timeline showcase in example app

Docs #

  • Comprehensive README rewrite for current APIs and widgets
  • Inline documentation refresh across core/widget public files
  • Changelog refreshed to document the new architecture and widget APIs

Tests & Analysis #

  • Added moon phase widget/math tests
  • Updated tests for myanmar_calendar_dart 2.x custom holiday API
  • Package-level flutter analyze / flutter test checks passing

3.2.8 #

  • bumps myanmar_calendar_dart: ^1.1.5
  • Add moon phase widgets - OptimizedMoonPhaseWidget and DailyMoonPhaseWidget

3.2.7 #

  • bumps: myanmar_calendar_dart: ^1.1.4
  • Add support for flexible holidays configuration to disable holidays globally or for a specific year.

3.2.6 #

  • bumps: myanmar_calendar_dart: ^1.1.3
  • fix: custom holidays cache and complete date isToday wrong condition
  • fix: MyanmarDatePickerWidget layout issue

3.2.5 #

  • bumps: myanmar_calendar_dart: ^1.1.0

3.2.4 #

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 suggestions
    • InvalidWesternDateException - For invalid Western date components
    • DateConversionException - For date conversion failures with factory methods
    • DateParseException - For date string parsing failures
    • InvalidConfigurationException - For invalid configuration parameters
    • DateOutOfRangeException - For dates outside supported ranges
    • CacheException - For caching system issues
    • AstrologicalCalculationException - For astrological calculation failures
    • HolidayCalculationException - 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 CalendarCache for 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 Debouncer and Throttler - 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 RepaintBoundary for better performance
    • Full semantic labels for accessibility
    • High contrast theme support
    • Custom MyanmarCalendarTheme support
    • Automatic text scaling
    • Holiday and astrological indicators

Date Selection Modes

  • Added CalendarSelectionMode support to MyanmarCalendarWidget
    • 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: onRangeSelected and onMultiSelected

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 AIPromptType to support Horoscope, Fortune Telling, and Divination
    • Fully localized prompt templates in all 6 supported languages
  • New Public API: MyanmarCalendar.generateAIPrompt for 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 MyanmarCalendarWidget to use OptimizedCalendarCell
    • Reduced code by ~155 lines
    • Better performance with RepaintBoundary
    • Automatic accessibility support
    • Consistent theming
  • Added westernWeekdayName getter to CompleteDate model
  • Updated to modern Flutter APIs
    • MediaQuery.textScalerOf() instead of deprecated textScaleFactor
    • MediaQuery.highContrastOf() instead of deprecated highContrast
    • Color.withValues(alpha:) instead of deprecated withOpacity()
    • SemanticsService.sendAnnouncement() with View
  • Simplified API: Publicly exported AIPromptService and AIPromptType
  • Improved MyanmarCalendarTheme with 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.dart
  • src/utils/performance_utils.dart
  • src/utils/accessibility_utils.dart
  • src/widgets/optimized_calendar_cell.dart

โš ๏ธ Notes #

  • The new LRUCache is a general-purpose utility. For caching calendar dates, continue using the built-in CalendarCache which 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 &f and &ff format by removing Yat in FormatService
  • 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: MyanmarDateTime cached with better approach
  • Added anniversary days and other holidays getter to MyanmarDateTime
  • Publically export translateNumbers() in FormatService

3.2.0 #

  • Added Cache system for faster repeated calendar lookups.

3.1.1 #

  • Added MoonPhaseIndicator widget
  • Added chronicles and dynasties data

3.1.0 #

  • Fixed myanmar National Day calculation.
  • Added National Day translation
  • 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 isToday calculation in CompleteDate
  • Fixed weekday style with compact mode flag
  • Fixed myanmar month translation
  • Added condition for special years in getMyanmarMonth()
  • Added MoonPhase painter and widget for early use. There is a plan to make more advance.

3.0.0-dev.3 #

  • Added more getter values like isToday in CompleteDate.
  • 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 puntuation and puntuation translation.

2.0.0 #

Breaking Changes

  • MmCalendarConfig improvement for calendar language translation.
  • Refactor code base for cleaness
  • Remove some unnecessay helper functions and files

1.1.2 #

  • Calculation classes 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 fortnightDay wrong for some year.

1.0.0 #

  • Update flutter_lints to 4.0.0
  • Stable version release.

0.0.8 #

  • Upgrade flutter_lints to 3.0.0
  • Update README.md document

0.0.7 #

  • Fixed: getSabbath() return wrong value

0.0.6 #

  • Fixed: Thingyan calculation wrong
  • Add more example

0.0.5 #

  • Add Tai and Karen language maps
  • Change to name parameters in MyanmarDate.formatByPatternAndLanguage and MyanmarDate.format

0.0.4 #

  • Update README.md
  • Fixed: calculator not exported
  • Myanmar Thingyan days retrieving.

0.0.3 #

  • Update README.md
  • Update example code

0.0.2 #

  • Redesign code base

0.0.1 #

  • MyanmarDateConverter
  • WesternDateConverter
  • AstrologicalConverter
  • Holidays calculation including myanmar Thingyan holidays.
9
likes
160
points
295
downloads
screenshot

Documentation

API reference

Publisher

verified publisherkyawzayartun.com

Weekly Downloads

Myanmar calendar widgets for Flutter in Material 3, Cupertino and Liquid Glass: month, lunar month and year views, pickers, holidays, moon phases and astrology.

Repository (GitHub)
View/report issues

Topics

#calendar #myanmar-calendar #myanmar-datetime #utility #myanmar-calendar-view

Funding

Consider supporting this project:

www.buymeacoffee.com

License

MIT (license)

Dependencies

flutter, myanmar_calendar_dart

More

Packages that depend on flutter_mmcalendar