KeyboardOptions constructor

const KeyboardOptions({
  1. bool enableArrowKeysPanning = true,
  2. bool enableWASDPanning = false,
  3. bool enableQERotating = false,
  4. bool enableRFZooming = false,
  5. double maxPanVelocity(
    1. double zoom
    )?,
  6. double panLeapVelocityMultiplier = 5,
  7. double maxZoomVelocity = 0.03,
  8. double zoomLeapVelocityMultiplier = 3,
  9. double maxRotateVelocity = 3,
  10. double rotateLeapVelocityMultiplier = 3,
  11. Duration animationCurveDuration = const Duration(milliseconds: 450),
  12. Duration? animationCurveReverseDuration = const Duration(milliseconds: 600),
  13. Curve animationCurveCurve = Curves.easeInOut,
  14. Duration? performLeapTriggerDuration = const Duration(milliseconds: 100),
  15. double leapMaxOfCurveComponent = 0.6,
  16. FocusNode? focusNode,
  17. 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)',
      );