Showing preview only (349K chars total). Download the full file or copy to clipboard to get everything.
Repository: benjamindean/flutter_vibration
Branch: master
Commit: fcc432161afb
Files: 131
Total size: 311.2 KB
Directory structure:
gitextract_02fjpw07/
├── .gitignore
├── .metadata
├── .travis.yml
├── .vscode/
│ └── settings.json
├── README.md
├── vibration/
│ ├── .gitignore
│ ├── .metadata
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── analysis_options.yaml
│ ├── android/
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── settings.gradle
│ │ └── src/
│ │ └── main/
│ │ ├── AndroidManifest.xml
│ │ └── java/
│ │ └── com/
│ │ └── benjaminabel/
│ │ └── vibration/
│ │ ├── Vibration.java
│ │ ├── VibrationMethodChannelHandler.java
│ │ └── VibrationPlugin.java
│ ├── example/
│ │ ├── .gitignore
│ │ ├── .metadata
│ │ ├── README.md
│ │ ├── analysis_options.yaml
│ │ ├── android/
│ │ │ ├── .gitignore
│ │ │ ├── app/
│ │ │ │ ├── build.gradle
│ │ │ │ └── src/
│ │ │ │ ├── debug/
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ ├── main/
│ │ │ │ │ ├── AndroidManifest.xml
│ │ │ │ │ ├── java/
│ │ │ │ │ │ └── com/
│ │ │ │ │ │ └── example/
│ │ │ │ │ │ └── example/
│ │ │ │ │ │ └── MainActivity.java
│ │ │ │ │ └── res/
│ │ │ │ │ ├── drawable/
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── drawable-v21/
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── values/
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ └── values-night/
│ │ │ │ │ └── styles.xml
│ │ │ │ └── profile/
│ │ │ │ └── AndroidManifest.xml
│ │ │ ├── build.gradle
│ │ │ ├── gradle/
│ │ │ │ └── wrapper/
│ │ │ │ └── gradle-wrapper.properties
│ │ │ ├── gradle.properties
│ │ │ └── settings.gradle
│ │ ├── ios/
│ │ │ ├── .gitignore
│ │ │ ├── Flutter/
│ │ │ │ ├── AppFrameworkInfo.plist
│ │ │ │ ├── Debug.xcconfig
│ │ │ │ ├── Flutter.podspec
│ │ │ │ └── Release.xcconfig
│ │ │ ├── Runner/
│ │ │ │ ├── AppDelegate.swift
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── LaunchImage.imageset/
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── README.md
│ │ │ │ ├── Base.lproj/
│ │ │ │ │ ├── LaunchScreen.storyboard
│ │ │ │ │ └── Main.storyboard
│ │ │ │ ├── Info.plist
│ │ │ │ └── Runner-Bridging-Header.h
│ │ │ ├── Runner.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ ├── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ │ └── WorkspaceSettings.xcsettings
│ │ │ │ └── xcshareddata/
│ │ │ │ └── xcschemes/
│ │ │ │ └── Runner.xcscheme
│ │ │ ├── Runner.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ │ └── RunnerTests/
│ │ │ └── RunnerTests.swift
│ │ ├── lib/
│ │ │ └── main.dart
│ │ └── pubspec.yaml
│ ├── ios/
│ │ ├── .gitignore
│ │ ├── vibration/
│ │ │ ├── Package.swift
│ │ │ └── Sources/
│ │ │ └── vibration/
│ │ │ ├── Resources/
│ │ │ │ └── PrivacyInfo.xcprivacy
│ │ │ └── VibrationPlugin.swift
│ │ └── vibration.podspec
│ ├── lib/
│ │ ├── vibration.dart
│ │ └── vibration_presets.dart
│ ├── pubspec.yaml
│ └── test/
│ └── vibration_test.dart
├── vibration.iml
├── vibration_ohos/
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── analysis_options.yaml
│ ├── example/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── analysis_options.yaml
│ │ ├── assets/
│ │ │ └── haptic_file.json
│ │ ├── lib/
│ │ │ └── main.dart
│ │ ├── ohos/
│ │ │ ├── .gitignore
│ │ │ ├── AppScope/
│ │ │ │ ├── app.json5
│ │ │ │ └── resources/
│ │ │ │ └── base/
│ │ │ │ └── element/
│ │ │ │ └── string.json
│ │ │ ├── build-profile.json5
│ │ │ ├── entry/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── build-profile.json5
│ │ │ │ ├── hvigorfile.ts
│ │ │ │ ├── oh-package.json5
│ │ │ │ └── src/
│ │ │ │ └── main/
│ │ │ │ ├── ets/
│ │ │ │ │ ├── entryability/
│ │ │ │ │ │ └── EntryAbility.ets
│ │ │ │ │ ├── pages/
│ │ │ │ │ │ └── Index.ets
│ │ │ │ │ └── plugins/
│ │ │ │ │ └── GeneratedPluginRegistrant.ets
│ │ │ │ ├── module.json5
│ │ │ │ └── resources/
│ │ │ │ ├── base/
│ │ │ │ │ ├── element/
│ │ │ │ │ │ ├── color.json
│ │ │ │ │ │ └── string.json
│ │ │ │ │ └── profile/
│ │ │ │ │ └── main_pages.json
│ │ │ │ ├── en_US/
│ │ │ │ │ └── element/
│ │ │ │ │ └── string.json
│ │ │ │ └── zh_CN/
│ │ │ │ └── element/
│ │ │ │ └── string.json
│ │ │ ├── hvigor/
│ │ │ │ ├── hvigor-config.json5
│ │ │ │ └── hvigor-wrapper.js
│ │ │ ├── hvigorfile.ts
│ │ │ ├── hvigorw
│ │ │ ├── hvigorw.bat
│ │ │ └── oh-package.json5
│ │ └── pubspec.yaml
│ ├── lib/
│ │ └── vibration_ohos.dart
│ ├── ohos/
│ │ ├── .gitignore
│ │ ├── build-profile.json5
│ │ ├── hvigorfile.ts
│ │ ├── index.ets
│ │ ├── oh-package.json5
│ │ └── src/
│ │ └── main/
│ │ ├── ets/
│ │ │ └── components/
│ │ │ └── plugin/
│ │ │ └── VibrationOhosPlugin.ets
│ │ └── module.json5
│ └── pubspec.yaml
├── vibration_platform_interface/
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── lib/
│ │ ├── src/
│ │ │ └── method_channel_vibration.dart
│ │ └── vibration_platform_interface.dart
│ └── pubspec.yaml
└── vibration_web/
├── .flutter-plugins
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── ios/
│ ├── .gitignore
│ └── vibration_web.podspec
├── lib/
│ └── vibration_web.dart
├── pubspec.yaml
└── vibration_web.iml
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.DS_Store
.dart_tool/
.packages
.pub/
pubspec.lock
.idea/
build/
doc/
flutter_export_environment.sh
.flutter-plugins-dependencies
================================================
FILE: .metadata
================================================
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
channel: stable
project_type: plugin
================================================
FILE: .travis.yml
================================================
os:
- linux
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++6
- fonts-droid-fallback
before_script:
- git clone https://github.com/flutter/flutter.git -b stable
- ./flutter/bin/flutter doctor
script:
- cd vibration && ../flutter/bin/flutter test
cache:
directories:
- $HOME/.pub-cache
================================================
FILE: .vscode/settings.json
================================================
{
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"java.configuration.updateBuildConfiguration": "interactive"
}
================================================
FILE: README.md
================================================
# Vibration
[](https://travis-ci.org/benjamindean/flutter_vibration)
A plugin for handling Vibration API on iOS, Android, and web. [API docs.](https://pub.dartlang.org/documentation/vibration/latest/vibration/Vibration-class.html)
## Versions
[Android, iOS.](vibration)
[Web.](vibration_web)
================================================
FILE: vibration/.gitignore
================================================
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
build/
================================================
FILE: vibration/.metadata
================================================
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: "17025dd88227cd9532c33fa78f5250d548d87e9a"
channel: "stable"
project_type: plugin
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
- platform: android
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
- platform: ios
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
================================================
FILE: vibration/CHANGELOG.md
================================================
### 3.1.8
- Fix `repeat` parameter ignored on iOS. (#145 by @zeienko-vitalii)
### 3.1.7
- Fix Android deprecation warning for VIBRATOR_SERVICE. (#144 by @zeienko-vitalii)
### 3.1.7-dev.1
- Attempt to fix deprecation warning on Android.
### 3.1.6
- Fix crash on Android. (#140 by @armanagarwal)
### 3.1.5
- Adds Swift Package Manager compatibility.
### 3.1.4
> Note: This release has breaking changes.
>
> Plugin now requires the following:
>
> - Android Gradle Plugin >=8.12.1
> - Gradle wrapper >=8.13
> - Kotlin 2.2.0
- Bump package `vibration_platform_interface` to "0.1.1"
### 3.1.3
- Fix intensities on iOS.
- Lower miminum Compile SDK version for Android to 34
### 3.1.2
- Restore `hasAmplitudeControl` and `hasCustomVibrationsSupport` methods.
### 3.1.1
- Fix some cases where intensities were not being used correctly.
### 3.1.0
- Add common vibration patterns for Android and iOS.
- Add `sharpness` parameter for iOS.
- Suppress deprecation warnings for `vibrate` method on Android.
### 3.0.0
- The plugin has been recreated from scratch to align with the latest Flutter and Dart features.
- The iOS version no longer depends on intensities and amplitude, and it now supports custom durations and patterns.
- The example app is more intuitive and user-friendly.
- Calling the `hasVibrator` method is no longer necessary.
- Adjustments for null safety have been implemented.
## 2.1.0
- Fix vibration on iOS
- All methods are now properly null-safe
## 2.0.1
- Bump package `vibration_platform_interface` to "0.0.2"
## 2.0.0
- Remove references to Android embedding v1
- Update package:web to ">=0.5.1 <2.0.0" (#105 by [dkrutskikh](https://github.com/dkrutskikh))
## 1.9.0
- Added OpenHarmony support
- Migrate to common platform implement (vibration_platform_interface)
## 1.8.4
- Added Web support (#95 by [san-smith](https://github.com/san-smith))
## 1.8.2
- Raise minimum and target SDK versions for Android to upgrade Gradle to 7.5.
## 1.8.0
- Use `device_info_plus` for `hasAmplitudeControl` and `hasVibrator` methods.
## 1.7.7
- Adds a namespace attribute to the Android build.gradle, for compatibility with Android Gradle Plugin 8.0.
## 1.7.6
- Update package's dart SDK max version (under 3.0.0)
## 1.7.5
- Bump `vibration_web` to 1.6.4.
## 1.7.4
- Migrating to null safety.
## 1.7.3
- Use targetEnvironment check on iOS.
## 1.7.2
- Updated description to indicate web support.
## 1.7.1
- Fix building on iOS.
## 1.7.0
- Use Android Embedding v2.
## 1.6.1
- Added Web support (#43 by [roulljdh](https://github.com/roulljdh))
## 1.5.0
- Fibration now works in backgroud on Android (#40 by [wanghaiyang5241](https://github.com/wanghaiyang5241))
## 1.4.0
- Added a `hasCustomVibrationsSupport` method (#34 by [Skyost](https://github.com/Skyost))
- Use Swift 5.0
## 1.3.1
- Fix #32 (by [Hugo Heneault](https://github.com/HugoHeneault))
## 1.3.0
- Add support for CoreHaptics on iOS devices #30 (by [Leicas](https://github.com/Leicas))
## 1.2.4
- Move `flutter_test` to dev_dependencies. Fixes issue #24.
## 1.2.3
- Add proper indication of async methods to docs (by [@qqgg231](https://github.com/qqgg231))
## 1.2.2
- Suppress deprecation warnings for `vibrate` method
## 1.2.1
- Maintenance release
## 1.2.0
- Add support for amplitude control under Android 8.0 and later (by [@pmundt](https://github.com/pmundt))
## 1.1.0
- Migrate to AndroidX (by [@gastonmuijtjens](https://github.com/gastonmuijtjens))
- Add unit test for canceling vibration (by [@vintage](https://github.com/vintage))
## 1.0.2
- Update vibration.podspec
## 1.0.1
- Implemented `cancel` method for iOS
## 1.0.0
- Initial Release
================================================
FILE: vibration/LICENSE
================================================
BSD 2-Clause License
Copyright (c) 2018, Benjamin Dean
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: vibration/README.md
================================================
# Vibration
[](https://travis-ci.org/benjamindean/flutter_vibration)
A plugin for handling Vibration API on iOS, Android, and web. [API docs.](https://pub.dartlang.org/documentation/vibration/latest/vibration/Vibration-class.html)
## Getting Started
1. Add `vibration` to the dependencies section of `pubspec.yaml`.
```yml
dependencies:
vibration: ^3.1.3
```
2. Import package:
```dart
import 'package:vibration/vibration.dart';
```
## Methods
### hasVibrator
Check if the target device has vibration capabilities. Not required when using other methods.
```dart
if (await Vibration.hasVibrator()) {
Vibration.vibrate();
}
```
### hasAmplitudeControl
Check if the target device has the ability to control the vibration amplitude,
introduced in Android 8.0 Oreo - false for all earlier API levels.
```dart
if (await Vibration.hasAmplitudeControl()) {
Vibration.vibrate(amplitude: 128);
}
```
### hasCustomVibrationsSupport
Check if the device is able to vibrate with a custom duration, pattern or intensity.
May return `true` even if the device has no vibrator (if you want to check whether the device has a vibrator,
see [`hasVibrator`](#hasVibrator)).
```dart
if (await Vibration.hasCustomVibrationsSupport()) {
Vibration.vibrate(duration: 1000);
} else {
Vibration.vibrate();
await Future.delayed(Duration(milliseconds: 500));
Vibration.vibrate();
}
```
### vibrate
#### Method Arguments
- `duration`: Duration of the vibration in milliseconds. Default is 500ms.
- `pattern`: List of integers representing the vibration pattern. Alternates between wait and vibrate durations.
- `repeat`: Index in the pattern at which to repeat, or -1 for no repeat. Default is -1.
- `intensities`: List of integers representing the vibration intensities for each segment in the pattern.
- `amplitude`: Amplitude of the vibration. Range is 1 to 255. Default is -1 (use platform default).
- `sharpness`: Sharpness of the vibration. iOS only. Range is 0.0 to 1.0. Default is 0.5.
- `preset`: Predefined vibration preset. Overrides other parameters if provided.
#### With specific duration (for example, 1 second):
```dart
Vibration.vibrate(duration: 1000);
```
Default duration is 500ms.
#### With specific duration and specific amplitude (if supported):
```dart
Vibration.vibrate(duration: 1000, amplitude: 128);
```
#### With pattern (wait 500ms, vibrate 1s, wait 500ms, vibrate 2s):
```dart
Vibration.vibrate(pattern: [500, 1000, 500, 2000]);
```
#### With pattern (wait 500ms, vibrate 1s, wait 500ms, vibrate 2s) at varying intensities (1 - min, 255 - max):
```dart
Vibration.vibrate(pattern: [500, 1000, 500, 2000], intensities: [1, 255]);
```
#### With vibration presets:
You can use predefined vibration presets for common use cases.
```dart
Vibration.vibrate(preset: VibrationPreset.alarm);
```
Available presets:
- `VibrationPreset.alarm`
- `VibrationPreset.notification`
- `VibrationPreset.heartbeat`
- `VibrationPreset.singleShortBuzz`
- `VibrationPreset.doubleBuzz`
- `VibrationPreset.tripleBuzz`
- `VibrationPreset.longAlarmBuzz`
- `VibrationPreset.pulseWave`
- `VibrationPreset.progressiveBuzz`
- `VibrationPreset.rhythmicBuzz`
- `VibrationPreset.gentleReminder`
- `VibrationPreset.quickSuccessAlert`
- `VibrationPreset.zigZagAlert`
- `VibrationPreset.softPulse`
- `VibrationPreset.emergencyAlert`
- `VibrationPreset.heartbeatVibration`
- `VibrationPreset.countdownTimerAlert`
- `VibrationPreset.rapidTapFeedback`
- `VibrationPreset.dramaticNotification`
- `VibrationPreset.urgentBuzzWave`
### cancel
Stop ongoing vibration.
```dart
Vibration.cancel();
```
## Android
The `VIBRATE` permission is required in AndroidManifest.xml.
```xml
<uses-permission android:name="android.permission.VIBRATE"/>
```
Supports vibration with duration and pattern. On Android 8 (Oreo) and above, uses the [VibrationEffect](https://developer.android.com/reference/android/os/VibrationEffect) class.
For the rest of the usage instructions, see [Vibrator](https://developer.android.com/reference/android/os/Vibrator) class documentation.
## iOS
Supports vibration with duration and pattern on CoreHaptics devices. On older devices, the pattern is emulated with 500ms long vibrations.
You can check whether the current device has CoreHaptics support using [`hasCustomVibrationsSupport`](#hasCustomVibrationsSupport).
## OpenHarmony
The OpenHarmony implementation of [`vibration`][1].
[`vibration`][1] 在 OpenHarmony 平台的实现。
Add the following permission settings to your project's module.json5 file.
在你的项目的 `module.json5` 文件中增加以下权限设置。
```json
"requestPermissions": [
{"name" : "ohos.permission.VIBRATE"},
]
```
## Usage
```yaml
dependencies:
vibration: any
vibration_ohos: any
```
`vibrateEffect` and `vibrateAttribute` are only exist in `VibrationOhos`.
```dart
(VibrationPlatform.instance as VibrationOhos).vibrate(
vibrateEffect: const VibratePreset(count: 100),
vibrateAttribute: const VibrateAttribute(
usage: 'alarm',
),
);
```
[1]: https://pub.dev/packages/vibration
================================================
FILE: vibration/analysis_options.yaml
================================================
include: package:flutter_lints/flutter.yaml
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
================================================
FILE: vibration/android/.gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.cxx
================================================
FILE: vibration/android/build.gradle
================================================
group = "com.benjaminabel.vibration"
version = "1.0"
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.1.0")
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}
apply plugin: "com.android.library"
android {
namespace = "com.benjaminabel.vibration"
compileSdk = 34
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
defaultConfig {
minSdk = 21
}
dependencies {
testImplementation("junit:junit:4.13.2")
testImplementation("org.mockito:mockito-core:5.0.0")
}
testOptions {
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
}
}
================================================
FILE: vibration/android/settings.gradle
================================================
rootProject.name = 'vibration'
================================================
FILE: vibration/android/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.benjaminabel.vibration">
<uses-permission android:name="android.permission.VIBRATE"/>
</manifest>
================================================
FILE: vibration/android/src/main/java/com/benjaminabel/vibration/Vibration.java
================================================
package com.benjaminabel.vibration;
import android.os.Build;
import android.os.VibrationEffect;
import android.os.Vibrator;
import android.media.AudioAttributes;
import java.util.List;
public class Vibration {
private final Vibrator vibrator;
Vibration(Vibrator vibrator) {
this.vibrator = vibrator;
}
@SuppressWarnings("deprecation")
void vibrate(long duration, int amplitude) {
if (vibrator.hasVibrator()) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (vibrator.hasAmplitudeControl()) {
vibrator.vibrate(VibrationEffect.createOneShot(duration, amplitude), new AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setUsage(AudioAttributes.USAGE_ALARM)
.build());
} else {
vibrator.vibrate(VibrationEffect.createOneShot(duration, VibrationEffect.DEFAULT_AMPLITUDE), new AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setUsage(AudioAttributes.USAGE_ALARM)
.build());
}
} else {
vibrator.vibrate(duration);
}
}
}
@SuppressWarnings("deprecation")
void vibrate(List<Integer> pattern, int repeat) {
long[] patternLong = new long[pattern.size()];
for (int i = 0; i < patternLong.length; i++) {
patternLong[i] = pattern.get(i);
}
if (vibrator.hasVibrator()) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
vibrator.vibrate(VibrationEffect.createWaveform(patternLong, repeat), new AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setUsage(AudioAttributes.USAGE_ALARM)
.build());
} else {
vibrator.vibrate(patternLong, repeat);
}
}
}
@SuppressWarnings("deprecation")
void vibrate(List<Integer> pattern, int repeat, List<Integer> intensities) {
long[] patternLong = new long[pattern.size()];
int[] intensitiesArray = new int[intensities.size()];
for (int i = 0; i < patternLong.length; i++) {
patternLong[i] = pattern.get(i);
}
for (int i = 0; i < intensitiesArray.length; i++) {
intensitiesArray[i] = intensities.get(i);
}
if (vibrator.hasVibrator()) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (vibrator.hasAmplitudeControl()) {
vibrator.vibrate(VibrationEffect.createWaveform(patternLong, intensitiesArray, repeat), new AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setUsage(AudioAttributes.USAGE_ALARM)
.build());
} else {
vibrator.vibrate(VibrationEffect.createWaveform(patternLong, repeat), new AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setUsage(AudioAttributes.USAGE_ALARM)
.build());
}
} else {
vibrator.vibrate(patternLong, repeat);
}
}
}
Vibrator getVibrator() {
return this.vibrator;
}
}
================================================
FILE: vibration/android/src/main/java/com/benjaminabel/vibration/VibrationMethodChannelHandler.java
================================================
package com.benjaminabel.vibration;
import android.os.Build;
import androidx.annotation.NonNull;
import java.util.List;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
class VibrationMethodChannelHandler implements MethodChannel.MethodCallHandler {
private final Vibration vibration;
VibrationMethodChannelHandler(Vibration vibrationPlugin) {
assert (vibrationPlugin != null);
this.vibration = vibrationPlugin;
}
@Override
public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) {
switch (call.method) {
case "hasAmplitudeControl":
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
result.success(vibration.getVibrator().hasAmplitudeControl());
} else {
// For earlier API levels, return false rather than raising a
// MissingPluginException in order to allow applications to handle
// non-existence gracefully.
result.success(false);
}
break;
case "hasCustomVibrationsSupport":
result.success(true);
break;
case "vibrate":
Integer duration = call.argument("duration");
List<Integer> pattern = call.argument("pattern");
Integer repeat = call.argument("repeat");
List<Integer> intensities = call.argument("intensities");
Integer amplitude = call.argument("amplitude");
if (!pattern.isEmpty() && !intensities.isEmpty()) {
vibration.vibrate(pattern, repeat, intensities);
} else if (pattern.size() > 0) {
vibration.vibrate(pattern, repeat);
} else {
vibration.vibrate(duration, amplitude);
}
result.success(null);
break;
case "cancel":
vibration.getVibrator().cancel();
result.success(null);
break;
default:
result.notImplemented();
}
}
}
================================================
FILE: vibration/android/src/main/java/com/benjaminabel/vibration/VibrationPlugin.java
================================================
package com.benjaminabel.vibration;
import android.content.Context;
import android.os.Vibrator;
import android.os.Build;
import android.os.VibratorManager;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import io.flutter.embedding.engine.plugins.FlutterPlugin;
import io.flutter.plugin.common.MethodChannel;
public class VibrationPlugin implements FlutterPlugin {
private static final String CHANNEL = "vibration";
private MethodChannel methodChannel;
public Vibrator getVibrator(@NonNull FlutterPluginBinding flutterPluginBinding) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
return getLegacyVibrator(flutterPluginBinding);
} else {
try {
final VibratorManager vibratorManager = (VibratorManager) flutterPluginBinding.getApplicationContext().getSystemService(Context.VIBRATOR_MANAGER_SERVICE);
return vibratorManager.getDefaultVibrator();
} catch (NoSuchMethodError | NoClassDefFoundError error) {
return getLegacyVibrator(flutterPluginBinding);
}
}
}
@SuppressWarnings("deprecation")
private Vibrator getLegacyVibrator(@NonNull FlutterPluginBinding flutterPluginBinding) {
final Context context = flutterPluginBinding.getApplicationContext();
Vibrator vibrator = ContextCompat.getSystemService(context, Vibrator.class);
if (vibrator != null) {
return vibrator;
}
return (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
}
@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
final Vibrator vibrator = this.getVibrator(flutterPluginBinding);
final VibrationMethodChannelHandler methodChannelHandler = new VibrationMethodChannelHandler(new Vibration(vibrator));
this.methodChannel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), CHANNEL);
this.methodChannel.setMethodCallHandler(methodChannelHandler);
}
@Override
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
this.methodChannel.setMethodCallHandler(null);
this.methodChannel = null;
}
}
================================================
FILE: vibration/example/.gitignore
================================================
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
================================================
FILE: vibration/example/.metadata
================================================
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: "17025dd88227cd9532c33fa78f5250d548d87e9a"
channel: "stable"
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
- platform: android
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
- platform: ios
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
================================================
FILE: vibration/example/README.md
================================================
# example
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
================================================
FILE: vibration/example/analysis_options.yaml
================================================
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
================================================
FILE: vibration/example/android/.gitignore
================================================
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks
================================================
FILE: vibration/example/android/app/build.gradle
================================================
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
android {
namespace = "com.benjaminabel.vibration_example"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.benjaminabel.vibration_example"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.debug
}
}
}
flutter {
source = "../.."
}
================================================
FILE: vibration/example/android/app/src/debug/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
================================================
FILE: vibration/example/android/app/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="vibration_example"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>
================================================
FILE: vibration/example/android/app/src/main/java/com/example/example/MainActivity.java
================================================
package com.benjaminabel.vibration_example;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
}
================================================
FILE: vibration/example/android/app/src/main/res/drawable/launch_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
================================================
FILE: vibration/example/android/app/src/main/res/drawable-v21/launch_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
================================================
FILE: vibration/example/android/app/src/main/res/values/styles.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
================================================
FILE: vibration/example/android/app/src/main/res/values-night/styles.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
================================================
FILE: vibration/example/android/app/src/profile/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
================================================
FILE: vibration/example/android/build.gradle
================================================
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
================================================
FILE: vibration/example/android/gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
================================================
FILE: vibration/example/android/gradle.properties
================================================
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
================================================
FILE: vibration/example/android/settings.gradle
================================================
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.12.1" apply false
id "org.jetbrains.kotlin.android" version "2.2.0" apply false
}
include ":app"
================================================
FILE: vibration/example/ios/.gitignore
================================================
**/dgph
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3
================================================
FILE: vibration/example/ios/Flutter/AppFrameworkInfo.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>13.0</string>
</dict>
</plist>
================================================
FILE: vibration/example/ios/Flutter/Debug.xcconfig
================================================
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
================================================
FILE: vibration/example/ios/Flutter/Flutter.podspec
================================================
#
# This podspec is NOT to be published. It is only used as a local source!
# This is a generated file; do not edit or check into version control.
#
Pod::Spec.new do |s|
s.name = 'Flutter'
s.version = '1.0.0'
s.summary = 'A UI toolkit for beautiful and fast apps.'
s.homepage = 'https://flutter.dev'
s.license = { :type => 'BSD' }
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
s.ios.deployment_target = '13.0'
# Framework linking is handled by Flutter tooling, not CocoaPods.
# Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs.
s.vendored_frameworks = 'path/to/nothing'
end
================================================
FILE: vibration/example/ios/Flutter/Release.xcconfig
================================================
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
================================================
FILE: vibration/example/ios/Runner/AppDelegate.swift
================================================
import Flutter
import UIKit
@main
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
}
================================================
FILE: vibration/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: vibration/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: vibration/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
================================================
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
================================================
FILE: vibration/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
</resources>
</document>
================================================
FILE: vibration/example/ios/Runner/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
================================================
FILE: vibration/example/ios/Runner/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Example</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>vibration_example</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: vibration/example/ios/Runner/Runner-Bridging-Header.h
================================================
#import "GeneratedPluginRegistrant.h"
================================================
FILE: vibration/example/ios/Runner.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
proxyType = 1;
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
remoteInfo = Runner;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
DBE2CB966CC86F99F5476A4D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
331C8082294A63A400263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
331C807B294A618700263BE5 /* RunnerTests.swift */,
);
path = RunnerTests;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
331C8082294A63A400263BE5 /* RunnerTests */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
331C8080294A63A400263BE5 /* RunnerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
331C807D294A63A400263BE5 /* Sources */,
331C807F294A63A400263BE5 /* Resources */,
DBE2CB966CC86F99F5476A4D /* Frameworks */,
);
buildRules = (
);
dependencies = (
331C8086294A63A400263BE5 /* PBXTargetDependency */,
);
name = RunnerTests;
productName = RunnerTests;
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
packageProductDependencies = (
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
);
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
CreatedOnToolsVersion = 14.0;
TestTargetID = 97C146ED1CF9000F007C117D;
};
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 1100;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
packageReferences = (
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
);
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
331C8080294A63A400263BE5 /* RunnerTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
331C807F294A63A400263BE5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
331C807D294A63A400263BE5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 97C146ED1CF9000F007C117D /* Runner */;
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Profile;
};
249021D4217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3ZX4FWS39V;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.benjaminabel.vibration_example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
331C8088294A63A400263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.benjaminabel.vibration_example.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Debug;
};
331C8089294A63A400263BE5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.benjaminabel.vibration_example.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Release;
};
331C808A294A63A400263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.benjaminabel.vibration_example.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Profile;
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3ZX4FWS39V;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.benjaminabel.vibration_example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3ZX4FWS39V;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.benjaminabel.vibration_example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
331C8088294A63A400263BE5 /* Debug */,
331C8089294A63A400263BE5 /* Release */,
331C808A294A63A400263BE5 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
249021D3217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
249021D4217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
isa = XCSwiftPackageProductDependency;
productName = FlutterGeneratedPluginSwiftPackage;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
================================================
FILE: vibration/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
================================================
FILE: vibration/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
================================================
FILE: vibration/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
================================================
FILE: vibration/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Prepare Flutter Framework Script"
scriptText = "/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" prepare ">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "331C8080294A63A400263BE5"
BuildableName = "RunnerTests.xctest"
BlueprintName = "RunnerTests"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: vibration/example/ios/Runner.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: vibration/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
================================================
FILE: vibration/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
================================================
FILE: vibration/example/ios/RunnerTests/RunnerTests.swift
================================================
import Flutter
import UIKit
import XCTest
class RunnerTests: XCTestCase {
func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}
}
================================================
FILE: vibration/example/lib/main.dart
================================================
import 'package:flutter/material.dart';
import 'package:vibration/vibration.dart';
import 'package:vibration/vibration_presets.dart';
void main() => runApp(VibratingApp());
class VibratingApp extends StatelessWidget {
const VibratingApp({super.key});
void showSnackBar(
BuildContext context, {
List<int> pattern = const [],
int duration = -1,
}) {
ScaffoldMessenger.of(context).removeCurrentSnackBar();
if (pattern.isEmpty) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
duration: Duration(milliseconds: duration),
content: Text('Vibrate for ${duration}ms'),
),
);
return;
}
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
duration: Duration(
milliseconds: pattern.reduce(
(value, element) => value + element,
),
),
content: Text(
pattern
.map((e) => pattern.indexOf(e) % 2 == 0
? 'wait ${e / 1000}s'
: 'vibrate ${e / 1000}s')
.join(', '),
),
),
);
return;
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Center(child: Text('Vibration Plugin')),
),
body: Builder(
builder: (BuildContext context) {
return Center(
child: ListView(
padding: const EdgeInsets.all(16.0),
children: <Widget>[
ElevatedButton(
child: Text('Vibrate for default 500ms'),
onPressed: () {
showSnackBar(context, duration: 500);
Vibration.vibrate();
},
),
ElevatedButton(
child: Text('Vibrate for 1000ms'),
onPressed: () {
showSnackBar(context, duration: 1000);
Vibration.vibrate(duration: 1000);
},
),
ElevatedButton(
child: Text('Vibrate with pattern'),
onPressed: () {
final List<int> pattern = [
500,
1000,
500,
2000,
500,
3000,
500,
500
];
showSnackBar(context, pattern: pattern);
Vibration.vibrate(
pattern: pattern,
);
},
),
ElevatedButton(
child: Text('Vibrate with pattern and intensities'),
onPressed: () {
final List<int> pattern = [
500,
1000,
500,
2000,
500,
3000,
500,
500
];
showSnackBar(context, pattern: pattern);
Vibration.vibrate(
pattern: pattern,
intensities: [0, 128, 0, 255, 0, 64, 0, 255],
);
},
),
SizedBox(height: 20),
Center(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'iOS only:',
style: TextStyle(fontSize: 20),
),
),
),
ElevatedButton(
child: Text('Vibrate for 1000ms with 0.0 sharpness'),
onPressed: () {
showSnackBar(context, duration: 1000);
Vibration.vibrate(duration: 1000, sharpness: 0.0);
},
),
ElevatedButton(
child: Text('Vibrate for 1000ms with 0.5 sharpness'),
onPressed: () {
showSnackBar(context, duration: 1000);
Vibration.vibrate(duration: 1000, sharpness: 0.5);
},
),
ElevatedButton(
child: Text('Vibrate for 1000ms with 1.0 sharpness'),
onPressed: () {
showSnackBar(context, duration: 1000);
Vibration.vibrate(duration: 1000, sharpness: 1.0);
},
),
SizedBox(height: 20),
Center(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Vibration Presets:',
style: TextStyle(fontSize: 20),
),
),
),
ElevatedButton(
child: Text('Single Short Buzz'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.singleShortBuzz]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.singleShortBuzz,
);
},
),
ElevatedButton(
child: Text('Double Buzz'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.doubleBuzz]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.doubleBuzz,
);
},
),
ElevatedButton(
child: Text('Triple Buzz'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.tripleBuzz]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.tripleBuzz,
);
},
),
ElevatedButton(
child: Text('Long Alarm Buzz'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.longAlarmBuzz]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.longAlarmBuzz,
);
},
),
ElevatedButton(
child: Text('Pulse Wave'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.pulseWave]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.pulseWave,
);
},
),
ElevatedButton(
child: Text('Progressive Buzz'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.progressiveBuzz]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.progressiveBuzz,
);
},
),
ElevatedButton(
child: Text('Rhythmic Buzz'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.rhythmicBuzz]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.rhythmicBuzz,
);
},
),
ElevatedButton(
child: Text('Gentle Reminder'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.gentleReminder]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.gentleReminder,
);
},
),
ElevatedButton(
child: Text('Quick Success Alert'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.quickSuccessAlert]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.quickSuccessAlert,
);
},
),
ElevatedButton(
child: Text('Zig Zag Alert'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.zigZagAlert]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.zigZagAlert,
);
},
),
ElevatedButton(
child: Text('Soft Pulse'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.softPulse]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.softPulse,
);
},
),
ElevatedButton(
child: Text('Emergency Alert'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.emergencyAlert]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.emergencyAlert,
);
},
),
ElevatedButton(
child: Text('Heartbeat Vibration'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.heartbeatVibration]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.heartbeatVibration,
);
},
),
ElevatedButton(
child: Text('Countdown Timer Alert'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.countdownTimerAlert]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.countdownTimerAlert,
);
},
),
ElevatedButton(
child: Text('Rapid Tap Feedback'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.rapidTapFeedback]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.rapidTapFeedback,
);
},
),
ElevatedButton(
child: Text('Dramatic Notification'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.dramaticNotification]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.dramaticNotification,
);
},
),
ElevatedButton(
child: Text('Urgent Buzz Wave'),
onPressed: () {
final VibrationPresetConfig preset =
presets[VibrationPreset.urgentBuzzWave]!;
showSnackBar(
context,
pattern: preset.pattern,
);
Vibration.vibrate(
preset: VibrationPreset.urgentBuzzWave,
);
},
)
],
),
);
},
),
),
);
}
}
================================================
FILE: vibration/example/pubspec.yaml
================================================
name: vibration_example
description: Demonstrates how to use the vibration plugin.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
environment:
sdk: ^3.0.0
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
vibration:
path: ../
dev_dependencies:
flutter_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^5.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/to/asset-from-package
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/to/font-from-package
================================================
FILE: vibration/ios/.gitignore
================================================
.idea/
.vagrant/
.sconsign.dblite
.svn/
.DS_Store
*.swp
profile
DerivedData/
build/
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m
.generated/
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
xcuserdata
*.moved-aside
*.pyc
*sync/
Icon?
.tags*
/Flutter/Generated.xcconfig
/Flutter/ephemeral/
/Flutter/flutter_export_environment.sh
.build/
.swiftpm/
================================================
FILE: vibration/ios/vibration/Package.swift
================================================
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "vibration",
platforms: [
.iOS("12.0"),
],
products: [
.library(name: "vibration", targets: ["vibration"])
],
dependencies: [],
targets: [
.target(
name: "vibration",
dependencies: [],
resources: [
.process("Resources/PrivacyInfo.xcprivacy"),
]
)
]
)
================================================
FILE: vibration/ios/vibration/Sources/vibration/Resources/PrivacyInfo.xcprivacy
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>
================================================
FILE: vibration/ios/vibration/Sources/vibration/VibrationPlugin.swift
================================================
import AudioToolbox
import CoreHaptics
import Flutter
import UIKit
public class VibrationPlugin: NSObject, FlutterPlugin {
#if targetEnvironment(simulator)
private let isDevice = false
#else
private let isDevice = true
#endif
@available(iOS 13.0, *)
public static var engine: CHHapticEngine?
/// Monotonically-increasing counter used to invalidate in-flight repeat closures.
/// Incrementing this value causes any `scheduleRepeat` closure that captured an older
/// generation to exit without playing, effectively cancelling the active loop.
@available(iOS 13.0, *)
private static var repeatGeneration: Int = 0
public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "vibration", binaryMessenger: registrar.messenger())
let instance = VibrationPlugin()
if #available(iOS 13.0, *) {
VibrationPlugin.createEngine()
}
registrar.addMethodCallDelegate(instance, channel: channel)
}
@available(iOS 13.0, *)
public static func createEngine() {
// Create and configure a haptic engine.
do {
VibrationPlugin.engine = try CHHapticEngine()
} catch {
print("Engine creation error: \(error)")
return
}
if VibrationPlugin.engine == nil {
print("Failed to create engine!")
}
// The stopped handler alerts you of engine stoppage due to external causes.
// Cancel any active repeat loop for all stop reasons except .notifyWhenFinished,
// which is an intentional completion and not applicable to our usage.
VibrationPlugin.engine?.stoppedHandler = { reason in
print("The engine stopped for reason: \(reason.rawValue)")
if reason != .notifyWhenFinished {
VibrationPlugin.repeatGeneration += 1
}
}
// The reset handler provides an opportunity for your app to restart the engine in case of failure.
VibrationPlugin.engine?.resetHandler = {
// Try restarting the engine.
print("The engine reset --> Restarting now!")
do {
try VibrationPlugin.engine?.start()
} catch {
print("Failed to restart the engine: \(error)")
}
}
}
private func supportsHaptics() -> Bool {
if #available(iOS 13.0, *) {
return CHHapticEngine.capabilitiesForHardware().supportsHaptics
}
return false;
}
private func getAmplitude(myArgs: [String: Any]) -> Int {
let amplitude = myArgs["amplitude"] as? Int ?? -1
return amplitude == -1 ? 255 : amplitude
}
private func getIntensities(myArgs: [String: Any]) -> [Int] {
let intensities = myArgs["intensities"] as? [Int] ?? []
let amplitude = getAmplitude(myArgs: myArgs)
let pattern = getPattern(myArgs: myArgs)
if pattern.count == 1 {
return [amplitude]
}
if (intensities.count == pattern.count) {
return intensities
}
if intensities.count < pattern.count {
return intensities + Array(
repeating: intensities.last ?? amplitude,
count: pattern.count - intensities.count
)
}
return pattern.enumerated().map { $0.offset % 2 == 0 ? 0 : amplitude }
}
private func getPattern(myArgs: [String: Any]) -> [Int] {
let pattern = myArgs["pattern"] as? [Int] ?? []
if (pattern.isEmpty) {
return [getDuration(myArgs: myArgs)]
}
return pattern
}
private func getDuration(myArgs: [String: Any]) -> Int {
let duration = myArgs["duration"] as? Int ?? -1
return duration == -1 ? 500 : duration
}
private func getSharpness(myArgs: [String: Any]) -> Float {
return myArgs["sharpness"] as? Float ?? 0.5
}
/// Returns the repeat index from the method arguments, defaulting to `-1` (no repeat).
/// A value of `0` loops the entire pattern; a value of `N` plays the full pattern once,
/// then loops from index `N` onward on every subsequent iteration.
private func getRepeat(myArgs: [String: Any]) -> Int {
return myArgs["repeat"] as? Int ?? -1
}
/// Builds an array of `CHHapticEvent` values from a slice of the pattern.
///
/// - Parameters:
/// - pattern: Timing values in milliseconds, alternating silence and vibration durations.
/// - intensities: Amplitude values (0–255) corresponding to each element in `pattern`.
/// - sharpness: Haptic sharpness applied to all vibration events.
/// - startIndex: Index into `pattern` and `intensities` to begin from. Defaults to `0`
/// (full pattern). Pass `repeatIndex` here when building loop-slice events.
@available(iOS 13.0, *)
private func buildHapticEvents(
pattern: [Int],
intensities: [Int],
sharpness: Float,
startIndex: Int = 0
) -> [CHHapticEvent] {
var hapticEvents: [CHHapticEvent] = []
var rel: Double = 0.0
for i in startIndex..<pattern.count {
let duration = pattern[i]
if intensities[i] != 0 {
hapticEvents.append(
CHHapticEvent(
eventType: .hapticContinuous,
parameters: [
CHHapticEventParameter(parameterID: .hapticIntensity, value: Float(intensities[i]) / 255.0),
CHHapticEventParameter(parameterID: .hapticSharpness, value: sharpness)
],
relativeTime: rel,
duration: Double(duration) / 1000.0
)
)
}
rel += Double(duration) / 1000.0
}
return hapticEvents
}
/// Submits a set of haptic events to the shared engine and starts playback immediately.
@available(iOS 13.0, *)
private func playHapticEvents(_ events: [CHHapticEvent]) throws {
if let engine = VibrationPlugin.engine {
let patternToPlay = try CHHapticPattern(events: events, parameters: [])
let player = try engine.makePlayer(with: patternToPlay)
try engine.start()
try player.start(atTime: 0)
}
}
/// Schedules one loop iteration after `afterMs` milliseconds, then reschedules itself.
///
/// Before each iteration the closure checks `VibrationPlugin.repeatGeneration` against
/// the captured `generation`. If they differ — because `cancelVibration` or a new
/// `playPattern` call incremented the counter — the closure exits without playing or
/// rescheduling, ending the loop.
///
/// - Parameters:
/// - pattern: Full pattern array (only the slice from `startIndex` onward is played).
/// - intensities: Amplitude values corresponding to each element in `pattern`.
/// - sharpness: Haptic sharpness forwarded to `buildHapticEvents`.
/// - startIndex: Index in `pattern` at which each iteration begins.
/// - loopSliceMs: Duration of one loop iteration in milliseconds; reused as the delay
/// before the next iteration.
/// - generation: The `repeatGeneration` value captured when this repeat session started.
/// - afterMs: Delay in milliseconds before the current iteration fires.
@available(iOS 13.0, *)
private func scheduleRepeat(
pattern: [Int],
intensities: [Int],
sharpness: Float,
startIndex: Int,
loopSliceMs: Int,
generation: Int,
afterMs: Int
) {
DispatchQueue.global().asyncAfter(deadline: .now() + .milliseconds(afterMs)) { [weak self] in
guard let self = self,
VibrationPlugin.repeatGeneration == generation else { return }
do {
let loopEvents = self.buildHapticEvents(
pattern: pattern,
intensities: intensities,
sharpness: sharpness,
startIndex: startIndex
)
try self.playHapticEvents(loopEvents)
} catch {
print("Failed to play repeat loop: \(error.localizedDescription).")
return
}
self.scheduleRepeat(
pattern: pattern,
intensities: intensities,
sharpness: sharpness,
startIndex: startIndex,
loopSliceMs: loopSliceMs,
generation: generation,
afterMs: loopSliceMs
)
}
}
@available(iOS 13.0, *)
private func playPattern(myArgs: [String: Any]) -> Void {
let intensities = getIntensities(myArgs: myArgs)
let patternArray = getPattern(myArgs: myArgs)
let sharpness = getSharpness(myArgs: myArgs)
let repeatIndex = getRepeat(myArgs: myArgs)
do {
let events = buildHapticEvents(pattern: patternArray, intensities: intensities, sharpness: sharpness)
try playHapticEvents(events)
} catch {
print("Failed to play pattern: \(error.localizedDescription).")
return
}
guard repeatIndex >= 0, repeatIndex < patternArray.count else { return }
VibrationPlugin.repeatGeneration += 1
let gen = VibrationPlugin.repeatGeneration
let firstPlayMs = patternArray.reduce(0, +)
let loopSliceMs = patternArray[repeatIndex...].reduce(0, +)
scheduleRepeat(
pattern: patternArray,
intensities: intensities,
sharpness: sharpness,
startIndex: repeatIndex,
loopSliceMs: loopSliceMs,
generation: gen,
afterMs: firstPlayMs
)
}
@available(iOS 13.0, *)
private func cancelVibration() {
VibrationPlugin.repeatGeneration += 1
VibrationPlugin.engine?.stop(completionHandler: { error in
if let error = error {
print("Error stopping haptic engine: \(error)")
} else {
print("Haptic engine stopped successfully.")
}
})
}
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
switch call.method {
case "hasCustomVibrationsSupport":
result(supportsHaptics())
case "vibrate":
guard let myArgs = call.arguments as? [String: Any] else {
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
result(true)
return
}
if !supportsHaptics() {
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
result(true)
return
}
if #available(iOS 13.0, *) {
playPattern(myArgs: myArgs)
result(true)
return
}
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
result(true)
return
case "cancel":
if #available(iOS 13.0, *) {
cancelVibration()
} else {
result(false)
}
result(true)
return
default:
result(FlutterMethodNotImplemented)
return
}
}
}
================================================
FILE: vibration/ios/vibration.podspec
================================================
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint vibration.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'vibration'
s.version = '3.0.0'
s.summary = 'A plugin for handling Vibration API on iOS, Android, web and OpenHarmony.'
s.description = <<-DESC
A plugin for handling Vibration API on iOS, Android, web and OpenHarmony.
DESC
s.homepage = 'https://github.com/benjamindean/flutter_vibration'
s.license = { :file => '../LICENSE' }
s.author = { 'Benjamin Dean' => 'benjaminabel.cellardoor@gmail.com' }
s.source = { :path => '.' }
s.source_files = 'vibration/Sources/vibration/**/*.swift'
s.dependency 'Flutter'
s.platform = :ios, '12.0'
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
s.swift_version = '5.0'
s.resource_bundles = {'vibration_privacy' => ['vibration/Sources/vibration/Resources/PrivacyInfo.xcprivacy']}
end
================================================
FILE: vibration/lib/vibration.dart
================================================
import 'dart:async';
import 'package:vibration/vibration_presets.dart';
import 'package:vibration_platform_interface/vibration_platform_interface.dart';
/// Platform-independent vibration methods.
class Vibration {
/// Check if vibrator is available on device.
///
/// Returns `true` if the device has a vibrator, otherwise `false`.
///
/// ```dart
/// if (await Vibration.hasVibrator()) {
/// Vibration.vibrate();
/// }
/// ```
static Future<bool> hasVibrator() async {
return await VibrationPlatform.instance.hasVibrator();
}
/// Check if the vibrator has amplitude control.
///
/// Returns `true` if the device supports amplitude control, otherwise `false`.
///
/// ```dart
/// if (await Vibration.hasAmplitudeControl()) {
/// Vibration.vibrate(amplitude: 128);
/// }
/// ```
static Future<bool> hasAmplitudeControl() async {
return await VibrationPlatform.instance.hasAmplitudeControl();
}
/// Check if the device is able to vibrate with a custom
/// [duration], [pattern], or [intensities].
///
/// Returns `true` if the device supports custom vibrations, otherwise `false`.
///
/// ```dart
/// if (await Vibration.hasCustomVibrationsSupport()) {
/// Vibration.vibrate(duration: 1000);
/// } else {
/// Vibration.vibrate();
/// await Future.delayed(Duration(milliseconds: 500));
/// Vibration.vibrate();
/// }
/// ```
static Future<bool> hasCustomVibrationsSupport() async {
return await VibrationPlatform.instance.hasCustomVibrationsSupport();
}
/// Vibrate with [duration] at [amplitude] or [pattern] at [intensities].
///
/// The default vibration duration is 500ms.
/// Amplitude is a range from 1 to 255, if supported.
///
/// If [preset] is provided, it overrides other parameters and uses the preset configuration.
///
/// ```dart
/// Vibration.vibrate(duration: 1000);
///
/// if (await Vibration.hasAmplitudeControl()) {
/// Vibration.vibrate(duration: 1000, amplitude: 1);
/// Vibration.vibrate(duration: 1000, amplitude: 255);
/// }
///
/// Vibration.vibrate(preset: VibrationPreset.quickSuccessAlert);
/// ```
static Future<void> vibrate({
int duration = 500,
List<int> pattern = const [],
int repeat = -1,
List<int> intensities = const [],
int amplitude = -1,
// sharpness is iOS only
double sharpness = 0.5,
VibrationPreset? preset,
}) async {
if (preset != null) {
final VibrationPresetConfig? vibrationPreset = presets[preset];
if (vibrationPreset == null) {
throw ArgumentError('Invalid preset: $preset');
}
return VibrationPlatform.instance.vibrate(
pattern: vibrationPreset.pattern,
intensities: vibrationPreset.intensities,
);
}
return VibrationPlatform.instance.vibrate(
duration: duration,
pattern: pattern,
repeat: repeat,
intensities: intensities,
amplitude: amplitude,
sharpness: sharpness,
);
}
/// Cancel an ongoing vibration.
///
/// This method stops any ongoing vibration.
/// On iOS, it only works for custom haptic vibrations using `CHHapticEngine`.
///
/// ```dart
/// Vibration.vibrate(duration: 10000);
/// Vibration.cancel();
/// ```
static Future<void> cancel() async {
return VibrationPlatform.instance.cancel();
}
}
================================================
FILE: vibration/lib/vibration_presets.dart
================================================
/// Configuration for a vibration preset.
class VibrationPresetConfig {
/// The pattern of the vibration in milliseconds.
final List<int> pattern;
/// The intensities of the vibration, ranging from 0 to 255.
final List<int> intensities;
/// Creates a new vibration preset configuration.
const VibrationPresetConfig({
required this.pattern,
required this.intensities,
});
}
/// Enum representing different vibration presets.
enum VibrationPreset {
singleShortBuzz,
doubleBuzz,
tripleBuzz,
longAlarmBuzz,
pulseWave,
progressiveBuzz,
rhythmicBuzz,
gentleReminder,
quickSuccessAlert,
zigZagAlert,
softPulse,
emergencyAlert,
heartbeatVibration,
countdownTimerAlert,
rapidTapFeedback,
dramaticNotification,
urgentBuzzWave,
}
/// A map of vibration presets to their configurations.
final Map<VibrationPreset, VibrationPresetConfig> presets = {
VibrationPreset.singleShortBuzz: VibrationPresetConfig(
pattern: [0, 100],
intensities: [0, 255],
),
VibrationPreset.doubleBuzz: VibrationPresetConfig(
pattern: [0, 100, 50, 100],
intensities: [0, 255, 0, 255],
),
VibrationPreset.tripleBuzz: VibrationPresetConfig(
pattern: [0, 100, 50, 100, 50, 100],
intensities: [0, 255, 0, 255, 0, 255],
),
VibrationPreset.longAlarmBuzz: VibrationPresetConfig(
pattern: [0, 500],
intensities: [0, 255],
),
VibrationPreset.pulseWave: VibrationPresetConfig(
pattern: [0, 100, 100, 100, 100, 100],
intensities: [0, 200, 0, 200, 0, 200],
),
VibrationPreset.progressiveBuzz: VibrationPresetConfig(
pattern: [0, 100, 200, 300, 400, 500],
intensities: [0, 100, 150, 200, 255, 255],
),
VibrationPreset.rhythmicBuzz: VibrationPresetConfig(
pattern: [0, 200, 100, 300, 100, 200],
intensities: [0, 150, 0, 255, 0, 200],
),
VibrationPreset.gentleReminder: VibrationPresetConfig(
pattern: [0, 50, 100, 50, 100, 50],
intensities: [0, 128, 0, 128, 0, 128],
),
VibrationPreset.quickSuccessAlert: VibrationPresetConfig(
pattern: [0, 70, 30, 70, 30, 70],
intensities: [0, 255, 0, 255, 0, 255],
),
VibrationPreset.zigZagAlert: VibrationPresetConfig(
pattern: [0, 100, 30, 300, 30, 100],
intensities: [0, 200, 0, 255, 0, 200],
),
VibrationPreset.softPulse: VibrationPresetConfig(
pattern: [0, 150, 50, 150, 50, 150],
intensities: [0, 100, 0, 100, 0, 100],
),
VibrationPreset.emergencyAlert: VibrationPresetConfig(
pattern: [0, 500, 50, 500, 50, 500],
intensities: [0, 255, 0, 255, 0, 255],
),
VibrationPreset.heartbeatVibration: VibrationPresetConfig(
pattern: [0, 200, 100, 100, 100, 200],
intensities: [0, 255, 0, 100, 0, 255],
),
VibrationPreset.countdownTimerAlert: VibrationPresetConfig(
pattern: [0, 100, 100, 200, 100, 300, 100, 400, 100, 500],
intensities: [0, 100, 0, 150, 0, 200, 0, 255, 0, 255],
),
VibrationPreset.rapidTapFeedback: VibrationPresetConfig(
pattern: [0, 50, 50, 50, 50, 50, 50, 50],
intensities: [0, 180, 0, 180, 0, 180, 0, 180],
),
VibrationPreset.dramaticNotification: VibrationPresetConfig(
pattern: [0, 100, 200, 100, 300, 100, 400],
intensities: [0, 255, 0, 200, 0, 150, 0],
),
VibrationPreset.urgentBuzzWave: VibrationPresetConfig(
pattern: [0, 300, 50, 300, 50, 300, 50, 300],
intensities: [0, 255, 0, 230, 0, 210, 0, 200],
),
};
================================================
FILE: vibration/pubspec.yaml
================================================
name: vibration
description: A plugin for handling Vibration API on iOS, Android, web and OpenHarmony.
version: 3.1.8
homepage: https://github.com/benjamindean/flutter_vibration
environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.0.0"
dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.0.2
vibration_platform_interface: ^0.1.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter:
# This section identifies this Flutter project as a plugin project.
# The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)
# which should be registered in the plugin registry. This is required for
# using method channels.
# The Android 'package' specifies package in which the registered class is.
# This is required for using method channels on Android.
# The 'ffiPlugin' specifies that native code should be built and bundled.
# This is required for using `dart:ffi`.
# All these are used by the tooling to maintain consistency when
# adding or updating assets for this project.
plugin:
platforms:
android:
package: com.benjaminabel.vibration
pluginClass: VibrationPlugin
ios:
pluginClass: VibrationPlugin
# To add assets to your plugin package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.dev/to/asset-from-package
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images
# To add custom fonts to your plugin package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.dev/to/font-from-package
================================================
FILE: vibration/test/vibration_test.dart
================================================
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:vibration/vibration.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
const MethodChannel channel = MethodChannel('vibration');
final List<MethodCall> log = <MethodCall>[];
setUp(() {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, (MethodCall methodCall) {
log.add(methodCall);
return null;
});
});
tearDown(() {
log.clear();
});
group('hasVibrator', () {
test(
'returns false',
() async {
bool? hasVibrator = await Vibration.hasVibrator();
expect(
hasVibrator,
equals(false),
);
},
);
test('throws PlatformException', () async {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
throw PlatformException(code: 'error');
});
final hasVibrator = await Vibration.hasVibrator();
throwsA(isA<PlatformException>());
expect(hasVibrator, isFalse);
});
test('throws UnsupportedError', () async {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
throw UnsupportedError('error');
});
final hasVibrator = await Vibration.hasVibrator();
throwsA(isA<UnsupportedError>());
expect(hasVibrator, isFalse);
});
});
group('hasAmplitudeControl', () {
test(
'returns false',
() async {
bool? hasAmplitudeControl = await Vibration.hasAmplitudeControl();
expect(hasAmplitudeControl, isFalse);
},
);
test('throws PlatformException', () async {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
throw PlatformException(code: 'error');
});
final hasAmplitudeControl = await Vibration.hasAmplitudeControl();
throwsA(isA<PlatformException>());
expect(hasAmplitudeControl, isFalse);
});
test('throws UnsupportedError', () async {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
throw UnsupportedError('error');
});
final hasAmplitudeControl = await Vibration.hasAmplitudeControl();
throwsA(isA<UnsupportedError>());
expect(hasAmplitudeControl, isFalse);
});
});
test(
'vibrate with duration',
() async {
await Vibration.vibrate(duration: 100);
expect(
log,
<Matcher>[
isMethodCall('vibrate', arguments: <String, Object>{
'duration': 100,
'pattern': [],
'repeat': -1,
'amplitude': -1,
'intensities': [],
'sharpness': 0.5,
})
],
);
},
);
test(
'vibrate with pattern',
() async {
await Vibration.vibrate(pattern: [100, 200, 400], repeat: 1);
expect(
log,
<Matcher>[
isMethodCall('vibrate', arguments: <String, Object>{
'duration': 500,
'pattern': [100, 200, 400],
'repeat': 1,
'amplitude': -1,
'intensities': [],
'sharpness': 0.5,
})
],
);
},
);
test(
'cancel vibration',
() async {
await Vibration.cancel();
expect(
log,
<Matcher>[isMethodCall('cancel', arguments: null)],
);
},
);
}
================================================
FILE: vibration.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/build" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
</component>
</module>
================================================
FILE: vibration_ohos/.gitignore
================================================
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
.packages
build/
.hvigor
dependencies
oh_modules
local.properties
.metadata
oh-package-lock.json5
================================================
FILE: vibration_ohos/CHANGELOG.md
================================================
## 0.0.4
* Bump package `device_info_plus_ohos` to ">=0.0.7 <1.0.0"
* Bump package `vibration_platform_interface` to "0.1.1"
## 0.0.3
* Update vibration_platform_interface
## 0.0.2
* Bump package `vibration_platform_interface` to "0.0.2"
## 0.0.1
* Support OpenHarmony.
================================================
FILE: vibration_ohos/LICENSE
================================================
BSD 2-Clause License
Copyright (c) 2018, Benjamin Dean
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: vibration_ohos/README.md
================================================
# vibration_ohos
The OpenHarmony implementation of [`vibration`][1].
[`vibration`][1] 在 OpenHarmony 平台的实现。
Add the following permission settings to your project's module.json5 file.
在你的项目的 `module.json5` 文件中增加以下权限设置。
```json
"requestPermissions": [
{"name" : "ohos.permission.VIBRATE"},
]
```
## Usage
```yaml
dependencies:
vibration: any
vibration_ohos: any
```
`vibrateEffect` and `vibrateAttribute` are only exist in `VibrationOhos`.
```dart
(VibrationPlatform.instance as VibrationOhos).vibrate(
vibrateEffect: const VibratePreset(count: 100),
vibrateAttribute: const VibrateAttribute(
usage: 'alarm',
),
);
```
[1]: https://pub.dev/packages/vibration
================================================
FILE: vibration_ohos/analysis_options.yaml
================================================
include: package:flutter_lints/flutter.yaml
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
================================================
FILE: vibration_ohos/example/.gitignore
================================================
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
.metadata
pubspec.lock
================================================
FILE: vibration_ohos/example/README.md
================================================
# vibration_ohos_example
Demonstrates how to use the vibration_ohos plugin.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
================================================
FILE: vibration_ohos/example/analysis_options.yaml
================================================
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
================================================
FILE: vibration_ohos/example/assets/haptic_file.json
================================================
{
"MetaData": {
"Create": "2023-01-09",
"Description": "a haptic case",
"Version": 1.0,
"ChannelNumber": 1
},
"Channels": [
{
"Parameters": {
"Index": 1
},
"Pattern": [
{
"Event": {
"Type": "transient",
"StartTime": 0,
"Parameters": {
"Intensity": 100,
"Frequency": 31
}
}
},
{
"Event": {
"Type": "continuous",
"StartTime": 100,
"Duration": 54,
"Parameters": {
"Intensity": 38,
"Frequency": 30
}
}
}
]
}
]
}
================================================
FILE: vibration_ohos/example/lib/main.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show rootBundle;
import 'package:flutter_platform_utils/flutter_platform_utils.dart';
import 'package:vibration/vibration.dart';
import 'package:vibration_ohos/vibration_ohos.dart';
void main() => runApp(const VibratingApp());
class VibratingApp extends StatelessWidget {
const VibratingApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Vibration Plugin example app'),
),
body: Builder(
builder: (BuildContext context) {
return Center(
child: Column(
children: <Widget>[
ElevatedButton(
child: const Text('Vibrate for default 500ms'),
onPressed: () {
Vibration.vibrate();
},
),
ElevatedButton(
child: const Text('Vibrate for 1000ms'),
onPressed: () {
Vibration.vibrate(duration: 1000);
},
),
if (!PlatformUtils.isOhos)
ElevatedButton(
child: const Text('Vibrate with pattern'),
onPressed: () {
const snackBar = SnackBar(
content: Text(
'Pattern: wait 0.5s, vibrate 1s, wait 0.5s, vibrate 2s, wait 0.5s, vibrate 3s, wait 0.5s, vibrate 0.5s',
),
);
ScaffoldMessenger.of(context).showSnackBar(snackBar);
Vibration.vibrate(
pattern: [500, 1000, 500, 2000, 500, 3000, 500, 500],
);
},
),
if (!PlatformUtils.isOhos)
ElevatedButton(
child: const Text('Vibrate with pattern and amplitude'),
onPressed: () {
const snackBar = SnackBar(
content: Text(
'Pattern: wait 0.5s, vibrate 1s, wait 0.5s, vibrate 2s, wait 0.5s, vibrate 3s, wait 0.5s, vibrate 0.5s',
),
);
ScaffoldMessenger.of(context).showSnackBar(snackBar);
Vibration.vibrate(
pattern: [500, 1000, 500, 2000, 500, 3000, 500, 500],
intensities: [0, 128, 0, 255, 0, 64, 0, 255],
);
},
),
if (PlatformUtils.isOhos)
ElevatedButton(
child: const Text('Vibrate with VibratePreset'),
onPressed: () {
(VibrationPlatform.instance as VibrationOhos).vibrate(
vibrateEffect: const VibratePreset(count: 100),
vibrateAttribute: const VibrateAttribute(
usage: 'alarm',
),
);
},
),
// ohos only
// TODO: not support for now
if (PlatformUtils.isOhos)
ElevatedButton(
child: const Text('Vibrate with custom haptic_file'),
onPressed: () {
rootBundle.load('assets/haptic_file.json').then((data) {
(VibrationPlatform.instance as VibrationOhos).vibrate(
vibrateEffect: VibrateFromFile(
hapticFd: HapticFileDescriptor(
data: data.buffer.asUint8List(),
),
),
vibrateAttribute: const VibrateAttribute(
usage: 'alarm',
),
);
});
},
)
],
),
);
},
),
),
);
}
}
================================================
FILE: vibration_ohos/example/ohos/.gitignore
================================================
/node_modules
/oh_modules
/local.properties
/.idea
**/build
/.hvigor
.cxx
/.clangd
/.clang-format
/.clang-tidy
**/.test
*.har
**/BuildProfile.ets
**/oh-package-lock.json5
**/src/main/resources/rawfile/flutter_assets/
**/libs/arm64-v8a/libapp.so
**/libs/arm64-v8a/libflutter.so
**/libs/arm64-v8a/libvmservice_snapshot.so
har/flutter.har
oh-package-lock.json5
dta
================================================
FILE: vibration_ohos/example/ohos/AppScope/app.json5
================================================
{
"app": {
"bundleName": "com.example.example",
"vendor": "example",
"versionCode": 1000000,
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
}
================================================
FILE: vibration_ohos/example/ohos/AppScope/resources/base/element/string.json
================================================
{
"string": [
{
"name": "app_name",
"value": "example"
}
]
}
================================================
FILE: vibration_ohos/example/ohos/build-profile.json5
================================================
{
"app": {
"signingConfigs": [],
"products": [
{
"name": "default",
"signingConfig": "default",
"compileSdkVersion": "4.1.0(11)",
"compatibleSdkVersion": "4.1.0(11)",
"runtimeOS": "HarmonyOS"
}
]
},
"modules": [
{
"name": "entry",
"srcPath": "./entry",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
}
]
}
================================================
FILE: vibration_ohos/example/ohos/entry/.gitignore
================================================
/node_modules
/oh_modules
/.preview
/build
/.cxx
/.test
/har
/libs
oh-package-lock.json5
================================================
FILE: vibration_ohos/example/ohos/entry/build-profile.json5
================================================
/*
* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"apiType": 'stageMode',
"buildOption": {
},
"targets": [
{
"name": "default",
"runtimeOS": "HarmonyOS"
},
{
"name": "ohosTest",
}
]
}
================================================
FILE: vibration_ohos/example/ohos/entry/hvigorfile.ts
================================================
/*
* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
export { hapTasks } from '@ohos/hvigor-ohos-plugin';
================================================
FILE: vibration_ohos/example/ohos/entry/oh-package.json5
================================================
{
"name": "entry",
"version": "1.0.0",
"description": "Please describe the basic information.",
"main": "",
"author": "",
"license": "",
"dependencies": {
"device_info_plus_ohos": "file:../har/device_info_plus_ohos.har",
"vibration_ohos": "file:../har/vibration_ohos.har"
}
}
================================================
FILE: vibration_ohos/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets
================================================
/*
* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FlutterAbility, FlutterEngine } from '@ohos/flutter_ohos';
import { GeneratedPluginRegistrant } from '../plugins/GeneratedPluginRegistrant';
export default class EntryAbility extends FlutterAbility {
configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
GeneratedPluginRegistrant.registerWith(flutterEngine)
}
}
================================================
FILE: vibration_ohos/example/ohos/entry/src/main/ets/pages/Index.ets
================================================
/*
* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import common from '@ohos.app.ability.common';
import { FlutterPage } from '@ohos/flutter_ohos'
let storage = LocalStorage.getShared()
const EVENT_BACK_PRESS = 'EVENT_BACK_PRESS'
@Entry(storage)
@Component
struct Index {
private context = getContext(this) as common.UIAbilityContext
@LocalStorageLink('viewId') viewId: string = "";
build() {
Column() {
FlutterPage({ viewId: this.viewId })
}
}
onBackPress(): boolean {
this.context.eventHub.emit(EVENT_BACK_PRESS)
return true
}
}
================================================
FILE: vibration_ohos/example/ohos/entry/src/main/ets/plugins/GeneratedPluginRegistrant.ets
================================================
import { FlutterEngine, Log } from '@ohos/flutter_ohos';
import DeviceInfoPlusPlugin from 'device_info_plus_ohos';
import VibrationPlugin from 'vibration_ohos';
/**
* Generated file. Do not edit.
* This file is generated by the Flutter tool based on the
* plugins that support the Ohos platform.
*/
const TAG = "GeneratedPluginRegistrant";
export class GeneratedPluginRegistrant {
static registerWith(flutterEngine: FlutterEngine) {
try {
flutterEngine.getPlugins()?.add(new DeviceInfoPlusPlugin());
flutterEngine.getPlugins()?.add(new VibrationPlugin());
} catch (e) {
Log.e(
TAG,
"Tried to register plugins with FlutterEngine ("
+ flutterEngine
+ ") failed.");
Log.e(TAG, "Received exception while registering", e);
}
}
}
================================================
FILE: vibration_ohos/example/ohos/entry/src/main/module.json5
================================================
/*
* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"module": {
"name": "entry",
"type": "entry",
"description": "$string:module_desc",
"mainElement": "EntryAbility",
"deviceTypes": [
"phone"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:main_pages",
"abilities": [
{
"name": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ets",
"description": "$string:EntryAbility_desc",
"icon": "$media:icon",
"label": "$string:EntryAbility_label",
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:start_window_background",
"exported": true,
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
]
}
],
"requestPermissions": [
{"name" : "ohos.permission.INTERNET"},
{"name" : "ohos.permission.VIBRATE"},
]
}
}
================================================
FILE: vibration_ohos/example/ohos/entry/src/main/resources/base/element/color.json
================================================
{
"color": [
{
"name": "start_window_background",
"value": "#FFFFFF"
}
]
}
================================================
FILE: vibration_ohos/example/ohos/entry/src/main/resources/base/element/string.json
================================================
{
"string": [
{
"name": "module_desc",
"value": "module description"
},
{
"name": "EntryAbility_desc",
"value": "description"
},
{
"name": "EntryAbility_label",
"value": "example"
}
]
}
================================================
FILE: vibration_ohos/example/ohos/entry/src/main/resources/base/profile/main_pages.json
================================================
{
"src": [
"pages/Index"
]
}
================================================
FILE: vibration_ohos/example/ohos/entry/src/main/resources/en_US/element/string.json
================================================
{
"string": [
{
"name": "module_desc",
"value": "module description"
},
{
"name": "EntryAbility_desc",
"value": "description"
},
{
"name": "EntryAbility_label",
"value": "example"
}
]
}
================================================
FILE: vibration_ohos/example/ohos/entry/src/main/resources/zh_CN/element/string.json
================================================
{
"string": [
{
"name": "module_desc",
"value": "模块描述"
},
{
"name": "EntryAbility_desc",
"value": "description"
},
{
"name": "EntryAbility_label",
"value": "example"
}
]
}
================================================
FILE: vibration_ohos/example/ohos/hvigor/hvigor-config.json5
================================================
/*
* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"hvigorVersion": "4.1.2",
"dependencies": {
"@ohos/hvigor-ohos-plugin": "4.1.2"
}
}
================================================
FILE: vibration_ohos/example/ohos/hvigor/hvigor-wrapper.js
================================================
"use strict";var e=require("path"),t=require("os"),n=require("fs"),r=require("child_process"),u=require("process"),o=require("tty"),i=require("util"),s=require("url"),a=require("constants"),c=require("stream"),l=require("assert"),f=require("zlib"),D=require("net"),d=require("crypto"),p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},E={},h={},C=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(h,"__esModule",{value:!0}),h.maxPathLength=h.isMac=h.isLinux=h.isWindows=void 0;const m=C(t),F="Windows_NT",y="Darwin";function g(){return m.default.type()===F}function A(){return m.default.type()===y}h.isWindows=g,h.isLinux=function(){return"Linux"===m.default.type()},h.isMac=A,h.maxPathLength=function(){return A()?1016:g()?259:4095},function(n){var r=p&&p.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),u=p&&p.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=p&&p.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return u(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.LOG_LEVEL=n.ANALYZE=n.PARALLEL=n.INCREMENTAL=n.DAEMON=n.DOT=n.PROPERTIES=n.HVIGOR_POOL_CACHE_TTL=n.HVIGOR_POOL_CACHE_CAPACITY=n.HVIGOR_POOL_MAX_CORE_SIZE=n.HVIGOR_POOL_MAX_SIZE=n.ENABLE_SIGN_TASK_KEY=n.HVIGOR_CACHE_DIR_KEY=n.WORK_SPACE=n.HVIGOR_PROJECT_WRAPPER_HOME=n.HVIGOR_PROJECT_ROOT_DIR=n.HVIGOR_PROJECT_CACHES_HOME=n.HVIGOR_PNPM_STORE_PATH=n.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=n.PROJECT_CACHES=n.HVIGOR_WRAPPER_TOOLS_HOME=n.HVIGOR_USER_HOME=n.DEFAULT_PACKAGE_JSON=n.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=n.PNPM=n.HVIGOR=n.NPM_TOOL=n.PNPM_TOOL=n.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const i=o(t),s=o(e),a=h;n.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",n.PNPM_TOOL=(0,a.isWindows)()?"pnpm.cmd":"pnpm",n.NPM_TOOL=(0,a.isWindows)()?"npm.cmd":"npm",n.HVIGOR="hvigor",n.PNPM="pnpm",n.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",n.DEFAULT_PACKAGE_JSON="package.json",n.HVIGOR_USER_HOME=s.resolve(i.homedir(),".hvigor"),n.HVIGOR_WRAPPER_TOOLS_HOME=s.resolve(n.HVIGOR_USER_HOME,"wrapper","tools"),n.PROJECT_CACHES="project_caches",n.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=s.resolve(n.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",n.PNPM_TOOL),n.HVIGOR_PNPM_STORE_PATH=s.resolve(n.HVIGOR_USER_HOME,"caches"),n.HVIGOR_PROJECT_CACHES_HOME=s.resolve(n.HVIGOR_USER_HOME,n.PROJECT_CACHES),n.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),n.HVIGOR_PROJECT_WRAPPER_HOME=s.resolve(n.HVIGOR_PROJECT_ROOT_DIR,n.HVIGOR),n.WORK_SPACE="workspace",n.HVIGOR_CACHE_DIR_KEY="hvigor.cacheDir",n.ENABLE_SIGN_TASK_KEY="enableSignTask",n.HVIGOR_POOL_MAX_SIZE="hvigor.pool.maxSize",n.HVIGOR_POOL_MAX_CORE_SIZE="hvigor.pool.maxCoreSize",n.HVIGOR_POOL_CACHE_CAPACITY="hvigor.pool.cache.capacity",n.HVIGOR_POOL_CACHE_TTL="hvigor.pool.cache.ttl",n.PROPERTIES="properties",n.DOT=".",n.DAEMON="daemon",n.INCREMENTAL="incremental",n.PARALLEL="typeCheck",n.ANALYZE="analyze",n.LOG_LEVEL="logLevel"}(E);var v={},S={};Object.defineProperty(S,"__esModule",{value:!0}),S.logError=S.logInfo=S.logErrorAndExit=void 0,S.logErrorAndExit=function(e){e instanceof Error?console.error(e.message):console.error(e),process.exit(-1)},S.logInfo=function(e){console.log(e)},S.logError=function(e){console.error(e)};var w=p&&p.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),O=p&&p.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_=p&&p.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&w(t,e,n);return O(t,e),t};Object.defineProperty(v,"__esModule",{value:!0});var b=v.executeBuild=void 0;const B=_(n),x=_(e),P=S,I=r;b=v.executeBuild=function(e){const t=x.resolve(e,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const e=B.realpathSync(t),n=process.argv.slice(2),r=(0,I.spawn)("node",[e,...n],{env:process.env});r.stdout.on("data",(e=>{(0,P.logInfo)(`${e.toString().trim()}`)})),r.stderr.on("data",(e=>{(0,P.logError)(`${e.toString().trim()}`)})),r.on("exit",((e,t)=>{process.exit(null!=e?e:-1)}))}catch(n){(0,P.logErrorAndExit)(`Error: ENOENT: no such file ${t},delete ${e} and retry.`)}};var N,T,k,R,M,L={},j={},$={exports:{}},H={exports:{}};function G(){if(T)return N;T=1;var e=1e3,t=60*e,n=60*t,r=24*n,u=7*r,o=365.25*r;function i(e,t,n,r){var u=t>=1.5*n;return Math.round(e/n)+" "+r+(u?"s":"")}return N=function(s,a){a=a||{};var c=typeof s;if("string"===c&&s.length>0)return function(i){if((i=String(i)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(!s)return;var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*o;case"weeks":case"week":case"w":return a*u;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(s);if("number"===c&&isFinite(s))return a.long?function(u){var o=Math.abs(u);if(o>=r)return i(u,o,r,"day");if(o>=n)return i(u,o,n,"hour");if(o>=t)return i(u,o,t,"minute");if(o>=e)return i(u,o,e,"second");return u+" ms"}(s):function(u){var o=Math.abs(u);if(o>=r)return Math.round(u/r)+"d";if(o>=n)return Math.round(u/n)+"h";if(o>=t)return Math.round(u/t)+"m";if(o>=e)return Math.round(u/e)+"s";return u+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}function V(){if(R)return k;return R=1,k=function(e){function t(e){let r,u,o,i=null;function s(...e){if(!s.enabled)return;const n=s,u=Number(new Date),o=u-(r||u);n.diff=o,n.prev=r,n.curr=u,r=u,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,u)=>{if("%%"===r)return"%";i++;const o=t.formatters[u];if("function"==typeof o){const t=e[i];r=o.call(n,t),e.splice(i,1),i--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(u!==t.namespaces&&(u=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),u=r.length;for(n=0;n<u;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=G(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},k}var J,U,W,z,K,q,Y={exports:{}};function Z(){return U||(U=1,J=(e,t)=>{t=t||process.argv;const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),u=t.indexOf("--");return-1!==r&&(-1===u||r<u)}),J}function X(){if(z)return W;z=1;const e=t,n=Z(),r=process.env;let u;function o(t){const o=function(t){if(!1===u)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!t.isTTY&&!0!==u)return 0;const o=u?1:0;if("win32"===process.platform){const t=e.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in r))||"codeship"===r.CI_NAME?1:o;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:(r.TERM,o)}(t);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(o)}return n("no-color")||n("no-colors")||n("color=false")?u=!1:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(u=!0),"FORCE_COLOR"in r&&(u=0===r.FORCE_COLOR.length||0!==parseInt(r.FORCE_COLOR,10)),W={supportsColor:o,stdout:o(process.stdout),stderr:o(process.stderr)}}function Q(){return K||(K=1,function(e,t){const n=o,r=i;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.format(...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:u}=this;if(u){const t=this.color,u="[3"+(t<8?t:"8;5;"+t),o=` ${u};1m${r} [0m`;n[0]=o+n[0].split("\n").join("\n"+o),n.push(u+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=X();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=V()(t);const{formatters:u}=e.exports;u.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},u.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(Y,Y.exports)),Y.exports}q=$,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?q.exports=(M||(M=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,u=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(u=r))})),t.splice(u,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=V()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(H,H.exports)),H.exports):q.exports=Q();var ee=function(e){return(e=e||{}).circles?function(e){var t=[],n=[];return e.proto?function e(u){if("object"!=typeof u||null===u)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,e);if(u instanceof Map)return new Map(r(Array.from(u),e));if(u instanceof Set)return new Set(r(Array.from(u),e));var o={};for(var i in t.push(u),n.push(o),u){var s=u[i];if("object"!=typeof s||null===s)o[i]=s;else if(s instanceof Date)o[i]=new Date(s);else if(s instanceof Map)o[i]=new Map(r(Array.from(s),e));else if(s instanceof Set)o[i]=new Set(r(Array.from(s),e));else if(ArrayBuffer.isView(s))o[i]=te(s);else{var a=t.indexOf(s);o[i]=-1!==a?n[a]:e(s)}}return t.pop(),n.pop(),o}:function e(u){if("object"!=typeof u||null===u)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,e);if(u instanceof Map)return new Map(r(Array.from(u),e));if(u instanceof Set)return new Set(r(Array.from(u),e));var o={};for(var i in t.push(u),n.push(o),u)if(!1!==Object.hasOwnProperty.call(u,i)){var s=u[i];if("object"!=typeof s||null===s)o[i]=s;else if(s instanceof Date)o[i]=new Date(s);else if(s instanceof Map)o[i]=new Map(r(Array.from(s),e));else if(s instanceof Set)o[i]=new Set(r(Array.from(s),e));else if(ArrayBuffer.isView(s))o[i]=te(s);else{var a=t.indexOf(s);o[i]=-1!==a?n[a]:e(s)}}return t.pop(),n.pop(),o};function r(e,r){for(var u=Object.keys(e),o=new Array(u.length),i=0;i<u.length;i++){var s=u[i],a=e[s];if("object"!=typeof a||null===a)o[s]=a;else if(a instanceof Date)o[s]=new Date(a);else if(ArrayBuffer.isView(a))o[s]=te(a);else{var c=t.indexOf(a);o[s]=-1!==c?n[c]:r(a)}}return o}}(e):e.proto?function e(n){if("object"!=typeof n||null===n)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return t(n,e);if(n instanceof Map)return new Map(t(Array.from(n),e));if(n instanceof Set)return new Set(t(Array.from(n),e));var r={};for(var u in n){var o=n[u];"object"!=typeof o||null===o?r[u]=o:o instanceof Date?r[u]=new Date(o):o instanceof Map?r[u]=new Map(t(Array.from(o),e)):o instanceof Set?r[u]=new Set(t(Array.from(o),e)):ArrayBuffer.isView(o)?r[u]=te(o):r[u]=e(o)}return r}:n;function t(e,t){for(var n=Object.keys(e),r=new Array(n.length),u=0;u<n.length;u++){var o=n[u],i=e[o];"object"!=typeof i||null===i?r[o]=i:i instanceof Date?r[o]=new Date(i):ArrayBuffer.isView(i)?r[o]=te(i):r[o]=t(i)}return r}function n(e){if("object"!=typeof e||null===e)return e;if(e instanceof Date)return new Date(e);if(Array.isArray(e))return t(e,n);if(e instanceof Map)return new Map(t(Array.from(e),n));if(e instanceof Set)return new Set(t(Array.from(e),n));var r={};for(var u in e)if(!1!==Object.hasOwnProperty.call(e,u)){var o=e[u];"object"!=typeof o||null===o?r[u]=o:o instanceof Date?r[u]=new Date(o):o instanceof Map?r[u]=new Map(t(Array.from(o),n)):o instanceof Set?r[u]=new Set(t(Array.from(o),n)):ArrayBuffer.isView(o)?r[u]=te(o):r[u]=n(o)}return r}};function te(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}const ne=i,re=$.exports("log4js:configuration"),ue=[],oe=[],ie=e=>!e,se=e=>e&&"object"==typeof e&&!Array.isArray(e),ae=(e,t,n)=>{(Array.isArray(t)?t:[t]).forEach((t=>{if(t)throw new Error(`Problem with log4js configuration: (${ne.inspect(e,{depth:5})}) - ${n}`)}))};var ce={configure:e=>{re("New configuration to be validated: ",e),ae(e,ie(se(e)),"must be an object."),re(`Calling pre-processing listeners (${ue.length})`),ue.forEach((t=>t(e))),re("Configuration pre-processing finished."),re(`Calling configuration listeners (${oe.length})`),oe.forEach((t=>t(e))),re("Configuration finished.")},addListener:e=>{oe.push(e),re(`Added listener, now ${oe.length} listeners`)},addPreProcessingListener:e=>{ue.push(e),re(`Added pre-processing listener, now ${ue.length} listeners`)},throwExceptionIf:ae,anObject:se,anInteger:e=>e&&"number"==typeof e&&Number.isInteger(e),validIdentifier:e=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(e),not:ie},le={exports:{}};!function(e){function t(e,t){for(var n=e.toString();n.length<t;)n="0"+n;return n}function n(e){return t(e,2)}function r(r,u){"string"!=typeof r&&(u=r,r=e.exports.ISO8601_FORMAT),u||(u=e.exports.now());var o=n(u.getDate()),i=n(u.getMonth()+1),s=n(u.getFullYear()),a=n(s.substring(2,4)),c=r.indexOf("yyyy")>-1?s:a,l=n(u.getHours()),f=n(u.getMinutes()),D=n(u.getSeconds()),d=t(u.getMilliseconds(),3),p=function(e){var t=Math.abs(e),n=String(Math.floor(t/60)),r=String(t%60);return n=("0"+n).slice(-2),r=("0"+r).slice(-2),0===e?"Z":(e<0?"+":"-")+n+":"+r}(u.getTimezoneOffset());return r.replace(/dd/g,o).replace(/MM/g,i).replace(/y{1,4}/g,c).replace(/hh/g,l).replace(/mm/g,f).replace(/ss/g,D).replace(/SSS/g,d).replace(/O/g,p)}function u(e,t,n,r){e["set"+(r?"":"UTC")+t](n)}e.exports=r,e.exports.asString=r,e.exports.parse=function(t,n,r){if(!t)throw new Error("pattern must be supplied");return function(t,n,r){var o=t.indexOf("O")<0,i=!1,s=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(e,t){u(e,"FullYear",t,o)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(e,t){u(e,"Month",t-1,o),e.getMonth()!==t-1&&(i=!0)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(e,t){i&&u(e,"Month",e.getMonth()-1,o),u(e,"Date",t,o)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(e,t){u(e,"Hours",t,o)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(e,t){u(e,"Minutes",t,o)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(e,t){u(e,"Seconds",t,o)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(e,t){u(e,"Milliseconds",t,o)}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(e,t){t="Z"===t?0:t.replace(":","");var n=Math.abs(t),r=(t>0?-1:1)*(n%100+60*Math.floor(n/100));e.setUTCMinutes(e.getUTCMinutes()+r)}}],a=s.reduce((function(e,t){return t.pattern.test(e.regexp)?(t.index=e.regexp.match(t.pattern).index,e.regexp=e.regexp.replace(t.pattern,"("+t.regexp+")")):t.index=-1,e}),{regexp:t,index:[]}),c=s.filter((function(e){return e.index>-1}));c.sort((function(e,t){return e.index-t.index}));var l=new RegExp(a.regexp).exec(n);if(l){var f=r||e.exports.now();return c.forEach((function(e,t){e.fn(f,l[t+1])})),f}throw new Error("String '"+n+"' could not be parsed as '"+t+"'")}(t,n,r)},e.exports.now=function(){return new Date},e.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS",e.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO",e.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS",e.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"}(le);const fe=le.exports,De=t,de=i,pe=e,Ee=s,he=$.exports("log4js:layouts"),Ce={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function me(e){return e?`[${Ce[e][0]}m`:""}function Fe(e){return e?`[${Ce[e][1]}m`:""}function ye(e,t){return n=de.format("[%s] [%s] %s - ",fe.asString(e.startTime),e.level.toString(),e.categoryName),me(r=t)+n+Fe(r);var n,r}function ge(e){return ye(e)+de.format(...e.data)}function Ae(e){return ye(e,e.level.colour)+de.format(...e.data)}function ve(e){return de.format(...e.data)}function Se(e){return e.data[0]}function we(e,t){const n=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflosCMAF%])(\{([^}]+)\})?|([^%]+)/;function r(e){return e&&e.pid?e.pid.toString():process.pid.toString()}e=e||"%r %p %c - %m%n";const u={c:function(e,t){let n=e.categoryName;if(t){const e=parseInt(t,10),r=n.split(".");e<r.length&&(n=r.slice(r.length-e).join("."))}return n},d:function(e,t){let n=fe.ISO8601_FORMAT;if(t)switch(n=t,n){case"ISO8601":case"ISO8601_FORMAT":n=fe.ISO8601_FORMAT;break;case"ISO8601_WITH_TZ_OFFSET":case"ISO8601_WITH_TZ_OFFSET_FORMAT":n=fe.ISO8601_WITH_TZ_OFFSET_FORMAT;break;case"ABSOLUTE":process.emitWarning("Pattern %d{ABSOLUTE} is deprecated in favor of %d{ABSOLUTETIME}. Please use %d{ABSOLUTETIME} instead.","DeprecationWarning","log4js-node-DEP0003"),he("[log4js-node-DEP0003]","DEPRECATION: Pattern %d{ABSOLUTE} is deprecated and replaced by %d{ABSOLUTETIME}.");case"ABSOLUTETIME":case"ABSOLUTETIME_FORMAT":n=fe.ABSOLUTETIME_FORMAT;break;case"DATE":process.emitWarning("Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.","DeprecationWarning","log4js-node-DEP0004"),he("[log4js-node-DEP0004]","DEPRECATION: Pattern %d{DATE} is deprecated and replaced by %d{DATETIME}.");case"DATETIME":case"DATETIME_FORMAT":n=fe.DATETIME_FORMAT}return fe.asString(n,e.startTime)},h:function(){return De.hostname().toString()},m:function(e){return de.format(...e.data)},n:function(){return De.EOL},p:function(e){return e.level.toString()},r:function(e){return fe.asString("hh:mm:ss",e.startTime)},"[":function(e){return me(e.level.colour)},"]":function(e){return Fe(e.level.colour)},y:function(){return r()},z:r,"%":function(){return"%"},x:function(e,n){return void 0!==t[n]?"function"==typeof t[n]?t[n](e):t[n]:null},X:function(e,t){const n=e.context[t];return void 0!==n?"function"==typeof n?n(e):n:null},f:function(e,t){let n=e.fileName||"";if(n=function(e){const t="file://";return e.startsWith(t)&&("function"==typeof Ee.fileURLToPath?e=Ee.fileURLToPath(e):(e=pe.normalize(e.replace(new RegExp(`^${t}`),"")),"win32"===process.platform&&(e=e.startsWith("\\")?e.slice(1):pe.sep+pe.sep+e))),e}(n),t){const e=parseInt(t,10),r=n.split(pe.sep);r.length>e&&(n=r.slice(-e).join(pe.sep))}return n},l:function(e){return e.lineNumber?`${e.lineNumber}`:""},o:function(e){return e.columnNumber?`${e.columnNumber}`:""},s:function(e){return e.callStack||""},C:function(e){return e.className||""},M:function(e){return e.functionName||""},A:function(e){return e.functionAlias||""},F:function(e){return e.callerName||""}};function o(e,t,n){return u[e](t,n)}function i(e,t,n){let r=e;return r=function(e,t){let n;return e?(n=parseInt(e.slice(1),10),n>0?t.slice(0,n):t.slice(n)):t}(t,r),r=function(e,t){let n;if(e)if("-"===e.charAt(0))for(n=parseInt(e.slice(1),10);t.length<n;)t+=" ";else for(n=parseInt(e,10);t.length<n;)t=` ${t}`;return t}(n,r),r}return function(t){let r,u="",s=e;for(;null!==(r=n.exec(s));){const e=r[1],n=r[2],a=r[3],c=r[5],l=r[6];if(l)u+=l.toString();else{u+=i(o(a,t,c),n,e)}s=s.slice(r.index+r[0].length)}return u}}const Oe={messagePassThrough:()=>ve,basic:()=>ge,colored:()=>Ae,coloured:()=>Ae,pattern:e=>we(e&&e.pattern,e&&e.tokens),dummy:()=>Se};var _e={basicLayout:ge,messagePassThroughLayout:ve,patternLayout:we,colouredLayout:Ae,coloredLayout:Ae,dummyLayout:Se,addLayout(e,t){Oe[e]=t},layout:(e,t)=>Oe[e]&&Oe[e](t)};const be=ce,Be=["white","grey","black","blue","cyan","green","magenta","red","yellow"];class xe{constructor(e,t,n){this.level=e,this.levelStr=t,this.colour=n}toString(){return this.levelStr}static getLevel(e,t){return e?e instanceof xe?e:(e instanceof Object&&e.levelStr&&(e=e.levelStr),xe[e.toString().toUpperCase()]||t):t}static addLevels(e){if(e){Object.keys(e).forEach((t=>{const n=t.toUpperCase();xe[n]=new xe(e[t].value,n,e[t].colour);const r=xe.levels.findIndex((e=>e.levelStr===n));r>-1?xe.levels[r]=xe[n]:xe.levels.push(xe[n])})),xe.levels.sort(((e,t)=>e.level-t.level))}}isLessThanOrEqualTo(e){return"string"==typeof e&&(e=xe.getLevel(e)),this.level<=e.level}isGreaterThanOrEqualTo(e){return"string"==typeof e&&(e=xe.getLevel(e)),this.level>=e.level}isEqualTo(e){return"string"==typeof e&&(e=xe.getLevel(e)),this.level===e.level}}xe.levels=[],xe.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}}),be.addListener((e=>{const t=e.levels;if(t){be.throwExceptionIf(e,be.not(be.anObject(t)),"levels must be an object");Object.keys(t).forEach((n=>{be.throwExceptionIf(e,be.not(be.validIdentifier(n)),`level name "${n}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),be.throwExceptionIf(e,be.not(be.anObject(t[n])),`level "${n}" must be an object`),be.throwExceptionIf(e,be.not(t[n].value),`level "${n}" must have a 'value' property`),be.throwExceptionIf(e,be.not(be.anInteger(t[n].value)),`level "${n}".value must have an integer value`),be.throwExceptionIf(e,be.not(t[n].colour),`level "${n}" must have a 'colour' property`),be.throwExceptionIf(e,be.not(Be.indexOf(t[n].colour)>-1),`level "${n}".colour must be one of ${Be.join(", ")}`)}))}})),be.addListener((e=>{xe.addLevels(e.levels)}));var Pe=xe,Ie={exports:{}},Ne={};/*! (c) 2020 Andrea Giammarchi */
const{parse:Te,stringify:ke}=JSON,{keys:Re}=Object,Me=String,Le="string",je={},$e="object",He=(e,t)=>t,Ge=e=>e instanceof Me?Me(e):e,Ve=(e,t)=>typeof t===Le?new Me(t):t,Je=(e,t,n,r)=>{const u=[];for(let o=Re(n),{length:i}=o,s=0;s<i;s++){const i=o[s],a=n[i];if(a instanceof Me){const o=e[a];typeof o!==$e||t.has(o)?n[i]=r.call(n,i,o):(t.add(o),n[i]=je,u.push({k:i,a:[e,t,o,r]}))}else n[i]!==je&&(n[i]=r.call(n,i,a))}for(let{length:e}=u,t=0;t<e;t++){const{k:e,a:o}=u[t];n[e]=r.call(n,e,Je.apply(null,o))}return n},Ue=(e,t,n)=>{const r=Me(t.push(n)-1);return e.set(n,r),r},We=(e,t)=>{const n=Te(e,Ve).map(Ge),r=n[0],u=t||He,o=typeof r===$e&&r?Je(n,new Set,r,u):r;return u.call({"":o},"",o)};Ne.parse=We;const ze=(e,t,n)=>{const r=t&&typeof t===$e?(e,n)=>""===e||-1<t.indexOf(e)?n:void 0:t||He,u=new Map,o=[],i=[];let s=+Ue(u,o,r.call({"":e},"",e)),a=!s;for(;s<o.length;)a=!0,i[s]=ke(o[s++],c,n);return"["+i.join(",")+"]";function c(e,t){if(a)return a=!a,t;const n=r.call(this,e,t);switch(typeof n){case $e:if(null===n)return n;case Le:return u.get(n)||Ue(u,o,n)}return n}};Ne.stringify=ze;Ne.toJSON=e=>Te(ze(e));Ne.fromJSON=e=>We(ke(e));const Ke=Ne,qe=Pe;const Ye=new class{constructor(){const e={__LOG4JS_undefined__:void 0,__LOG4JS_NaN__:Number("abc"),__LOG4JS_Infinity__:1/0,"__LOG4JS_-Infinity__":-1/0};this.deMap=e,this.serMap={},Object.keys(this.deMap).forEach((e=>{const t=this.deMap[e];this.serMap[t]=e}))}canSerialise(e){return"string"!=typeof e&&e in this.serMap}serialise(e){return this.canSerialise(e)?this.serMap[e]:e}canDeserialise(e){return e in this.deMap}deserialise(e){return this.canDeserialise(e)?this.deMap[e]:e}};let Ze=class{constructor(e,t,n,r,u,o){if(this.startTime=new Date,this.categoryName=e,this.data=n,this.level=t,this.context=Object.assign({},r),this.pid=process.pid,this.error=o,void 0!==u){if(!u||"object"!=typeof u||Array.isArray(u))throw new TypeError("Invalid location type passed to LoggingEvent constructor");this.constructor._getLocationKeys().forEach((e=>{void 0!==u[e]&&(this[e]=u[e])}))}}static _getLocationKeys(){return["fileName","lineNumber","columnNumber","callStack","className","functionName","functionAlias","callerName"]}serialise(){return Ke.stringify(this,((e,t)=>(t instanceof Error&&(t=Object.assign({message:t.message,stack:t.stack},t)),Ye.serialise(t))))}static deserialise(e){let t;try{const n=Ke.parse(e,((e,t)=>{if(t&&t.message&&t.stack){const e=new Error(t);Object.keys(t).forEach((n=>{e[n]=t[n]})),t=e}return Ye.deserialise(t)}));this._getLocationKeys().forEach((e=>{void 0!==n[e]&&(n.location||(n.location={}),n.location[e]=n[e])})),t=new Ze(n.categoryName,qe.getLevel(n.level.levelStr),n.data,n.context,n.location,n.error),t.startTime=new Date(n.startTime),t.pid=n.pid,n.cluster&&(t.cluster=n.cluster)}catch(n){t=new Ze("log4js",qe.ERROR,["Unable to parse log:",e,"because: ",n])}return t}};var Xe=Ze;const Qe=$.exports("log4js:clustering"),et=Xe,tt=ce;let nt=!1,rt=null;try{rt=require("cluster")}catch(e){Qe("cluster module not present"),nt=!0}const ut=[];let ot=!1,it="NODE_APP_INSTANCE";const st=()=>ot&&"0"===process.env[it],at=()=>nt||rt&&rt.isMaster||st(),ct=e=>{ut.forEach((t=>t(e)))},lt=(e,t)=>{if(Qe("cluster message received from worker ",e,": ",t),e.topic&&e.data&&(t=e,e=void 0),t&&t.topic&&"log4js:message"===t.topic){Qe("received message: ",t.data);const e=et.deserialise(t.data);ct(e)}};nt||tt.addListener((e=>{ut.length=0,({pm2:ot,disableClustering:nt,pm2InstanceVar:it="NODE_APP_INSTANCE"}=e),Qe(`clustering disabled ? ${nt}`),Qe(`cluster.isMaster ? ${rt&&rt.isMaster}`),Qe(`pm2 enabled ? ${ot}`),Qe(`pm2InstanceVar = ${it}`),Qe(`process.env[${it}] = ${process.env[it]}`),ot&&process.removeListener("message",lt),rt&&rt.removeListener&&rt.removeListener("message",lt),nt||e.disableClustering?Qe("Not listening for cluster messages, because clustering disabled."):st()?(Qe("listening for PM2 broadcast messages"),process.on("message",lt)):rt&&rt.isMaster?(Qe("listening for cluster messages"),rt.on("message",lt)):Qe("not listening for messages, because we are not a master process")}));var ft={onlyOnMaster:(e,t)=>at()?e():t,isMaster:at,send:e=>{at()?ct(e):(ot||(e.cluster={workerId:rt.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:e.serialise()}))},onMessage:e=>{ut.push(e)}},Dt={};function dt(e){if("number"==typeof e&&Number.isInteger(e))return e;const t={K:1024,M:1048576,G:1073741824},n=Object.keys(t),r=e.slice(-1).toLocaleUpperCase(),u=e.slice(0,-1).trim();if(n.indexOf(r)<0||!Number.isInteger(Number(u)))throw Error(`maxLogSize: "${e}" is invalid`);return u*t[r]}function pt(e){return function(e,t){const n=Object.assign({},t);return Object.keys(e).forEach((r=>{n[r]&&(n[r]=e[r](t[r]))})),n}({maxLogSize:dt},e)}const Et={dateFile:pt,file:pt,fileSync:pt};Dt.modifyConfig=e=>Et[e.type]?Et[e.type](e):e;var ht={};const Ct=console.log.bind(console);ht.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{Ct(e(n,t))}}(n,e.timezoneOffset)};var mt={};mt.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{process.stdout.write(`${e(n,t)}\n`)}}(n,e.timezoneOffset)};var Ft={};Ft.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{process.stderr.write(`${e(n,t)}\n`)}}(n,e.timezoneOffset)};var yt={};yt.configure=function(e,t,n,r){const u=n(e.appender);return function(e,t,n,r){const u=r.getLevel(e),o=r.getLevel(t,r.FATAL);return e=>{const t=e.level;u.isLessThanOrEqualTo(t)&&o.isGreaterThanOrEqualTo(t)&&n(e)}}(e.level,e.maxLevel,u,r)};var gt={};const At=$.exports("log4js:categoryFilter");gt.configure=function(e,t,n){const r=n(e.appender);return function(e,t){return"string"==typeof e&&(e=[e]),n=>{At(`Checking ${n.categoryName} against ${e}`),-1===e.indexOf(n.categoryName)&&(At("Not excluded, sending to appender"),t(n))}}(e.exclude,r)};var vt={};const St=$.exports("log4js:noLogFilter");vt.configure=function(e,t,n){const r=n(e.appender);return function(e,t){return n=>{St(`Checking data: ${n.data} against filters: ${e}`),"string"==typeof e&&(e=[e]),e=e.filter((e=>null!=e&&""!==e));const r=new RegExp(e.join("|"),"i");(0===e.length||n.data.findIndex((e=>r.test(e)))<0)&&(St("Not excluded, sending to appender"),t(n))}}(e.exclude,r)};var wt={},Ot={exports:{}},_t={},bt={fromCallback:function(e){return Object.defineProperty((function(){if("function"!=typeof arguments[arguments.length-1])return new Promise(((t,n)=>{arguments[arguments.length]=(e,r)=>{if(e)return n(e);t(r)},arguments.length++,e.apply(this,arguments)}));e.apply(this,arguments)}),"name",{value:e.name})},fromPromise:function(e){return Object.defineProperty((function(){const t=arguments[arguments.length-1];if("function"!=typeof t)return e.apply(this,arguments);e.apply(this,arguments).then((e=>t(null,e)),t)}),"name",{value:e.name})}},Bt=a,xt=process.cwd,Pt=null,It=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Pt||(Pt=xt.call(process)),Pt};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var Nt=process.chdir;process.chdir=function(e){Pt=null,Nt.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Nt)}var Tt=function(e){Bt.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,n,r){e.open(t,Bt.O_WRONLY|Bt.O_SYMLINK,n,(function(t,u){t?r&&r(t):e.fchmod(u,n,(function(t){e.close(u,(function(e){r&&r(t||e)}))}))}))},e.lchmodSync=function(t,n){var r,u=e.openSync(t,Bt.O_WRONLY|Bt.O_SYMLINK,n),o=!0;try{r=e.fchmodSync(u,n),o=!1}finally{if(o)try{e.closeSync(u)}catch(e){}else e.closeSync(u)}return r}}(e);e.lutimes||function(e){Bt.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,n,r,u){e.open(t,Bt.O_SYMLINK,(function(t,o){t?u&&u(t):e.futimes(o,n,r,(function(t){e.close(o,(function(e){u&&u(t||e)}))}))}))},e.lutimesSync=function(t,n,r){var u,o=e.openSync(t,Bt.O_SYMLINK),i=!0;try{u=e.futimesSync(o,n,r),i=!1}finally{if(i)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return u}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e);e.chown=r(e.chown),e.fchown=r(e.fchown),e.lchown=r(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=u(e.chownSync),e.fchownSync=u(e.fchownSync),e.lchownSync=u(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=i(e.statSync),e.fstatSync=i(e.fstatSync),e.lstatSync=i(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){});"win32"===It&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function n(n,r,u){var o=Date.now(),i=0;t(n,r,(function s(a){if(a&&("EACCES"===a.code||"EPERM"===a.code||"EBUSY"===a.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(r,(function(e,o){e&&"ENOENT"===e.code?t(n,r,s):u(a)}))}),i),void(i<100&&(i+=10));u&&u(a)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.rename));function t(t){return t?function(n,r,u){return t.call(e,n,r,(function(e){s(e)&&(e=null),u&&u.apply(this,arguments)}))}:t}function n(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){if(!s(e))throw e}}:t}function r(t){return t?function(n,r,u,o){return t.call(e,n,r,u,(function(e){s(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function u(t){return t?function(n,r,u){try{return t.call(e,n,r,u)}catch(e){if(!s(e))throw e}}:t}function o(t){return t?function(n,r,u){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),u&&u.appl
gitextract_02fjpw07/
├── .gitignore
├── .metadata
├── .travis.yml
├── .vscode/
│ └── settings.json
├── README.md
├── vibration/
│ ├── .gitignore
│ ├── .metadata
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── analysis_options.yaml
│ ├── android/
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── settings.gradle
│ │ └── src/
│ │ └── main/
│ │ ├── AndroidManifest.xml
│ │ └── java/
│ │ └── com/
│ │ └── benjaminabel/
│ │ └── vibration/
│ │ ├── Vibration.java
│ │ ├── VibrationMethodChannelHandler.java
│ │ └── VibrationPlugin.java
│ ├── example/
│ │ ├── .gitignore
│ │ ├── .metadata
│ │ ├── README.md
│ │ ├── analysis_options.yaml
│ │ ├── android/
│ │ │ ├── .gitignore
│ │ │ ├── app/
│ │ │ │ ├── build.gradle
│ │ │ │ └── src/
│ │ │ │ ├── debug/
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ ├── main/
│ │ │ │ │ ├── AndroidManifest.xml
│ │ │ │ │ ├── java/
│ │ │ │ │ │ └── com/
│ │ │ │ │ │ └── example/
│ │ │ │ │ │ └── example/
│ │ │ │ │ │ └── MainActivity.java
│ │ │ │ │ └── res/
│ │ │ │ │ ├── drawable/
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── drawable-v21/
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── values/
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ └── values-night/
│ │ │ │ │ └── styles.xml
│ │ │ │ └── profile/
│ │ │ │ └── AndroidManifest.xml
│ │ │ ├── build.gradle
│ │ │ ├── gradle/
│ │ │ │ └── wrapper/
│ │ │ │ └── gradle-wrapper.properties
│ │ │ ├── gradle.properties
│ │ │ └── settings.gradle
│ │ ├── ios/
│ │ │ ├── .gitignore
│ │ │ ├── Flutter/
│ │ │ │ ├── AppFrameworkInfo.plist
│ │ │ │ ├── Debug.xcconfig
│ │ │ │ ├── Flutter.podspec
│ │ │ │ └── Release.xcconfig
│ │ │ ├── Runner/
│ │ │ │ ├── AppDelegate.swift
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── LaunchImage.imageset/
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── README.md
│ │ │ │ ├── Base.lproj/
│ │ │ │ │ ├── LaunchScreen.storyboard
│ │ │ │ │ └── Main.storyboard
│ │ │ │ ├── Info.plist
│ │ │ │ └── Runner-Bridging-Header.h
│ │ │ ├── Runner.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ ├── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ │ └── WorkspaceSettings.xcsettings
│ │ │ │ └── xcshareddata/
│ │ │ │ └── xcschemes/
│ │ │ │ └── Runner.xcscheme
│ │ │ ├── Runner.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ │ └── RunnerTests/
│ │ │ └── RunnerTests.swift
│ │ ├── lib/
│ │ │ └── main.dart
│ │ └── pubspec.yaml
│ ├── ios/
│ │ ├── .gitignore
│ │ ├── vibration/
│ │ │ ├── Package.swift
│ │ │ └── Sources/
│ │ │ └── vibration/
│ │ │ ├── Resources/
│ │ │ │ └── PrivacyInfo.xcprivacy
│ │ │ └── VibrationPlugin.swift
│ │ └── vibration.podspec
│ ├── lib/
│ │ ├── vibration.dart
│ │ └── vibration_presets.dart
│ ├── pubspec.yaml
│ └── test/
│ └── vibration_test.dart
├── vibration.iml
├── vibration_ohos/
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── analysis_options.yaml
│ ├── example/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── analysis_options.yaml
│ │ ├── assets/
│ │ │ └── haptic_file.json
│ │ ├── lib/
│ │ │ └── main.dart
│ │ ├── ohos/
│ │ │ ├── .gitignore
│ │ │ ├── AppScope/
│ │ │ │ ├── app.json5
│ │ │ │ └── resources/
│ │ │ │ └── base/
│ │ │ │ └── element/
│ │ │ │ └── string.json
│ │ │ ├── build-profile.json5
│ │ │ ├── entry/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── build-profile.json5
│ │ │ │ ├── hvigorfile.ts
│ │ │ │ ├── oh-package.json5
│ │ │ │ └── src/
│ │ │ │ └── main/
│ │ │ │ ├── ets/
│ │ │ │ │ ├── entryability/
│ │ │ │ │ │ └── EntryAbility.ets
│ │ │ │ │ ├── pages/
│ │ │ │ │ │ └── Index.ets
│ │ │ │ │ └── plugins/
│ │ │ │ │ └── GeneratedPluginRegistrant.ets
│ │ │ │ ├── module.json5
│ │ │ │ └── resources/
│ │ │ │ ├── base/
│ │ │ │ │ ├── element/
│ │ │ │ │ │ ├── color.json
│ │ │ │ │ │ └── string.json
│ │ │ │ │ └── profile/
│ │ │ │ │ └── main_pages.json
│ │ │ │ ├── en_US/
│ │ │ │ │ └── element/
│ │ │ │ │ └── string.json
│ │ │ │ └── zh_CN/
│ │ │ │ └── element/
│ │ │ │ └── string.json
│ │ │ ├── hvigor/
│ │ │ │ ├── hvigor-config.json5
│ │ │ │ └── hvigor-wrapper.js
│ │ │ ├── hvigorfile.ts
│ │ │ ├── hvigorw
│ │ │ ├── hvigorw.bat
│ │ │ └── oh-package.json5
│ │ └── pubspec.yaml
│ ├── lib/
│ │ └── vibration_ohos.dart
│ ├── ohos/
│ │ ├── .gitignore
│ │ ├── build-profile.json5
│ │ ├── hvigorfile.ts
│ │ ├── index.ets
│ │ ├── oh-package.json5
│ │ └── src/
│ │ └── main/
│ │ ├── ets/
│ │ │ └── components/
│ │ │ └── plugin/
│ │ │ └── VibrationOhosPlugin.ets
│ │ └── module.json5
│ └── pubspec.yaml
├── vibration_platform_interface/
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── lib/
│ │ ├── src/
│ │ │ └── method_channel_vibration.dart
│ │ └── vibration_platform_interface.dart
│ └── pubspec.yaml
└── vibration_web/
├── .flutter-plugins
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── ios/
│ ├── .gitignore
│ └── vibration_web.podspec
├── lib/
│ └── vibration_web.dart
├── pubspec.yaml
└── vibration_web.iml
SYMBOL INDEX (274 symbols across 14 files)
FILE: vibration/android/src/main/java/com/benjaminabel/vibration/Vibration.java
class Vibration (line 10) | public class Vibration {
method Vibration (line 13) | Vibration(Vibrator vibrator) {
method vibrate (line 17) | @SuppressWarnings("deprecation")
method vibrate (line 38) | @SuppressWarnings("deprecation")
method vibrate (line 58) | @SuppressWarnings("deprecation")
method getVibrator (line 90) | Vibrator getVibrator() {
FILE: vibration/android/src/main/java/com/benjaminabel/vibration/VibrationMethodChannelHandler.java
class VibrationMethodChannelHandler (line 11) | class VibrationMethodChannelHandler implements MethodChannel.MethodCallH...
method VibrationMethodChannelHandler (line 14) | VibrationMethodChannelHandler(Vibration vibrationPlugin) {
method onMethodCall (line 19) | @Override
FILE: vibration/android/src/main/java/com/benjaminabel/vibration/VibrationPlugin.java
class VibrationPlugin (line 14) | public class VibrationPlugin implements FlutterPlugin {
method getVibrator (line 18) | public Vibrator getVibrator(@NonNull FlutterPluginBinding flutterPlugi...
method getLegacyVibrator (line 32) | @SuppressWarnings("deprecation")
method onAttachedToEngine (line 45) | @Override
method onDetachedFromEngine (line 54) | @Override
FILE: vibration/example/android/app/src/main/java/com/example/example/MainActivity.java
class MainActivity (line 5) | public class MainActivity extends FlutterActivity {
FILE: vibration/example/lib/main.dart
function main (line 5) | void main()
class VibratingApp (line 7) | class VibratingApp extends StatelessWidget {
method showSnackBar (line 10) | void showSnackBar(
method build (line 49) | Widget build(BuildContext context)
FILE: vibration/lib/vibration.dart
class Vibration (line 7) | class Vibration {
method hasVibrator (line 17) | Future<bool> hasVibrator()
method hasAmplitudeControl (line 30) | Future<bool> hasAmplitudeControl()
method hasCustomVibrationsSupport (line 48) | Future<bool> hasCustomVibrationsSupport()
method vibrate (line 69) | Future<void> vibrate({
method cancel (line 111) | Future<void> cancel()
FILE: vibration/lib/vibration_presets.dart
class VibrationPresetConfig (line 2) | class VibrationPresetConfig {
type VibrationPreset (line 17) | enum VibrationPreset {
FILE: vibration/test/vibration_test.dart
function main (line 5) | void main()
FILE: vibration_ohos/example/lib/main.dart
function main (line 7) | void main()
class VibratingApp (line 9) | class VibratingApp extends StatelessWidget {
method build (line 13) | Widget build(BuildContext context)
FILE: vibration_ohos/example/ohos/hvigor/hvigor-wrapper.js
function g (line 1) | function g(){return m.default.type()===F}
function A (line 1) | function A(){return m.default.type()===y}
function G (line 1) | function G(){if(T)return N;T=1;var e=1e3,t=60*e,n=60*t,r=24*n,u=7*r,o=36...
function V (line 1) | function V(){if(R)return k;return R=1,k=function(e){function t(e){let r,...
function Z (line 1) | function Z(){return U||(U=1,J=(e,t)=>{t=t||process.argv;const n=e.starts...
function X (line 1) | function X(){if(z)return W;z=1;const e=t,n=Z(),r=process.env;let u;funct...
function Q (line 1) | function Q(){return K||(K=1,function(e,t){const n=o,r=i;t.init=function(...
function r (line 1) | function r(e,r){for(var u=Object.keys(e),o=new Array(u.length),i=0;i<u.l...
function t (line 1) | function t(e,t){for(var n=Object.keys(e),r=new Array(n.length),u=0;u<n.l...
function n (line 1) | function n(e){if("object"!=typeof e||null===e)return e;if(e instanceof D...
function te (line 1) | function te(e){return e instanceof Buffer?Buffer.from(e):new e.construct...
function t (line 1) | function t(e,t){for(var n=e.toString();n.length<t;)n="0"+n;return n}
function n (line 1) | function n(e){return t(e,2)}
function r (line 1) | function r(r,u){"string"!=typeof r&&(u=r,r=e.exports.ISO8601_FORMAT),u||...
function u (line 1) | function u(e,t,n,r){e["set"+(r?"":"UTC")+t](n)}
function me (line 1) | function me(e){return e?`[${Ce[e][0]}m`:""}
function Fe (line 1) | function Fe(e){return e?`[${Ce[e][1]}m`:""}
function ye (line 1) | function ye(e,t){return n=de.format("[%s] [%s] %s - ",fe.asString(e.star...
function ge (line 1) | function ge(e){return ye(e)+de.format(...e.data)}
function Ae (line 1) | function Ae(e){return ye(e,e.level.colour)+de.format(...e.data)}
function ve (line 1) | function ve(e){return de.format(...e.data)}
function Se (line 1) | function Se(e){return e.data[0]}
function we (line 1) | function we(e,t){const n=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflos...
method addLayout (line 1) | addLayout(e,t){Oe[e]=t}
class xe (line 1) | class xe{constructor(e,t,n){this.level=e,this.levelStr=t,this.colour=n}t...
method constructor (line 1) | constructor(e,t,n){this.level=e,this.levelStr=t,this.colour=n}
method toString (line 1) | toString(){return this.levelStr}
method getLevel (line 1) | static getLevel(e,t){return e?e instanceof xe?e:(e instanceof Object&&...
method addLevels (line 1) | static addLevels(e){if(e){Object.keys(e).forEach((t=>{const n=t.toUppe...
method isLessThanOrEqualTo (line 1) | isLessThanOrEqualTo(e){return"string"==typeof e&&(e=xe.getLevel(e)),th...
method isGreaterThanOrEqualTo (line 1) | isGreaterThanOrEqualTo(e){return"string"==typeof e&&(e=xe.getLevel(e))...
method isEqualTo (line 1) | isEqualTo(e){return"string"==typeof e&&(e=xe.getLevel(e)),this.level==...
function c (line 2) | function c(e,t){if(a)return a=!a,t;const n=r.call(this,e,t);switch(typeo...
method constructor (line 2) | constructor(){const e={__LOG4JS_undefined__:void 0,__LOG4JS_NaN__:Number...
method canSerialise (line 2) | canSerialise(e){return"string"!=typeof e&&e in this.serMap}
method serialise (line 2) | serialise(e){return this.canSerialise(e)?this.serMap[e]:e}
method canDeserialise (line 2) | canDeserialise(e){return e in this.deMap}
method deserialise (line 2) | deserialise(e){return this.canDeserialise(e)?this.deMap[e]:e}
method constructor (line 2) | constructor(e,t,n,r,u,o){if(this.startTime=new Date,this.categoryName=e,...
method _getLocationKeys (line 2) | static _getLocationKeys(){return["fileName","lineNumber","columnNumber",...
method serialise (line 2) | serialise(){return Ke.stringify(this,((e,t)=>(t instanceof Error&&(t=Obj...
method deserialise (line 2) | static deserialise(e){let t;try{const n=Ke.parse(e,((e,t)=>{if(t&&t.mess...
function dt (line 2) | function dt(e){if("number"==typeof e&&Number.isInteger(e))return e;const...
function pt (line 2) | function pt(e){return function(e,t){const n=Object.assign({},t);return O...
function n (line 2) | function n(n,r,u){var o=Date.now(),i=0;t(n,r,(function s(a){if(a&&("EACC...
function t (line 2) | function t(t){return t?function(n,r,u){return t.call(e,n,r,(function(e){...
function n (line 2) | function n(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){i...
function r (line 2) | function r(t){return t?function(n,r,u,o){return t.call(e,n,r,u,(function...
function u (line 2) | function u(t){return t?function(n,r,u){try{return t.call(e,n,r,u)}catch(...
function o (line 2) | function o(t){return t?function(n,r,u){function o(e,t){t&&(t.uid<0&&(t.u...
function i (line 2) | function i(t){return t?function(n,r){var u=r?t.call(e,n,r):t.call(e,n);r...
function s (line 2) | function s(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===proces...
function n (line 2) | function n(n,r,u,o,i,s){var a;if(s&&"function"==typeof s){var c=0;a=func...
function Wt (line 2) | function Wt(e,t){Object.defineProperty(e,jt,{get:function(){return t}})}
function t (line 2) | function t(t,n){return e.call(Ht,t,(function(e){e||Qt(),"function"==type...
function t (line 2) | function t(t){e.apply(Ht,arguments),Qt()}
function Zt (line 2) | function Zt(e){Gt(e),e.gracefulify=Zt,e.createReadStream=function(t,n){r...
function Xt (line 2) | function Xt(e){zt("ENQUEUE",e[0].name,e[1]),Ht[jt].push(e),en()}
function Qt (line 2) | function Qt(){for(var e=Date.now(),t=0;t<Ht[jt].length;++t)Ht[jt][t].len...
function en (line 2) | function en(){if(clearTimeout(qt),qt=void 0,0!==Ht[jt].length){var e=Ht[...
function nn (line 2) | function nn(e){return(e=tn.normalize(tn.resolve(e)).split(tn.sep)).lengt...
function xn (line 2) | function xn(){if(_n>vn)return!0;if(_n===vn){if(bn>Sn)return!0;if(bn===Sn...
function Pn (line 2) | function Pn(e,t){const n=An.resolve(e).split(An.sep).filter((e=>e)),r=An...
function In (line 2) | function In(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself...
function Hn (line 2) | function Hn(e,t,n,r){if(!r.filter||r.filter(t,n))return function(e,t,n,r...
function Gn (line 2) | function Gn(e,t,n,r){return"function"==typeof Rn.copyFileSync?(Rn.copyFi...
function Vn (line 2) | function Vn(e,t,n){Rn.readdirSync(e).forEach((r=>function(e,t,n,r){const...
function tr (line 2) | function tr(e,t,n,r,u){const o=Yn.dirname(n);Xn(o,((i,s)=>i?u(i):s?rr(e,...
function nr (line 2) | function nr(e,t,n,r,u,o){Promise.resolve(u.filter(n,r)).then((i=>i?e(t,n...
function rr (line 2) | function rr(e,t,n,r,u){return r.filter?nr(ur,e,t,n,r,u):ur(e,t,n,r,u)}
function ur (line 2) | function ur(e,t,n,r,u){(r.dereference?qn.stat:qn.lstat)(t,((o,i)=>o?u(o)...
function or (line 2) | function or(e,t,n,r,u){return"function"==typeof qn.copyFile?qn.copyFile(...
function ir (line 2) | function ir(e,t,n,r){qn.chmod(t,e.mode,(u=>u?r(u):n.preserveTimestamps?Q...
function sr (line 2) | function sr(e,t,n,r){qn.readdir(e,((u,o)=>u?r(u):ar(o,e,t,n,r)))}
function ar (line 2) | function ar(e,t,n,r,u){const o=e.pop();return o?function(e,t,n,r,u,o){co...
function Er (line 2) | function Er(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEa...
function hr (line 2) | function hr(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),dr(e,"rimraf...
function Cr (line 2) | function Cr(e,t,n){dr(e),dr(t),dr("function"==typeof n),t.lstat(e,((r,u)...
function mr (line 2) | function mr(e,t,n,r){dr(e),dr(t),dr("function"==typeof r),n&&dr(n instan...
function Fr (line 2) | function Fr(e,t,n){let r;dr(e),dr(t),n&&dr(n instanceof Error);try{t.chm...
function yr (line 2) | function yr(e,t,n,r){dr(e),dr(t),n&&dr(n instanceof Error),dr("function"...
function gr (line 2) | function gr(e,t){let n;Er(t=t||{}),dr(e,"rimraf: missing path"),dr.stric...
function Ar (line 2) | function Ar(e,t,n){dr(e),dr(t),n&&dr(n instanceof Error);try{t.rmdirSync...
function Ir (line 2) | function Ir(e){let t;try{t=_r.readdirSync(e)}catch(t){return Br.mkdirsSy...
function n (line 2) | function n(){Rr.writeFile(e,"",(e=>{if(e)return t(e);t()}))}
function r (line 2) | function r(e,t){Gr.link(e,t,(e=>{if(e)return n(e);n(null)}))}
function fu (line 2) | function fu(e,t){var n,r="\n";return"object"==typeof t&&null!==t&&(t.spa...
function Du (line 2) | function Du(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e=e.rep...
function Mu (line 2) | function Mu(e,t,n){try{Pu.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)t...
function zu (line 2) | function zu(e,t,n,r){$u.rename(e,t,(u=>u?"EXDEV"!==u.code?r(u):function(...
method constructor (line 2) | constructor(e,t){if(lo(`constructor: creating RollingFileWriteStream. pa...
method _setExistingSizeAndDate (line 2) | _setExistingSizeAndDate(){try{const e=fo.statSync(this.filename);this.st...
method _parseOption (line 2) | _parseOption(e){const t={maxSize:0,numToKeep:Number.MAX_SAFE_INTEGER,enc...
method _final (line 2) | _final(e){this.currentFileStream.end("",this.options.encoding,e)}
method _write (line 2) | _write(e,t,n){this._shouldRoll().then((()=>{lo(`_write: writing chunk. f...
method _shouldRoll (line 2) | async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(lo(`_shouldR...
method _dateChanged (line 2) | _dateChanged(){return this.state.currentDate&&this.state.currentDate!==h...
method _tooBig (line 2) | _tooBig(){return this.state.currentSize>=this.options.maxSize}
method _roll (line 2) | _roll(){return lo("_roll: closing the current stream"),new Promise(((e,t...
method _moveOldFiles (line 2) | async _moveOldFiles(){const e=await this._getExistingFiles();for(let t=(...
method _getExistingFiles (line 2) | async _getExistingFiles(){const e=await fo.readdir(this.fileObject.dir)....
method _renewWriteStream (line 2) | _renewWriteStream(){const e=this.fileFormatter({date:this.state.currentD...
method _clean (line 2) | async _clean(){const e=await this._getExistingFiles();if(lo(`_clean: num...
method _tooManyFiles (line 2) | _tooManyFiles(e){return this.options.numToKeep>0&&e>this.options.numToKeep}
method constructor (line 2) | constructor(e,t,n,r){r||(r={}),t&&(r.maxSize=t),r.numBackups||0===r.numB...
method theStream (line 2) | get theStream(){return this.currentFileStream}
method constructor (line 2) | constructor(e,t,n){t&&"object"==typeof t&&(n=t,t=null),n||(n={}),t||(t="...
method theStream (line 2) | get theStream(){return this.currentFileStream}
function No (line 2) | function No(){Io.forEach((e=>{e.sighupHandler()}))}
function i (line 2) | function i(e,t,n,r){const u=new bo.RollingFileStream(e,t,n,r);return u.o...
function Mo (line 2) | function Mo(e,t,n,r,u){r.maxSize=r.maxLogSize;const o=function(e,t,n){co...
function Jo (line 2) | function Jo(e,t){const n=e=>{try{return Ho.mkdirSync(e,{recursive:!0})}c...
class Uo (line 2) | class Uo{constructor(e,t,n,r){if(jo("In RollingFileStream"),t<0)throw ne...
method constructor (line 2) | constructor(e,t,n,r){if(jo("In RollingFileStream"),t<0)throw new Error...
method shouldRoll (line 2) | shouldRoll(){return jo("should roll with current size %d, and max size...
method roll (line 2) | roll(e){const t=this,n=new RegExp(`^${$o.basename(e)}`);function r(e){...
method write (line 2) | write(e,t){const n=this;jo("in write"),this.shouldRoll()&&(this.curren...
method write (line 2) | write(e){Ho.appendFileSync(o,e)}
function s (line 2) | function s(e){zo("Writing log event to socket"),n=u.write(`${t(e)}${i}`,...
function a (line 2) | function a(){let e;for(zo("emptying buffer");e=r.shift();)s(e)}
function c (line 2) | function c(e){n?s(e):(zo("buffering log event because it cannot write at...
function i (line 2) | function i(e,t,n){if(!1===t.inherit)return;const r=n.lastIndexOf(".");if...
function s (line 2) | function s(e){if(!e.categories)return;Object.keys(e.categories).forEach(...
function mi (line 2) | function mi(e,t=4){try{const n=e.stack.split("\n").slice(t);if(!n.length...
method constructor (line 2) | constructor(e){if(!e)throw new Error("No category provided.");this.categ...
method level (line 2) | get level(){return di.getLevel(Ei.getLevelForCategory(this.category),di....
method level (line 2) | set level(e){Ei.setLevelForCategory(this.category,di.getLevel(e,this.lev...
method useCallStack (line 2) | get useCallStack(){return Ei.getEnableCallStackForCategory(this.category)}
method useCallStack (line 2) | set useCallStack(e){Ei.setEnableCallStackForCategory(this.category,!0===e)}
method callStackLinesToSkip (line 2) | get callStackLinesToSkip(){return this.callStackSkipIndex}
method callStackLinesToSkip (line 2) | set callStackLinesToSkip(e){if("number"!=typeof e)throw new TypeError("M...
method log (line 2) | log(e,...t){const n=di.getLevel(e);n?this.isLevelEnabled(n)&&this._log(n...
method isLevelEnabled (line 2) | isLevelEnabled(e){return this.level.isLessThanOrEqualTo(e)}
method _log (line 2) | _log(e,t){fi(`sending log data (${e}) to appenders`);const n=t.find((e=>...
method addContext (line 2) | addContext(e,t){this.context[e]=t}
method removeContext (line 2) | removeContext(e){delete this.context[e]}
method clearContext (line 2) | clearContext(){this.context={}}
method setParseCallStackFunction (line 2) | setParseCallStackFunction(e){if("function"==typeof e)this.parseCallStack...
function yi (line 2) | function yi(e){const t=di.getLevel(e),n=t.toString().toLowerCase().repla...
function vi (line 2) | function vi(e){return e.originalUrl||e.url}
function Si (line 2) | function Si(e,t){for(let n=0;n<t.length;n++)e=e.replace(t[n].token,t[n]....
function _i (line 2) | function _i(){return Oi.slice()}
function bi (line 2) | function bi(){Oi.length=0}
function Vi (line 2) | function Vi(e){if(!Gi)return;xi("Received log event ",e);Mi.appendersFor...
function Ji (line 2) | function Ji(e){Gi&&Ui();let t=e;return"string"==typeof t&&(t=function(e)...
function Ui (line 2) | function Ui(e=(()=>{})){if("function"!=typeof e)throw new TypeError("Inv...
class Xi (line 2) | class Xi{}
method isIgnoreChar (line 2) | static isIgnoreChar(e){return"string"==typeof e&&("\t"===e||"\v"===e||"\...
method isSpaceSeparator (line 2) | static isSpaceSeparator(e){return"string"==typeof e&&Qi.Unicode.SPACE_SE...
method isIdStartChar (line 2) | static isIdStartChar(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>="A...
method isIdContinueChar (line 2) | static isIdContinueChar(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>...
method isDigitWithoutZero (line 2) | static isDigitWithoutZero(e){return/[1-9]/.test(e)}
method isDigit (line 2) | static isDigit(e){return"string"==typeof e&&/[0-9]/.test(e)}
method isHexDigit (line 2) | static isHexDigit(e){return"string"==typeof e&&/[0-9A-Fa-f]/.test(e)}
function gs (line 2) | function gs(e,t=!1){ss=String(e),Ds="start",ds=[],ps=0,Es=1,hs=0,cs=void...
function As (line 2) | function As(){for(ms="default",ls="",Fs="'",ys=1;;){fs=vs();const e=ws[m...
function vs (line 2) | function vs(){if(ss[ps])return String.fromCodePoint(ss.codePointAt(ps))}
function Ss (line 2) | function Ss(){const e=vs();return"\n"===e?(Es++,hs=0):e?hs+=e.length:hs+...
method default (line 2) | default(){switch(fs){case"/":return Ss(),void(ms="comment");case void 0:...
method start (line 2) | start(){ms="value"}
method beforePropertyName (line 2) | beforePropertyName(){switch(fs){case"$":case"_":return ls=Ss(),void(ms="...
method afterPropertyName (line 2) | afterPropertyName(){if(":"===fs)return Os("punctuator",Ss());throw Ns(os...
method beforePropertyValue (line 2) | beforePropertyValue(){ms="value"}
method afterPropertyValue (line 2) | afterPropertyValue(){switch(fs){case",":case"}":return Os("punctuator",S...
method beforeArrayValue (line 2) | beforeArrayValue(){if("]"===fs)return Os("punctuator",Ss());ms="value"}
method afterArrayValue (line 2) | afterArrayValue(){switch(fs){case",":case"]":return Os("punctuator",Ss()...
method end (line 2) | end(){throw Ns(os.Char,Ss())}
method comment (line 2) | comment(){switch(fs){case"*":return Ss(),void(ms="multiLineComment");cas...
method multiLineComment (line 2) | multiLineComment(){switch(fs){case"*":return Ss(),void(ms="multiLineComm...
method multiLineCommentAsterisk (line 2) | multiLineCommentAsterisk(){switch(fs){case"*":return void Ss();case"/":r...
method singleLineComment (line 2) | singleLineComment(){switch(fs){case"\n":case"\r":case"\u2028":case"\u202...
method value (line 2) | value(){switch(fs){case"{":case"[":return Os("punctuator",Ss());case"n":...
method numerical (line 2) | numerical(){switch(fs){case".":return ls=Ss(),void(ms="decimalPointLeadi...
method zero (line 2) | zero(){switch(fs){case".":case"e":case"E":return void(ms="decimal");case...
method decimalInteger (line 2) | decimalInteger(){switch(fs){case".":case"e":case"E":return void(ms="deci...
method decimal (line 2) | decimal(){switch(fs){case".":ls+=Ss(),ms="decimalFraction";break;case"e"...
method decimalPointLeading (line 2) | decimalPointLeading(){if(us.JudgeUtil.isDigit(fs))return ls+=Ss(),void(m...
method decimalFraction (line 2) | decimalFraction(){switch(fs){case"e":case"E":return ls+=Ss(),void(ms="de...
method decimalExponent (line 2) | decimalExponent(){switch(fs){case"+":case"-":return ls+=Ss(),void(ms="de...
method decimalExponentSign (line 2) | decimalExponentSign(){if(us.JudgeUtil.isDigit(fs))return ls+=Ss(),void(m...
method decimalExponentInteger (line 2) | decimalExponentInteger(){if(!us.JudgeUtil.isDigit(fs))return Os("numeric...
method hexadecimal (line 2) | hexadecimal(){if(us.JudgeUtil.isHexDigit(fs))return ls+=Ss(),void(ms="he...
method hexadecimalInteger (line 2) | hexadecimalInteger(){if(!us.JudgeUtil.isHexDigit(fs))return Os("numeric"...
method identifierNameStartEscape (line 2) | identifierNameStartEscape(){if("u"!==fs)throw Ns(os.Char,Ss());Ss();cons...
method identifierName (line 2) | identifierName(){switch(fs){case"$":case"_":case"":case"":return void(...
method identifierNameEscape (line 2) | identifierNameEscape(){if("u"!==fs)throw Ns(os.Char,Ss());Ss();const e=b...
method string (line 2) | string(){switch(fs){case"\\":return Ss(),void(ls+=function(){const e=vs(...
function Os (line 2) | function Os(e,t){return{type:e,value:t,line:Es,column:hs}}
function _s (line 2) | function _s(e){for(const t of e){if(vs()!==t)throw Ns(os.Char,Ss());Ss()}}
function bs (line 2) | function bs(){let e="",t=4;for(;t-- >0;){const t=vs();if(!us.JudgeUtil.i...
method start (line 2) | start(){if("eof"===is.type)throw Ns(os.EOF);xs()}
method beforePropertyName (line 2) | beforePropertyName(){switch(is.type){case"identifier":case"string":retur...
method afterPropertyName (line 2) | afterPropertyName(){if("eof"===is.type)throw Ns(os.EOF);Ds="beforeProper...
method beforePropertyValue (line 2) | beforePropertyValue(){if("eof"===is.type)throw Ns(os.EOF);xs()}
method afterPropertyValue (line 2) | afterPropertyValue(){if("eof"===is.type)throw Ns(os.EOF);switch(is.value...
method beforeArrayValue (line 2) | beforeArrayValue(){if("eof"===is.type)throw Ns(os.EOF);"punctuator"!==is...
method afterArrayValue (line 2) | afterArrayValue(){if("eof"===is.type)throw Ns(os.EOF);switch(is.value){c...
method end (line 2) | end(){}
function xs (line 2) | function xs(){const e=function(){let e;switch(is.type){case"punctuator":...
function Ps (line 2) | function Ps(){ds.pop();const e=ds[ds.length-1];Ds=e?Array.isArray(e)?"af...
function Is (line 2) | function Is(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":...
function Ns (line 2) | function Ns(e,t){let n="";switch(e){case os.Char:n=void 0===t?`JSON5: in...
class Ts (line 2) | class Ts extends SyntaxError{}
function fa (line 2) | function fa(e,t,n){return void 0!==n.dependencies&&(0,ia.offlinePluginCo...
function e (line 2) | function e(e){const t=null==e?void 0:e.dependencies;return void 0===t?0:...
FILE: vibration_ohos/lib/vibration_ohos.dart
class VibrationOhos (line 10) | class VibrationOhos extends VibrationPlatform {
method registerWith (line 12) | void registerWith()
method hasVibrator (line 29) | Future<bool> hasVibrator()
method hasAmplitudeControl (line 53) | Future<bool> hasAmplitudeControl()
method hasCustomVibrationsSupport (line 82) | Future<bool> hasCustomVibrationsSupport()
method vibrate (line 104) | Future<void> vibrate({
method cancel (line 136) | Future<void> cancel()
function toMap (line 142) | Map<String, dynamic> toMap()
function toString (line 144) | String toString()
class VibrateTime (line 150) | class VibrateTime with VibrateEffect {
method toMap (line 160) | Map<String, dynamic> toMap()
class VibratePreset (line 169) | class VibratePreset with VibrateEffect {
method toMap (line 182) | Map<String, dynamic> toMap()
class VibrateFromFile (line 193) | class VibrateFromFile with VibrateEffect {
method toMap (line 201) | Map<String, dynamic> toMap()
class HapticFileDescriptor (line 213) | class HapticFileDescriptor {
method toMap (line 224) | Map<String, dynamic> toMap()
class VibrateAttribute (line 234) | class VibrateAttribute {
method toMap (line 256) | Map<String, dynamic> toMap()
method toString (line 264) | String toString()
FILE: vibration_platform_interface/lib/src/method_channel_vibration.dart
class MethodChannelVibration (line 7) | class MethodChannelVibration extends VibrationPlatform {
method hasVibrator (line 21) | Future<bool> hasVibrator()
method hasAmplitudeControl (line 57) | Future<bool> hasAmplitudeControl()
method hasCustomVibrationsSupport (line 99) | Future<bool> hasCustomVibrationsSupport()
method vibrate (line 121) | Future<void> vibrate({
method cancel (line 149) | Future<void> cancel()
FILE: vibration_platform_interface/lib/vibration_platform_interface.dart
class VibrationPlatform (line 14) | abstract class VibrationPlatform extends PlatformInterface {
method hasVibrator (line 41) | Future<bool> hasVibrator()
method hasAmplitudeControl (line 52) | Future<bool> hasAmplitudeControl()
method hasCustomVibrationsSupport (line 69) | Future<bool> hasCustomVibrationsSupport()
method vibrate (line 86) | Future<void> vibrate({
method cancel (line 104) | Future<void> cancel()
FILE: vibration_web/lib/vibration_web.dart
class VibrationWebPlugin (line 9) | class VibrationWebPlugin {
method registerWith (line 13) | void registerWith(Registrar registrar)
method handleMethodCall (line 27) | Future<dynamic> handleMethodCall(MethodCall call)
method _hasVibrator (line 49) | bool _hasVibrator()
method _vibrate (line 54) | _vibrate({int duration = 500, List<int> pattern = const []})
method _cancel (line 65) | _cancel()
Condensed preview — 131 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (344K chars).
[
{
"path": ".gitignore",
"chars": 133,
"preview": ".DS_Store\n.dart_tool/\n\n.packages\n.pub/\npubspec.lock\n\n.idea/\nbuild/\ndoc/\n\nflutter_export_environment.sh\n.flutter-plugins-"
},
{
"path": ".metadata",
"chars": 308,
"preview": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrade"
},
{
"path": ".travis.yml",
"chars": 360,
"preview": "os:\n - linux\nsudo: false\naddons:\n apt:\n sources:\n - ubuntu-toolchain-r-test\n packages:\n - libstdc++6\n "
},
{
"path": ".vscode/settings.json",
"chars": 187,
"preview": "{\n\t\"files.exclude\": {\n\t\t\"**/.classpath\": true,\n\t\t\"**/.project\": true,\n\t\t\"**/.settings\": true,\n\t\t\"**/.factorypath\": true\n"
},
{
"path": "README.md",
"chars": 384,
"preview": "# Vibration\n\n[](https://travis-ci"
},
{
"path": "vibration/.gitignore",
"chars": 596,
"preview": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.build/\n.buildlog/\n.history\n.svn/\n.swiftpm/\nmigrate_working_d"
},
{
"path": "vibration/.metadata",
"chars": 1117,
"preview": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrade"
},
{
"path": "vibration/CHANGELOG.md",
"chars": 3690,
"preview": "### 3.1.8\n\n- Fix `repeat` parameter ignored on iOS. (#145 by @zeienko-vitalii)\n\n### 3.1.7\n\n- Fix Android deprecation war"
},
{
"path": "vibration/LICENSE",
"chars": 1318,
"preview": "BSD 2-Clause License\n\nCopyright (c) 2018, Benjamin Dean\nAll rights reserved.\n\nRedistribution and use in source and binar"
},
{
"path": "vibration/README.md",
"chars": 5171,
"preview": "# Vibration\n\n[](https://travis-ci"
},
{
"path": "vibration/analysis_options.yaml",
"chars": 154,
"preview": "include: package:flutter_lints/flutter.yaml\n\n# Additional information about this file can be found at\n# https://dart.dev"
},
{
"path": "vibration/android/.gitignore",
"chars": 102,
"preview": "*.iml\n.gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\n.cxx\n"
},
{
"path": "vibration/android/build.gradle",
"chars": 1158,
"preview": "group = \"com.benjaminabel.vibration\"\nversion = \"1.0\"\n\nbuildscript {\n repositories {\n google()\n mavenCen"
},
{
"path": "vibration/android/settings.gradle",
"chars": 31,
"preview": "rootProject.name = 'vibration'\n"
},
{
"path": "vibration/android/src/main/AndroidManifest.xml",
"chars": 189,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"com.benjaminabel.vibration\">\n\n <use"
},
{
"path": "vibration/android/src/main/java/com/benjaminabel/vibration/Vibration.java",
"chars": 3614,
"preview": "package com.benjaminabel.vibration;\n\nimport android.os.Build;\nimport android.os.VibrationEffect;\nimport android.os.Vibra"
},
{
"path": "vibration/android/src/main/java/com/benjaminabel/vibration/VibrationMethodChannelHandler.java",
"chars": 2240,
"preview": "package com.benjaminabel.vibration;\n\nimport android.os.Build;\nimport androidx.annotation.NonNull;\n\nimport java.util.List"
},
{
"path": "vibration/android/src/main/java/com/benjaminabel/vibration/VibrationPlugin.java",
"chars": 2272,
"preview": "package com.benjaminabel.vibration;\n\nimport android.content.Context;\nimport android.os.Vibrator;\nimport android.os.Build"
},
{
"path": "vibration/example/.gitignore",
"chars": 709,
"preview": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.build/\n.buildlog/\n.history\n.svn/\n.swiftpm/\nmigrate_working_d"
},
{
"path": "vibration/example/.metadata",
"chars": 1114,
"preview": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrade"
},
{
"path": "vibration/example/README.md",
"chars": 550,
"preview": "# example\n\nA new Flutter project.\n\n## Getting Started\n\nThis project is a starting point for a Flutter application.\n\nA fe"
},
{
"path": "vibration/example/analysis_options.yaml",
"chars": 1420,
"preview": "# This file configures the analyzer, which statically analyzes Dart code to\n# check for errors, warnings, and lints.\n#\n#"
},
{
"path": "vibration/example/android/.gitignore",
"chars": 247,
"preview": "gradle-wrapper.jar\n/.gradle\n/captures/\n/gradlew\n/gradlew.bat\n/local.properties\nGeneratedPluginRegistrant.java\n\n# Remembe"
},
{
"path": "vibration/example/android/app/build.gradle",
"chars": 1389,
"preview": "plugins {\n id \"com.android.application\"\n id \"kotlin-android\"\n // The Flutter Gradle Plugin must be applied afte"
},
{
"path": "vibration/example/android/app/src/debug/AndroidManifest.xml",
"chars": 378,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <!-- The INTERNET permission is required for d"
},
{
"path": "vibration/example/android/app/src/main/AndroidManifest.xml",
"chars": 2205,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <application\n android:label=\"vibration_"
},
{
"path": "vibration/example/android/app/src/main/java/com/example/example/MainActivity.java",
"chars": 153,
"preview": "package com.benjaminabel.vibration_example;\n\nimport io.flutter.embedding.android.FlutterActivity;\n\npublic class MainActi"
},
{
"path": "vibration/example/android/app/src/main/res/drawable/launch_background.xml",
"chars": 434,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmln"
},
{
"path": "vibration/example/android/app/src/main/res/drawable-v21/launch_background.xml",
"chars": 438,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmln"
},
{
"path": "vibration/example/android/app/src/main/res/values/styles.xml",
"chars": 996,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <!-- Theme applied to the Android Window while the process is sta"
},
{
"path": "vibration/example/android/app/src/main/res/values-night/styles.xml",
"chars": 995,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <!-- Theme applied to the Android Window while the process is sta"
},
{
"path": "vibration/example/android/app/src/profile/AndroidManifest.xml",
"chars": 378,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <!-- The INTERNET permission is required for d"
},
{
"path": "vibration/example/android/build.gradle",
"chars": 322,
"preview": "allprojects {\n repositories {\n google()\n mavenCentral()\n }\n}\n\nrootProject.buildDir = \"../build\"\nsubp"
},
{
"path": "vibration/example/android/gradle/wrapper/gradle-wrapper.properties",
"chars": 201,
"preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dist"
},
{
"path": "vibration/example/android/gradle.properties",
"chars": 135,
"preview": "org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError\nandroid.useAndroidX=true\nandroid.enabl"
},
{
"path": "vibration/example/android/settings.gradle",
"chars": 727,
"preview": "pluginManagement {\n def flutterSdkPath = {\n def properties = new Properties()\n file(\"local.properties\")"
},
{
"path": "vibration/example/ios/.gitignore",
"chars": 569,
"preview": "**/dgph\n*.mode1v3\n*.mode2v3\n*.moved-aside\n*.pbxuser\n*.perspectivev3\n**/*sync/\n.sconsign.dblite\n.tags*\n**/.vagrant/\n**/De"
},
{
"path": "vibration/example/ios/Flutter/AppFrameworkInfo.plist",
"chars": 774,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "vibration/example/ios/Flutter/Debug.xcconfig",
"chars": 107,
"preview": "#include? \"Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"\n#include \"Generated.xcconfig\"\n"
},
{
"path": "vibration/example/ios/Flutter/Flutter.podspec",
"chars": 790,
"preview": "#\n# This podspec is NOT to be published. It is only used as a local source!\n# This is a generated file; do not edit or c"
},
{
"path": "vibration/example/ios/Flutter/Release.xcconfig",
"chars": 109,
"preview": "#include? \"Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"\n#include \"Generated.xcconfig\"\n"
},
{
"path": "vibration/example/ios/Runner/AppDelegate.swift",
"chars": 539,
"preview": "import Flutter\nimport UIKit\n\n@main\n@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {\n overri"
},
{
"path": "vibration/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json",
"chars": 2519,
"preview": "{\n \"images\" : [\n {\n \"size\" : \"20x20\",\n \"idiom\" : \"iphone\",\n \"filename\" : \"Icon-App-20x20@2x.png\",\n "
},
{
"path": "vibration/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json",
"chars": 391,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"LaunchImage.png\",\n \"scale\" : \"1x\"\n },\n "
},
{
"path": "vibration/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md",
"chars": 336,
"preview": "# Launch Screen Assets\n\nYou can customize the launch screen with your own desired assets by replacing the image files in"
},
{
"path": "vibration/example/ios/Runner/Base.lproj/LaunchScreen.storyboard",
"chars": 2377,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "vibration/example/ios/Runner/Base.lproj/Main.storyboard",
"chars": 1605,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "vibration/example/ios/Runner/Info.plist",
"chars": 2206,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "vibration/example/ios/Runner/Runner-Bridging-Header.h",
"chars": 38,
"preview": "#import \"GeneratedPluginRegistrant.h\"\n"
},
{
"path": "vibration/example/ios/Runner.xcodeproj/project.pbxproj",
"chars": 25524,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 54;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "vibration/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 135,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:\">\n </FileRef"
},
{
"path": "vibration/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
"chars": 238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "vibration/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
"chars": 226,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "vibration/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
"chars": 4717,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"1510\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "vibration/example/ios/Runner.xcworkspace/contents.xcworkspacedata",
"chars": 152,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:Runner.xcodepr"
},
{
"path": "vibration/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
"chars": 238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "vibration/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
"chars": 226,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "vibration/example/ios/RunnerTests/RunnerTests.swift",
"chars": 285,
"preview": "import Flutter\nimport UIKit\nimport XCTest\n\nclass RunnerTests: XCTestCase {\n\n func testExample() {\n // If you add cod"
},
{
"path": "vibration/example/lib/main.dart",
"chars": 14945,
"preview": "import 'package:flutter/material.dart';\nimport 'package:vibration/vibration.dart';\nimport 'package:vibration/vibration_p"
},
{
"path": "vibration/example/pubspec.yaml",
"chars": 3891,
"preview": "name: vibration_example\ndescription: Demonstrates how to use the vibration plugin.\n# The following line prevents the pac"
},
{
"path": "vibration/ios/.gitignore",
"chars": 438,
"preview": ".idea/\n.vagrant/\n.sconsign.dblite\n.svn/\n\n.DS_Store\n*.swp\nprofile\n\nDerivedData/\nbuild/\nGeneratedPluginRegistrant.h\nGenera"
},
{
"path": "vibration/ios/vibration/Package.swift",
"chars": 561,
"preview": "// swift-tools-version: 5.9\n// The swift-tools-version declares the minimum version of Swift required to build this pack"
},
{
"path": "vibration/ios/vibration/Sources/vibration/Resources/PrivacyInfo.xcprivacy",
"chars": 373,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "vibration/ios/vibration/Sources/vibration/VibrationPlugin.swift",
"chars": 11724,
"preview": "import AudioToolbox\nimport CoreHaptics\nimport Flutter\nimport UIKit\n\npublic class VibrationPlugin: NSObject, FlutterPlugi"
},
{
"path": "vibration/ios/vibration.podspec",
"chars": 1140,
"preview": "#\n# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.\n# Run `pod lib lint vibration.pod"
},
{
"path": "vibration/lib/vibration.dart",
"chars": 3377,
"preview": "import 'dart:async';\n\nimport 'package:vibration/vibration_presets.dart';\nimport 'package:vibration_platform_interface/vi"
},
{
"path": "vibration/lib/vibration_presets.dart",
"chars": 3381,
"preview": "/// Configuration for a vibration preset.\nclass VibrationPresetConfig {\n /// The pattern of the vibration in millisecon"
},
{
"path": "vibration/pubspec.yaml",
"chars": 2505,
"preview": "name: vibration\ndescription: A plugin for handling Vibration API on iOS, Android, web and OpenHarmony.\nversion: 3.1.8\nho"
},
{
"path": "vibration/test/vibration_test.dart",
"chars": 3731,
"preview": "import 'package:flutter/services.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:vibration/vibra"
},
{
"path": "vibration.iml",
"chars": 947,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "vibration_ohos/.gitignore",
"chars": 621,
"preview": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\nmigrate_working_dir/\n\n# IntelliJ re"
},
{
"path": "vibration_ohos/CHANGELOG.md",
"chars": 277,
"preview": "## 0.0.4\n\n* Bump package `device_info_plus_ohos` to \">=0.0.7 <1.0.0\"\n* Bump package `vibration_platform_interface` to \"0"
},
{
"path": "vibration_ohos/LICENSE",
"chars": 1318,
"preview": "BSD 2-Clause License\n\nCopyright (c) 2018, Benjamin Dean\nAll rights reserved.\n\nRedistribution and use in source and binar"
},
{
"path": "vibration_ohos/README.md",
"chars": 723,
"preview": "# vibration_ohos\n\nThe OpenHarmony implementation of [`vibration`][1].\n\n[`vibration`][1] 在 OpenHarmony 平台的实现。\n\n\nAdd the f"
},
{
"path": "vibration_ohos/analysis_options.yaml",
"chars": 154,
"preview": "include: package:flutter_lints/flutter.yaml\n\n# Additional information about this file can be found at\n# https://dart.dev"
},
{
"path": "vibration_ohos/example/.gitignore",
"chars": 723,
"preview": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\nmigrate_working_dir/\n\n# IntelliJ re"
},
{
"path": "vibration_ohos/example/README.md",
"chars": 593,
"preview": "# vibration_ohos_example\n\nDemonstrates how to use the vibration_ohos plugin.\n\n## Getting Started\n\nThis project is a star"
},
{
"path": "vibration_ohos/example/analysis_options.yaml",
"chars": 1453,
"preview": "# This file configures the analyzer, which statically analyzes Dart code to\n# check for errors, warnings, and lints.\n#\n#"
},
{
"path": "vibration_ohos/example/assets/haptic_file.json",
"chars": 1008,
"preview": "{\n \"MetaData\": {\n \"Create\": \"2023-01-09\",\n \"Description\": \"a haptic case\",\n \"Version\": 1.0,\n "
},
{
"path": "vibration_ohos/example/lib/main.dart",
"chars": 4376,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/services.dart' show rootBundle;\nimport 'package:flutter_"
},
{
"path": "vibration_ohos/example/ohos/.gitignore",
"chars": 362,
"preview": "/node_modules\n/oh_modules\n/local.properties\n/.idea\n**/build\n/.hvigor\n.cxx\n/.clangd\n/.clang-format\n/.clang-tidy\n**/.test\n"
},
{
"path": "vibration_ohos/example/ohos/AppScope/app.json5",
"chars": 204,
"preview": "{\n \"app\": {\n \"bundleName\": \"com.example.example\",\n \"vendor\": \"example\",\n \"versionCode\": 1000000,\n \"versionN"
},
{
"path": "vibration_ohos/example/ohos/AppScope/resources/base/element/string.json",
"chars": 85,
"preview": "{\n \"string\": [\n {\n \"name\": \"app_name\",\n \"value\": \"example\"\n }\n ]\n}\n"
},
{
"path": "vibration_ohos/example/ohos/build-profile.json5",
"chars": 491,
"preview": "{\n \"app\": {\n \"signingConfigs\": [],\n \"products\": [\n {\n \"name\": \"default\",\n \"signingConfig\": \"de"
},
{
"path": "vibration_ohos/example/ohos/entry/.gitignore",
"chars": 89,
"preview": "\n/node_modules\n/oh_modules\n/.preview\n/build\n/.cxx\n/.test\n/har\n/libs\noh-package-lock.json5"
},
{
"path": "vibration_ohos/example/ohos/entry/build-profile.json5",
"chars": 807,
"preview": "/*\n* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.\n* Licensed under the Apache License, Ver"
},
{
"path": "vibration_ohos/example/ohos/entry/hvigorfile.ts",
"chars": 788,
"preview": "/*\n* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.\n* Licensed under the Apache License, Ver"
},
{
"path": "vibration_ohos/example/ohos/entry/oh-package.json5",
"chars": 299,
"preview": "{\n \"name\": \"entry\",\n \"version\": \"1.0.0\",\n \"description\": \"Please describe the basic information.\",\n \"main\": \"\",\n \"a"
},
{
"path": "vibration_ohos/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets",
"chars": 1007,
"preview": "/*\n* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.\n* Licensed under the Apache License, Ver"
},
{
"path": "vibration_ohos/example/ohos/entry/src/main/ets/pages/Index.ets",
"chars": 1145,
"preview": "/*\n* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.\n* Licensed under the Apache License, Ver"
},
{
"path": "vibration_ohos/example/ohos/entry/src/main/ets/plugins/GeneratedPluginRegistrant.ets",
"chars": 808,
"preview": "import { FlutterEngine, Log } from '@ohos/flutter_ohos';\nimport DeviceInfoPlusPlugin from 'device_info_plus_ohos';\nimpor"
},
{
"path": "vibration_ohos/example/ohos/entry/src/main/module.json5",
"chars": 1636,
"preview": "/*\n* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.\n* Licensed under the Apache License, Ver"
},
{
"path": "vibration_ohos/example/ohos/entry/src/main/resources/base/element/color.json",
"chars": 98,
"preview": "{\n \"color\": [\n {\n \"name\": \"start_window_background\",\n \"value\": \"#FFFFFF\"\n }\n ]\n}"
},
{
"path": "vibration_ohos/example/ohos/entry/src/main/resources/base/element/string.json",
"chars": 249,
"preview": "{\n \"string\": [\n {\n \"name\": \"module_desc\",\n \"value\": \"module description\"\n },\n {\n \"name\": \"Entry"
},
{
"path": "vibration_ohos/example/ohos/entry/src/main/resources/base/profile/main_pages.json",
"chars": 37,
"preview": "{\n \"src\": [\n \"pages/Index\"\n ]\n}\n"
},
{
"path": "vibration_ohos/example/ohos/entry/src/main/resources/en_US/element/string.json",
"chars": 249,
"preview": "{\n \"string\": [\n {\n \"name\": \"module_desc\",\n \"value\": \"module description\"\n },\n {\n \"name\": \"Entry"
},
{
"path": "vibration_ohos/example/ohos/entry/src/main/resources/zh_CN/element/string.json",
"chars": 235,
"preview": "{\n \"string\": [\n {\n \"name\": \"module_desc\",\n \"value\": \"模块描述\"\n },\n {\n \"name\": \"EntryAbility_desc\","
},
{
"path": "vibration_ohos/example/ohos/hvigor/hvigor-config.json5",
"chars": 724,
"preview": "/*\n* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.\n* Licensed under the Apache License, Ver"
},
{
"path": "vibration_ohos/example/ohos/hvigor/hvigor-wrapper.js",
"chars": 129384,
"preview": "\"use strict\";var e=require(\"path\"),t=require(\"os\"),n=require(\"fs\"),r=require(\"child_process\"),u=require(\"process\"),o=req"
},
{
"path": "vibration_ohos/example/ohos/hvigorfile.ts",
"chars": 861,
"preview": "/*\n* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.\n* Licensed under the Apache License, Ver"
},
{
"path": "vibration_ohos/example/ohos/hvigorw",
"chars": 2041,
"preview": "#!/bin/bash\n\n# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.\n# Licensed under the Apache Li"
},
{
"path": "vibration_ohos/example/ohos/hvigorw.bat",
"chars": 1545,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
},
{
"path": "vibration_ohos/example/ohos/oh-package.json5",
"chars": 356,
"preview": "{\n \"name\": \"example\",\n \"version\": \"1.0.0\",\n \"description\": \"Please describe the basic information.\",\n \"main\": \"\",\n "
},
{
"path": "vibration_ohos/example/pubspec.yaml",
"chars": 3519,
"preview": "name: vibration_example\ndescription: Demonstrates how to use the vibration_ohos plugin.\n# The following line prevents th"
},
{
"path": "vibration_ohos/lib/vibration_ohos.dart",
"chars": 6533,
"preview": "library vibration_ohos;\n\nimport 'dart:convert';\n\nimport 'package:device_info_plus_ohos/device_info_plus_ohos.dart';\nimpo"
},
{
"path": "vibration_ohos/ohos/.gitignore",
"chars": 104,
"preview": "/node_modules\n/oh_modules\n/.preview\n/.idea\n/build\n/.cxx\n/.test\n/BuildProfile.ets\n/oh-package-lock.json5\n"
},
{
"path": "vibration_ohos/ohos/build-profile.json5",
"chars": 109,
"preview": "{\n \"apiType\": \"stageMode\",\n \"buildOption\": {\n },\n \"targets\": [\n {\n \"name\": \"default\"\n }\n ]\n}\n"
},
{
"path": "vibration_ohos/ohos/hvigorfile.ts",
"chars": 159,
"preview": "// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.\nexport { harT"
},
{
"path": "vibration_ohos/ohos/index.ets",
"chars": 744,
"preview": "/*\n* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.\n* Licensed under the Apache License, Ver"
},
{
"path": "vibration_ohos/ohos/oh-package.json5",
"chars": 254,
"preview": "{\n \"name\": \"vibration_ohos\",\n \"version\": \"1.0.0\",\n \"description\": \"Please describe the basic information.\",\n \"main\":"
},
{
"path": "vibration_ohos/ohos/src/main/ets/components/plugin/VibrationOhosPlugin.ets",
"chars": 3829,
"preview": "import {\n FlutterPlugin,\n FlutterPluginBinding,\n MethodCall,\n MethodCallHandler,\n MethodChannel,\n MethodResult,\n} "
},
{
"path": "vibration_ohos/ohos/src/main/module.json5",
"chars": 130,
"preview": "{\n \"module\": {\n \"name\": \"vibration_ohos\",\n \"type\": \"har\",\n \"deviceTypes\": [\n \"default\",\n \"tablet\"\n "
},
{
"path": "vibration_ohos/pubspec.yaml",
"chars": 2561,
"preview": "name: vibration_ohos\ndescription: The OpenHarmony implementation of vibration.\nversion: 0.0.4\nhomepage: https://github.c"
},
{
"path": "vibration_platform_interface/.gitignore",
"chars": 567,
"preview": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\nmigrate_working_dir/\n\n# IntelliJ re"
},
{
"path": "vibration_platform_interface/CHANGELOG.md",
"chars": 287,
"preview": "## 0.1.2\n\n- Bump package `device_info_plus` to \">=9.0.2 <14.0.0\"\n\n## 0.1.1\n\n- Bump package `device_info_plus` to \">=9.0."
},
{
"path": "vibration_platform_interface/LICENSE",
"chars": 1318,
"preview": "BSD 2-Clause License\n\nCopyright (c) 2018, Benjamin Dean\nAll rights reserved.\n\nRedistribution and use in source and binar"
},
{
"path": "vibration_platform_interface/README.md",
"chars": 397,
"preview": "# vibration_platform_interface\n\n[](https://"
},
{
"path": "vibration_platform_interface/lib/src/method_channel_vibration.dart",
"chars": 3886,
"preview": "import 'dart:io';\n\nimport 'package:device_info_plus/device_info_plus.dart';\nimport 'package:flutter/services.dart';\nimpo"
},
{
"path": "vibration_platform_interface/lib/vibration_platform_interface.dart",
"chars": 3536,
"preview": "library vibration_platform_interface;\n\nimport 'package:plugin_platform_interface/plugin_platform_interface.dart';\n\nimpor"
},
{
"path": "vibration_platform_interface/pubspec.yaml",
"chars": 1692,
"preview": "name: vibration_platform_interface\ndescription: A common platform interface for the vibration plugin.\nversion: 0.1.2\nhom"
},
{
"path": "vibration_web/.flutter-plugins",
"chars": 144,
"preview": "# This is a generated file; do not edit or check into version control.\nvibration_web=/Users/romanhome/Documents/GitHub/v"
},
{
"path": "vibration_web/.gitignore",
"chars": 47,
"preview": ".DS_Store\n.dart_tool/\n\n.packages\n.pub/\n\nbuild/\n"
},
{
"path": "vibration_web/.metadata",
"chars": 306,
"preview": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrade"
},
{
"path": "vibration_web/CHANGELOG.md",
"chars": 617,
"preview": "## 1.6.8\n\n- Adds support for `web: ^1.0.0`\n\n## 1.6.7\n\n- Migrate from dart:js to web package for Wasm support (#102 by [s"
},
{
"path": "vibration_web/LICENSE",
"chars": 1318,
"preview": "BSD 2-Clause License\n\nCopyright (c) 2018, Benjamin Dean\nAll rights reserved.\n\nRedistribution and use in source and binar"
},
{
"path": "vibration_web/README.md",
"chars": 187,
"preview": "# Vibration\n\nThe web implementation of [`vibration`][1].\n\n## Usage\n\nOnce you have `vibration` in `pubspec.yaml` you shou"
},
{
"path": "vibration_web/ios/.gitignore",
"chars": 360,
"preview": ".idea/\n.vagrant/\n.sconsign.dblite\n.svn/\n\n.DS_Store\n*.swp\nprofile\n\nDerivedData/\nbuild/\nGeneratedPluginRegistrant.h\nGenera"
},
{
"path": "vibration_web/ios/vibration_web.podspec",
"chars": 850,
"preview": "#\n# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html\n#\nPod::Spec.new do |s|\n s.name "
},
{
"path": "vibration_web/lib/vibration_web.dart",
"chars": 2095,
"preview": "import 'dart:async';\nimport 'dart:js_interop';\nimport 'dart:js_interop_unsafe';\n\nimport 'package:flutter/services.dart';"
},
{
"path": "vibration_web/pubspec.yaml",
"chars": 496,
"preview": "name: vibration_web\ndescription: A plugin for handling Vibration API on the Web\nversion: 1.6.8\nhomepage: https://github."
},
{
"path": "vibration_web/vibration_web.iml",
"chars": 949,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
}
]
About this extraction
This page contains the full source code of the benjamindean/flutter_vibration GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 131 files (311.2 KB), approximately 100.3k tokens, and a symbol index with 274 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.