CrCalendarController class final
Controller for CrCalendar.
- Inheritance
-
- Object
- ChangeNotifier
- CrCalendarController
Constructors
-
CrCalendarController({OnSwipeCallback? onSwipe, List<
CalendarEventModel> ? events}) - Default constructor.
Properties
- date ↔ DateTime
-
Current opened date in calendar.
getter/setter pair
-
events
→ List<
CalendarEventModel> ? -
All calendar event currently stored by controller.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
isShowingEvents
→ ValueNotifier<
bool> -
Events visibility.
no setter
- onSwipe ↔ OnSwipeCallback?
-
Callback for detection calendar page changed.
getter/setter pair
- page ↔ int
-
Current calendar view page.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedDate ↔ DateTime?
-
Selected day in calendar.
getter/setter pair
-
selectedEvents
↔ List<
CalendarEventModel> ? -
List of events which are in selected day or selected range.
getter/setter pair
- selectedRange ↔ DateRangeModel
-
See
DateRangeModel
.getter/setter pair
Methods
-
addEvent(
CalendarEventModel event) → void - Add one event.
-
addEvents(
List< CalendarEventModel> events) → void - Add list of events.
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
clearSelected(
) → void - Clear selected day
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
goToDate(
DateTime dateToGoTo, {bool selectDate = false, Duration? durationAnimation, Curve? curve}) → void -
Go to
dateToGoTo
selectDate
- will date be selecteddurationAnimation
,curve
- animation parameters -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
swipeToNextMonth(
[Duration? animationDuration, Curve? curve]) → void - Swipe to the next month page.
-
swipeToPreviousPage(
[Duration? animationDuration, Curve? curve]) → void - Swipe to the previous month page.
-
toggleEvents(
) → void - Show or hide events
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited