Skip to content
pubscout

vibration

3.2.1, released 3 months ago by an unverified publisher

A plugin for handling the Vibration API on iOS, Android, web, and OpenHarmony.

$ flutter pub add vibration
Source repository

What it does

Provides methods to trigger device vibrations with custom durations, patterns, intensities, amplitudes, sharpness, and predefined presets. It also allows checking for vibration capabilities and amplitude control support.

AI-written summary of version 3.2.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to trigger tactile feedback or vibration patterns on mobile or web devices.
  • You want to use predefined vibration presets for common alerts and notifications.

Skip it when

  • You only need standard UI haptic feedback handled automatically by Flutter's HapticFeedback class.

Strengths

  • Supports multiple platforms including Android, iOS, web, and OpenHarmony.
  • Provides granular control over vibration duration, patterns, intensities, and amplitude.
  • Includes a rich set of vibration presets.

Weaknesses

  • Amplitude and custom vibration controls depend heavily on OS version and hardware capabilities.
  • Requires manual native permission configuration for Android and OpenHarmony.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
2

Requires adding the VIBRATE permission to AndroidManifest.xml and/or module.json5 for OpenHarmony.

if (await Vibration.hasVibrator()) {
    Vibration.vibrate(duration: 1000);
}

Alternatives

Packages that do the same job and could replace vibration.

Works with

Packages commonly used together with vibration: ones it builds on, ones built on it, and its own family.