CalendarControllerProvider constructor
CalendarControllerProvider({
- required DateTime focusedDay,
- required DateTime firstDay,
- required DateTime lastDay,
- DateTime? currentDay,
- dynamic locale,
- DateTime? rangeStartDay,
- DateTime? rangeEndDay,
- List<
int> weekendDays = const [DateTime.saturday, DateTime.sunday], - CalendarFormat calendarFormat = CalendarFormat.month,
- Map<
CalendarFormat, String> availableCalendarFormats = const {CalendarFormat.month : 'Month', CalendarFormat.twoWeeks : '2 weeks', CalendarFormat.week : 'Week'}, - bool headerVisible = true,
- bool daysOfWeekVisible = true,
- bool pageJumpingEnabled = false,
- bool pageAnimationEnabled = true,
- bool sixWeekMonthsEnforced = false,
- bool shouldFillViewport = false,
- bool weekNumbersVisible = false,
- double rowHeight = 52.0,
- double daysOfWeekHeight = 16.0,
- Duration formatAnimationDuration = const Duration(milliseconds: 200),
- Curve formatAnimationCurve = Curves.linear,
- Duration pageAnimationDuration = const Duration(milliseconds: 300),
- Curve pageAnimationCurve = Curves.easeOut,
- StartingDayOfWeek startingDayOfWeek = StartingDayOfWeek.sunday,
- HitTestBehavior dayHitTestBehavior = HitTestBehavior.opaque,
- AvailableGestures availableGestures = AvailableGestures.all,
- SimpleSwipeConfig simpleSwipeConfig = const SimpleSwipeConfig(verticalThreshold: 25.0, swipeDetectionBehavior: SwipeDetectionBehavior.continuousDistinct),
- HeaderStyle headerStyle = const HeaderStyle(),
- DaysOfWeekStyle daysOfWeekStyle = const DaysOfWeekStyle(),
- CalendarStyle calendarStyle = const CalendarStyle(),
- CalendarBuilders calendarBuilders = const CalendarBuilders(),
- RangeSelectionMode rangeSelectionMode = RangeSelectionMode.toggledOff,
- List eventLoader()?,
- bool enabledDayPredicate()?,
- bool selectedDayPredicate()?,
- bool holidayPredicate()?,
- void onRangeSelected()?,
- void onDaySelected()?,
- void onDayLongPressed()?,
- void onDisabledDayTapped()?,
- void onDisabledDayLongPressed()?,
- void onHeaderTapped()?,
- void onHeaderLongPressed()?,
- void onPageChanged()?,
- void onFormatChanged(
- CalendarFormat
- void onCalendarCreated()?,
CalendarController is a controller for the Calendar UI.
Copied from CalendarController.
Implementation
CalendarControllerProvider({
required DateTime focusedDay,
required DateTime firstDay,
required DateTime lastDay,
DateTime? currentDay,
dynamic locale,
DateTime? rangeStartDay,
DateTime? rangeEndDay,
List<int> weekendDays = const [DateTime.saturday, DateTime.sunday],
CalendarFormat calendarFormat = CalendarFormat.month,
Map<CalendarFormat, String> availableCalendarFormats = const {
CalendarFormat.month: 'Month',
CalendarFormat.twoWeeks: '2 weeks',
CalendarFormat.week: 'Week'
},
bool headerVisible = true,
bool daysOfWeekVisible = true,
bool pageJumpingEnabled = false,
bool pageAnimationEnabled = true,
bool sixWeekMonthsEnforced = false,
bool shouldFillViewport = false,
bool weekNumbersVisible = false,
double rowHeight = 52.0,
double daysOfWeekHeight = 16.0,
Duration formatAnimationDuration = const Duration(milliseconds: 200),
Curve formatAnimationCurve = Curves.linear,
Duration pageAnimationDuration = const Duration(milliseconds: 300),
Curve pageAnimationCurve = Curves.easeOut,
StartingDayOfWeek startingDayOfWeek = StartingDayOfWeek.sunday,
HitTestBehavior dayHitTestBehavior = HitTestBehavior.opaque,
AvailableGestures availableGestures = AvailableGestures.all,
SimpleSwipeConfig simpleSwipeConfig = const SimpleSwipeConfig(
verticalThreshold: 25.0,
swipeDetectionBehavior: SwipeDetectionBehavior.continuousDistinct),
HeaderStyle headerStyle = const HeaderStyle(),
DaysOfWeekStyle daysOfWeekStyle = const DaysOfWeekStyle(),
CalendarStyle calendarStyle = const CalendarStyle(),
CalendarBuilders<dynamic> calendarBuilders = const CalendarBuilders(),
RangeSelectionMode rangeSelectionMode = RangeSelectionMode.toggledOff,
List<dynamic> Function(DateTime)? eventLoader,
bool Function(DateTime)? enabledDayPredicate,
bool Function(DateTime)? selectedDayPredicate,
bool Function(DateTime)? holidayPredicate,
void Function(DateTime?, DateTime?, DateTime)? onRangeSelected,
void Function(DateTime, DateTime)? onDaySelected,
void Function(DateTime, DateTime)? onDayLongPressed,
void Function(DateTime)? onDisabledDayTapped,
void Function(DateTime)? onDisabledDayLongPressed,
void Function(DateTime)? onHeaderTapped,
void Function(DateTime)? onHeaderLongPressed,
void Function(DateTime)? onPageChanged,
void Function(CalendarFormat)? onFormatChanged,
void Function(PageController)? onCalendarCreated,
}) : this._internal(
() => CalendarController()
..focusedDay = focusedDay
..firstDay = firstDay
..lastDay = lastDay
..currentDay = currentDay
..locale = locale
..rangeStartDay = rangeStartDay
..rangeEndDay = rangeEndDay
..weekendDays = weekendDays
..calendarFormat = calendarFormat
..availableCalendarFormats = availableCalendarFormats
..headerVisible = headerVisible
..daysOfWeekVisible = daysOfWeekVisible
..pageJumpingEnabled = pageJumpingEnabled
..pageAnimationEnabled = pageAnimationEnabled
..sixWeekMonthsEnforced = sixWeekMonthsEnforced
..shouldFillViewport = shouldFillViewport
..weekNumbersVisible = weekNumbersVisible
..rowHeight = rowHeight
..daysOfWeekHeight = daysOfWeekHeight
..formatAnimationDuration = formatAnimationDuration
..formatAnimationCurve = formatAnimationCurve
..pageAnimationDuration = pageAnimationDuration
..pageAnimationCurve = pageAnimationCurve
..startingDayOfWeek = startingDayOfWeek
..dayHitTestBehavior = dayHitTestBehavior
..availableGestures = availableGestures
..simpleSwipeConfig = simpleSwipeConfig
..headerStyle = headerStyle
..daysOfWeekStyle = daysOfWeekStyle
..calendarStyle = calendarStyle
..calendarBuilders = calendarBuilders
..rangeSelectionMode = rangeSelectionMode
..eventLoader = eventLoader
..enabledDayPredicate = enabledDayPredicate
..selectedDayPredicate = selectedDayPredicate
..holidayPredicate = holidayPredicate
..onRangeSelected = onRangeSelected
..onDaySelected = onDaySelected
..onDayLongPressed = onDayLongPressed
..onDisabledDayTapped = onDisabledDayTapped
..onDisabledDayLongPressed = onDisabledDayLongPressed
..onHeaderTapped = onHeaderTapped
..onHeaderLongPressed = onHeaderLongPressed
..onPageChanged = onPageChanged
..onFormatChanged = onFormatChanged
..onCalendarCreated = onCalendarCreated,
from: calendarControllerProvider,
name: r'calendarControllerProvider',
debugGetCreateSourceHash:
const bool.fromEnvironment('dart.vm.product')
? null
: _$calendarControllerHash,
dependencies: CalendarControllerFamily._dependencies,
allTransitiveDependencies:
CalendarControllerFamily._allTransitiveDependencies,
focusedDay: focusedDay,
firstDay: firstDay,
lastDay: lastDay,
currentDay: currentDay,
locale: locale,
rangeStartDay: rangeStartDay,
rangeEndDay: rangeEndDay,
weekendDays: weekendDays,
calendarFormat: calendarFormat,
availableCalendarFormats: availableCalendarFormats,
headerVisible: headerVisible,
daysOfWeekVisible: daysOfWeekVisible,
pageJumpingEnabled: pageJumpingEnabled,
pageAnimationEnabled: pageAnimationEnabled,
sixWeekMonthsEnforced: sixWeekMonthsEnforced,
shouldFillViewport: shouldFillViewport,
weekNumbersVisible: weekNumbersVisible,
rowHeight: rowHeight,
daysOfWeekHeight: daysOfWeekHeight,
formatAnimationDuration: formatAnimationDuration,
formatAnimationCurve: formatAnimationCurve,
pageAnimationDuration: pageAnimationDuration,
pageAnimationCurve: pageAnimationCurve,
startingDayOfWeek: startingDayOfWeek,
dayHitTestBehavior: dayHitTestBehavior,
availableGestures: availableGestures,
simpleSwipeConfig: simpleSwipeConfig,
headerStyle: headerStyle,
daysOfWeekStyle: daysOfWeekStyle,
calendarStyle: calendarStyle,
calendarBuilders: calendarBuilders,
rangeSelectionMode: rangeSelectionMode,
eventLoader: eventLoader,
enabledDayPredicate: enabledDayPredicate,
selectedDayPredicate: selectedDayPredicate,
holidayPredicate: holidayPredicate,
onRangeSelected: onRangeSelected,
onDaySelected: onDaySelected,
onDayLongPressed: onDayLongPressed,
onDisabledDayTapped: onDisabledDayTapped,
onDisabledDayLongPressed: onDisabledDayLongPressed,
onHeaderTapped: onHeaderTapped,
onHeaderLongPressed: onHeaderLongPressed,
onPageChanged: onPageChanged,
onFormatChanged: onFormatChanged,
onCalendarCreated: onCalendarCreated,
);