vibration 0.0.4 copy "vibration: ^0.0.4" to clipboard
vibration: ^0.0.4 copied to clipboard

outdated

A plugin for handling Vibration API on iOS and Android devices

Vibration #

Build Status

A plugin for handling Vibration API on iOS and Android devices.

Getting Started #

  1. Add vibration to the dependencies section of pubspec.yaml.

    dependencies:
      vibration:
        git:
          url: git@github.com:benjamindean/flutter_vibration.git
    
  2. Import package:

    import 'package:vibration/vibration.dart';
    

Methods #

Vibration.hasVibrator() #

Used to check if the target device has vibration capabilities. Returns bool.

Vibration.vibrate(...) #

Vibration.vibrate(duration: [int], pattern: [List<int>], repeat: [int])

Vibrate device for a certain duration or by pattern. Default duration is 500ms.

Vibration.cancel() #

Stop ongoing vibration.

Android #

Supports vibration with duration and pattern. On Android 8 (Oreo) and above, uses the VibrationEffect class. For the rest of the usage instructions, see Vibrator class documentation.

iOS #

Only supports singular vibrations with 500ms duration.

769
likes
0
pub points
99%
popularity

Publisher

unverified uploader

A plugin for handling Vibration API on iOS and Android devices

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_test

More

Packages that depend on vibration