CalendarSnapping class

The CalendarSnapping class defines the snapping settings for the calendar.

This class allows you to configure various aspects of how events snap to specific intervals or other events in the calendar.

Example usage:

CalendarSnapping(
  snapIntervalMinutes: 15,
  snapToTimeIndicator: true,
  snapToOtherEvents: true,
  snapRange: Duration(minutes: 10),
);

Constructors

CalendarSnapping({int snapIntervalMinutes = defaultSnapIntervalMinutes, bool snapToTimeIndicator = defaultSnapToTimeIndicator, bool snapToOtherEvents = defaultSnapToOtherEvents, Duration snapRange = defaultSnapRange, EventSnapStrategy eventSnapStrategy = defaultSnapStrategy})
Creates a new CalendarSnapping instance with the specified settings.
const

Properties

eventSnapStrategy EventSnapStrategy
The strategy used to snap events to specific intervals.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapIntervalMinutes int
The snap interval in minutes for events.
final
snapRange Duration
The Duration in which events will snap to other events.
final
snapToOtherEvents bool
Whether to snap to other events when altering an event.
final
snapToTimeIndicator bool
Whether to snap to the time indicator when altering an event.
final

Methods

copyWith({int? snapIntervalMinutes, bool? snapToTimeIndicator, bool? snapToOtherEvents, Duration? snapRange}) CalendarSnapping
Creates a copy of this CalendarSnapping but with the given fields replaced with the new values. If the fields are not provided, the original values will be used.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override