KeyboardOptions constructor
const
KeyboardOptions({
- bool enableArrowKeysPanning = true,
- bool enableWASDPanning = false,
- bool enableQERotating = false,
- bool enableRFZooming = false,
- double maxPanVelocity(
- double zoom
- double panLeapVelocityMultiplier = 5,
- double maxZoomVelocity = 0.03,
- double zoomLeapVelocityMultiplier = 3,
- double maxRotateVelocity = 3,
- double rotateLeapVelocityMultiplier = 3,
- Duration animationCurveDuration = const Duration(milliseconds: 450),
- Duration? animationCurveReverseDuration = const Duration(milliseconds: 600),
- Curve animationCurveCurve = Curves.easeInOut,
- Duration? performLeapTriggerDuration = const Duration(milliseconds: 100),
- double leapMaxOfCurveComponent = 0.6,
- FocusNode? focusNode,
- bool autofocus = true,
Create options which specify how the map may be controlled by keyboard keys
Only enableArrowKeysPanning
is true
by default.
Use KeyboardOptions.disabled to disable the keyboard keys.
Implementation
const KeyboardOptions({
this.enableArrowKeysPanning = true,
this.enableWASDPanning = false,
this.enableQERotating = false,
this.enableRFZooming = false,
this.maxPanVelocity,
this.panLeapVelocityMultiplier = 5,
this.maxZoomVelocity = 0.03,
this.zoomLeapVelocityMultiplier = 3,
this.maxRotateVelocity = 3,
this.rotateLeapVelocityMultiplier = 3,
this.animationCurveDuration = const Duration(milliseconds: 450),
this.animationCurveReverseDuration = const Duration(milliseconds: 600),
this.animationCurveCurve = Curves.easeInOut,
this.performLeapTriggerDuration = const Duration(milliseconds: 100),
this.leapMaxOfCurveComponent = 0.6,
this.focusNode,
this.autofocus = true,
}) : assert(
leapMaxOfCurveComponent > 0 && leapMaxOfCurveComponent <= 1,
'`leapMaxOfCurveComponent` must be between 0 (exclusive) and 1 '
'(inclusive)',
);