FCalendarController<T> class
abstract
A controller that controls date selection in a calendar.
The DateTimes are always in UTC timezone and truncated to the nearest day.
This class should be extended to customize date selection. By default, the following controllers are provided:
- FCalendarController.date for selecting a single date.
- FCalendarController.dates for selecting multiple date.
- FCalendarController.range for selecting a single range.
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier<
T> - FValueNotifier<
T> - FCalendarController
Constructors
- FCalendarController(T _value)
- Creates a FCalendarController with the given initial value.
Properties
- disposed → bool
-
True if this notifier has been disposed.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T
-
The current value stored in this notifier.
getter/setter pairinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
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
-
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
-
select(
DateTime date) → void -
Selects the given
date
. -
selectable(
DateTime date) → bool -
Returns true if the given
date
can be selected/unselected. -
selected(
DateTime date) → bool -
Returns true if the given
date
is selected. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
date(
{DateTime? initialSelection, Predicate< DateTime> ? selectable}) → FCalendarController<DateTime?> - Creates a FCalendarController that allows only a single date to be selected, with the given initially selected date.
-
dates(
{Set< DateTime> initialSelections = const {}, Predicate<DateTime> ? selectable}) → FCalendarController<Set< DateTime> > - Creates a FCalendarController that allows multiple dates to be selected, with the given initial selected dates.
-
range(
{(DateTime, DateTime)? initialSelection, Predicate< DateTime> ? selectable}) → FCalendarController<(DateTime, DateTime)?> - Creates a FCalendarController that allows a single range to be selected, with the given initial range.