month_picker_dialog
7.0.0, released 8 days ago by an unverified publisher
Material-style dialog for selecting months, month ranges, and years.
What it does
Provides ready-to-use dialog functions to pick individual months, ranges of months, or years without selecting individual days. It integrates with Flutter's localization and the intl package to support internationalized month and year formats. The appearance and behavior of headers, grids, and action buttons are configurable through dedicated settings classes.
AI-written summary of version 7.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a user to select only a month and year (e.g., credit card expiration or billing cycles) without day-level granularity.
- You need month range selection in a dialog format.
- You want a Material date picker interface localized to various languages.
Skip it when
- You need day-level date picking (standard Flutter showDatePicker or calendar pickers are better suited).
- You need an inline calendar widget rather than a modal dialog.
Strengths
- Supports single month, month range, and year-only selection modes.
- Extensively customizable appearance through MonthPickerDialogSettings (header, dialog, buttons, action bar).
- Built-in internationalization via the intl package and Flutter localization.
Weaknesses
- Dialog-focused, offering no documented inline widget variant.
- Requires managing potential version conflicts with the intl dependency.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Requires Flutter localization and intl configuration for non-English locales.
FloatingActionButton(
onPressed: () {
showMonthPicker(
context: context,
initialDate: DateTime.now(),
).then((date) {
if (date != null) {
setState(() {
selectedDate = date;
});
}
});
},
child: const Icon(Icons.calendar_today),
)Alternatives
Packages that do the same job and could replace month_picker_dialog.
- calendar_date_picker2
Pick calendar_date_picker2 if you need standard day-level calendar views or inline picker widgets.
83Compare
Works with
Packages commonly used together with month_picker_dialog: ones it builds on, ones built on it, and its own family.
- intlmonth_picker_dialog depends on itA Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
- material_uimonth_picker_dialog depends on itOfficial Flutter Material UI library implementing Google’s Material Design system.
- providermonth_picker_dialog depends on itA lightweight wrapper around InheritedWidget for state management