Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds different vibration when cash recognitions is successfull or fai…
…lure
- Loading branch information
1 parent
978c70c
commit c7c8750
Showing
6 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:flutter_vibrate/flutter_vibrate.dart'; | ||
|
||
class HapticFeedback{ | ||
static bool canVibrate; | ||
|
||
/// makes sure whether vibration is supported or not | ||
/// this function runs only once preventing method call from being | ||
/// called again and again. | ||
static Future<void> ensureInitialized() async{ | ||
canVibrate = await Vibrate.canVibrate; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters