-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pagina di aggiunta chiavi tramite stringa
- Loading branch information
Showing
4 changed files
with
56 additions
and
45 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:nfc_app/NfcKeyManager.dart'; | ||
|
||
class HomePage extends StatefulWidget { | ||
@override | ||
_HomePageState createState() => _HomePageState(); | ||
} | ||
|
||
class _HomePageState extends State<HomePage> { | ||
|
||
NfcManager manager; | ||
TextEditingController controller; | ||
|
||
@override | ||
void initState() { | ||
super.initState(); | ||
manager = new NfcManager(); | ||
controller = new TextEditingController(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar(title: Text('Add Key')), | ||
body: Container( | ||
padding: const EdgeInsets.all(16.0), | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: <Widget>[ | ||
Container( | ||
child: Text('Add new readable key:'), | ||
), | ||
Flexible( | ||
child: TextField(controller: controller,) | ||
), | ||
Row( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: <Widget>[RaisedButton( | ||
child: Text('Login'), | ||
onPressed: () {manager.addReadableId(controller.value.text); print(controller.value.text);}, | ||
) | ||
], | ||
) | ||
], | ||
) | ||
|
||
), | ||
|
||
); | ||
} | ||
} |
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