Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS
This commit is contained in:
Executable
+108
@@ -0,0 +1,108 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:touch_demonstrator/model/touchData.dart';
|
||||
|
||||
class FingerPrintRow extends StatefulWidget {
|
||||
final TouchData touch;
|
||||
|
||||
FingerPrintRow(this.touch);
|
||||
|
||||
@override
|
||||
_FingerPrintRowState createState() => _FingerPrintRowState();
|
||||
}
|
||||
|
||||
class _FingerPrintRowState extends State<FingerPrintRow> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 140.0,
|
||||
margin: const EdgeInsets.symmetric(
|
||||
vertical: 16.0,
|
||||
horizontal: 24.0,
|
||||
),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: <Widget>[
|
||||
fingerPrintThumbnail,
|
||||
_buildTouchCard(),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Container buildTextFinger() => Container(
|
||||
child: Text("${widget.touch.fingerNumber}"),
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
final fingerPrintThumbnail = new Container(
|
||||
margin: new EdgeInsets.symmetric(vertical: 16.0),
|
||||
alignment: FractionalOffset.centerLeft,
|
||||
child: new Container(
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
decoration: new BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
image: new DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: new AssetImage("lib/assets/fingerPrint2.png"))),
|
||||
),
|
||||
);
|
||||
|
||||
Widget _buildTouchCard(){
|
||||
return Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Text("Finger #"),
|
||||
Text("${widget.touch.fingerNumber}"),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Text("Event"),
|
||||
Text("${widget.touch.event}"),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Text("X"),
|
||||
Text("${widget.touch.x}"),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Text("Y"),
|
||||
Text("${widget.touch.y}"),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user