Flutter

Implementing Vibration in a Flutter App

In app development, implementing vibration is a basic yet highly versatile feature that you'll want to implement as one of the first tutorial-like stages. The method for implementing vibration in Flutter app development is kept simpler compared to methods using Java and other languages.

Shou Arisaka
1 min read
Oct 26, 2025

In app development, implementing vibration is a basic yet highly versatile feature that youโ€™ll want to implement as one of the first tutorial-like stages. The method for implementing vibration in Flutter app development is kept simpler compared to methods using Java and other languages.

Add the following to pubspec.yaml.

dependencies:
    vibration: ^1.7.3

Add the following to AndroidManifest.xml.

<uses-permission android:name="android.permission.VIBRATE"/>

Edit the dart file as follows. With this

import 'package:vibration/vibration.dart';

..

Vibration.vibrate();

Example of vibrating only when vibration functionality is available


if (await Vibration.hasAmplitudeControl()) {
    Vibration.vibrate(amplitude: 128);
}

If you want to specify vibration patterns or duration

Vibration.vibrate(duration: 1000);

Vibration.vibrate(pattern: [500, 1000, 500, 2000]);

(Reference)

vibration | Flutter Package

Share this article

Shou Arisaka Oct 26, 2025

๐Ÿ”— Copy Links