MonthpickerController class
Global controller of the dialog. It holds the initial parameters passed on the widget creation.
Constructors
- MonthpickerController({DateTime? initialDate, DateTime? initialRangeDate, DateTime? endRangeDate, DateTime? firstDate, DateTime? lastDate, bool selectableMonthPredicate(DateTime)?, bool selectableYearPredicate(int)?, ButtonStyle? monthStylePredicate(DateTime)?, ButtonStyle? yearStylePredicate(int)?, required ThemeData theme, required bool useMaterial3, Widget? headerTitle, bool rangeMode = false, bool rangeList = false, required MonthPickerDialogSettings monthPickerDialogSettings, bool onlyYear = false})
Properties
- endRangeDate ↔ DateTime?
-
getter/setter pair
- firstDate → DateTime?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerTitle → Widget?
-
final
- initialDate → DateTime?
-
final
- initialRangeDate ↔ DateTime?
-
getter/setter pair
- lastDate → DateTime?
-
final
- localFirstDate ↔ DateTime?
-
getter/setter pair
- localLastDate ↔ DateTime?
-
getter/setter pair
- monthPageController ↔ PageController?
-
getter/setter pair
- monthPageCount ↔ int
-
getter/setter pair
- monthPickerDialogSettings → MonthPickerDialogSettings
-
final
-
monthSelectorState
→ GlobalKey<
MonthSelectorState> -
final
- monthStylePredicate → ButtonStyle? Function(DateTime)?
-
final
- now → DateTime
-
final
- onlyYear → bool
-
final
- rangeList → bool
-
final
- rangeMode → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectableMonthPredicate → bool Function(DateTime)?
-
final
- selectableYearPredicate → bool Function(int)?
-
final
- selectedDate ↔ DateTime
-
getter/setter pair
- theme → ThemeData
-
final
- useMaterial3 → bool
-
final
- yearItemCount ↔ int
-
getter/setter pair
- yearPageController ↔ PageController?
-
getter/setter pair
- yearPageCount ↔ int
-
getter/setter pair
-
yearSelectorState
→ GlobalKey<
YearSelectorState> -
final
- yearStylePredicate → ButtonStyle? Function(int)?
-
final
Methods
-
cancelFunction(
BuildContext context) → void - function to cancel selecting a month
-
dispose(
) → void - Function to dispose year and month pages when the dialog closes.
-
firstPossibleMonth(
int year) → void - function to get first possible month after selecting a year
-
getDateTimeHeaderText(
String localeString) → String - function to show datetime in header
-
getMonthPageCount(
DateTime? firstDate, DateTime? lastDate) → int - month pages count
-
getYearItemCount(
DateTime? firstDate, DateTime? lastDate) → int - year item count
-
getYearPageCount(
DateTime? firstDate, DateTime? lastDate) → int - year pages count
-
initialize(
) → void - Function to initialize the controller when the dialog is created.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
okFunction(
BuildContext context) → void - function to confirm selecting a month
-
onDownButtonPressed(
) → void - function to move the page when down header button is pressed
-
onRangeDateSelect(
DateTime time) → void -
onUpButtonPressed(
) → void - function to move the page when up header button is pressed
-
rangeListCreation(
DateTime startDate, DateTime endDate) → List< DateTime> - function to return the full list range of selected months
-
selectRange(
) → List< DateTime> - function to return the range of selected months
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited