vibration_ohos 0.0.1 copy "vibration_ohos: ^0.0.1" to clipboard
vibration_ohos: ^0.0.1 copied to clipboard

The OpenHarmony implementation of vibration.

vibration_ohos #

The OpenHarmony implementation of vibration.

vibration 在 OpenHarmony 平台的实现。

Add the following permission settings to your project's module.json5 file.

在你的项目的 module.json5 文件中增加以下权限设置。

    "requestPermissions": [
         {"name" :  "ohos.permission.VIBRATE"},                
    ]

Usage #

dependencies:
  vibration: any
  vibration_ohos: any

vibrateEffect and vibrateAttribute are only exist in VibrationOhos.

 (VibrationPlatform.instance as VibrationOhos).vibrate(
   vibrateEffect: const VibratePreset(count: 100),
   vibrateAttribute: const VibrateAttribute(
     usage: 'alarm',
   ),
 );
0
likes
130
points
61
downloads

Publisher

verified publisherharmonycandies.com

Weekly Downloads

The OpenHarmony implementation of vibration.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

device_info_plus_ohos, flutter, vibration_platform_interface

More

Packages that depend on vibration_ohos