MonthRangePicker constructor
const
MonthRangePicker({
- Key? key,
- DateTime? initialDate,
- DateTime? firstDate,
- DateTime? lastDate,
- int selectedTab = 0,
- dynamic onConfirm()?,
- DateTimeRange<
DateTime> ? initialDateTimeRange, - bool showTabs = true,
- bool showOnlyCustomRange = false,
- String headerText = 'Select month and year',
- bool showAllMonths = false,
- Color? primaryColor,
- Color? unselectedTextColor,
- String? fontFamily,
- TextStyle? tabTextStyle,
- TextStyle? headerTextStyle,
- TextStyle? pickerTextStyle,
- TextStyle? dateTextStyle,
- TextStyle? buttonTextStyle,
- TextStyle? errorTextStyle,
- TextStyle? labelTextStyle,
- int? maxRangeMonths,
- int? maxRangeYears,
- Widget confirmButtonBuilder(
- VoidCallback onConfirm
- void onValidationError(
- BuildContext context,
- String message
Implementation
const MonthRangePicker({
super.key,
this.initialDate,
this.firstDate,
this.lastDate,
this.selectedTab = 0,
this.onConfirm,
this.initialDateTimeRange,
this.showTabs = true,
this.showOnlyCustomRange = false,
this.headerText = 'Select month and year',
this.showAllMonths = false,
this.primaryColor,
this.unselectedTextColor,
this.fontFamily,
this.tabTextStyle,
this.headerTextStyle,
this.pickerTextStyle,
this.dateTextStyle,
this.buttonTextStyle,
this.errorTextStyle,
this.labelTextStyle,
this.maxRangeMonths,
this.maxRangeYears,
this.confirmButtonBuilder,
this.onValidationError,
}) : assert(
!(initialDate != null && initialDateTimeRange != null),
'Both initialDate and initialDateTimeRange cannot be provided',
);