Masterarbeit Richard Stern. Flutter App, sich mit einem Bluetooth-Gerät verbindet und Berührungen auf einem Sensor visualisiert.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Richard Stern a951e9518d Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago
..
.idea Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago
android Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago
example Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago
ios Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago
lib Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago
CHANGELOG.md Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago
LICENSE Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago
README.md Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago
pubspec.yaml Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago
vibrate.iml Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago
vibrate_android.iml Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 5 years ago

README.md

Vibrate

pub package

A Flutter plugin to vibrate the device. This uses all the current Haptic Feedback APIs from Apple and provides similar feedback on Android.

Usage

To use this plugin, add vibrate as a dependency in your pubspec.yaml file.

Make sure you add the following permissions to your Android Manifest

<uses-permission android:name="android.permission.VIBRATE"/>

Usage

// Import package
import 'package:vibrate/vibrate.dart';

Vibration

// Check if the device can vibrate
bool canVibrate = await Vibrate.canVibrate;

// Vibrate
// Vibration duration is a constant 500ms because
// it cannot be set to a specific duration on iOS.
Vibrate.vibrate();

// Vibrate with pauses between each vibration
final Iterable<Duration> pauses = [
    const Duration(milliseconds: 500),
    const Duration(milliseconds: 1000),
    const Duration(milliseconds: 500),
];
// vibrate - sleep 0.5s - vibrate - sleep 1s - vibrate - sleep 0.5s - vibrate
Vibrate.vibrateWithPauses(pauses);

Haptic Feedback

// Choose from any of these available methods
enum FeedbackType {
  success,
  error,
  warning,
  selection,
  impact,
  heavy,
  medium,
  light
}

var _type = FeedbackType.impact;
Vibrate.feedback(_type);

Documentation

Android

https://developer.android.com/reference/android/view/HapticFeedbackConstants

iOS

https://developer.apple.com/design/human-interface-guidelines/ios/user-interaction/feedback/