123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- 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}"),
- ],
- ),
- ),
-
- ],
- ),
- );
- }
- }
|