startShakeDetection static method

void startShakeDetection(
  1. VoidCallback onShake
)

Start shake detection.

Implementation

static void startShakeDetection(VoidCallback onShake) {
  if (_config.enableShake && _config.enable) {
    _shakeDetector = ShakeDetector.autoStart(
      onPhoneShake: onShake,
      shakeThresholdGravity: 2.5,
      shakeSlopTimeMS: 500,
      shakeCountResetTime: 1000,
    );
  }
}