Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS

This commit is contained in:
Richard Stern
2019-06-04 16:51:24 +02:00
parent 26fcc2491c
commit a951e9518d
1340 changed files with 12844936 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
enum buttonsState{pressed,released}
+19
View File
@@ -0,0 +1,19 @@
// The base class for the different types of items the List can contain
abstract class ListItem {}
class TouchData implements ListItem {
int event;
int fingerNumber;
int x;
int y;
TouchData(this.event, this.fingerNumber, this.x, this.y);
void touchEvent(int E, int X, int Y) {
this.event = E;
this.x = X;
this.y = Y;
}
}
+26
View File
@@ -0,0 +1,26 @@
import 'dart:async';
import 'package:vibrate/vibrate.dart';
bool canVibrate = false;
void vibrate(FeedbackType feedbackType) async{
canVibrate = await Vibrate.canVibrate;
print('_vibrate');
if (canVibrate) {
print('vibrate -- type: $feedbackType');
Vibrate.feedback(feedbackType);
}
}
void vibrateDelayed(FeedbackType feedbackType, Duration duration) async{
canVibrate = await Vibrate.canVibrate;
Future.delayed(duration,()
{
print('_vibrate');
if (canVibrate) {
print('vibrate -- type: $feedbackType');
Vibrate.feedback(feedbackType);
}
});
}