Skip to content

Commit 4f9809a

Browse files
committed
merging PR and fixing lint errors
1 parent 1daeac4 commit 4f9809a

File tree

4 files changed

+54
-14
lines changed

4 files changed

+54
-14
lines changed

.github/workflows/main.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-18.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Setup Flutter
15+
uses: subosito/flutter-action@v1
16+
with:
17+
channel: 'dev'
18+
19+
- name: Install
20+
run: |
21+
flutter config --enable-web
22+
flutter pub get
23+
- name: Build
24+
run: cd example && flutter build web
25+
26+
- name: Deploy
27+
uses: peaceiris/actions-gh-pages@v3
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
publish_dir: ./example/build/web

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.1.0
2+
3+
* Merging changes and fixing lint errors
4+
15
## 1.0.0
26

37
* Changing Name

lib/flutter_vibrate.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ enum FeedbackType {
1414
}
1515

1616
class Vibrate {
17-
static const MethodChannel _channel = const MethodChannel('vibrate');
17+
static const MethodChannel _channel = MethodChannel('vibrate');
1818
static const Duration _DEFAULT_VIBRATION_DURATION =
19-
const Duration(milliseconds: 500);
19+
Duration(milliseconds: 500);
2020

2121
/// Vibrate for 500ms on Android, and for the default time on iOS (about 500ms as well)
2222
static Future vibrate() => _channel.invokeMethod(
23-
'vibrate', {"duration": _DEFAULT_VIBRATION_DURATION.inMilliseconds});
23+
'vibrate', {'duration': _DEFAULT_VIBRATION_DURATION.inMilliseconds});
2424

2525
/// Whether the device can actually vibrate or not
2626
static Future<bool> get canVibrate async {
@@ -63,13 +63,13 @@ class Vibrate {
6363
/// and once after the last pause
6464
6565
static Future vibrateWithPauses(Iterable<Duration> pauses) async {
66-
for (Duration d in pauses) {
67-
vibrate();
66+
for (final Duration d in pauses) {
67+
await vibrate();
6868
//Because the native vibration is not awaited, we need to wait for
6969
//the vibration to end before launching another one
70-
await new Future.delayed(_DEFAULT_VIBRATION_DURATION);
71-
await new Future.delayed(d);
70+
await Future.delayed(_DEFAULT_VIBRATION_DURATION);
71+
await Future.delayed(d);
7272
}
73-
vibrate();
73+
await vibrate();
7474
}
7575
}

pubspec.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
name: flutter_vibrate
22
description: A Haptic Feedback plugin.
3-
version: 1.0.0
3+
version: 1.1.0
44
environment:
5-
sdk: ">=2.12.0 <3.0.0"
5+
sdk: '>=2.12.0-259.8.beta <3.0.0'
6+
flutter: ^1.10.0
67
authors:
78
- Clovis Nicolas <[email protected]>
89
- Rhodes Davis Jr. <[email protected]>
910
- GiKode <[email protected]>
10-
homepage: https://github.com/rodydavis/flutter_vibrate
11+
maintainer: Rody Davis (@rodydavis)
12+
homepage: https://github.com/rodydavis/plugins
13+
repository: https://github.com/rodydavis/flutter_vibrate
1114

1215
dependencies:
1316
flutter:
1417
sdk: flutter
1518

1619
flutter:
1720
plugin:
18-
androidPackage: flutter.plugins.vibrate
19-
pluginClass: VibratePlugin
20-
21+
platforms:
22+
android:
23+
package: flutter.plugins.vibrate
24+
pluginClass: VibratePlugin
25+
ios:
26+
pluginClass: VibratePlugin

0 commit comments

Comments
 (0)