Изменил название пакета, начал работу по регистрации магазина

This commit is contained in:
Ivan Murashov
2017-07-13 18:59:31 +03:00
parent 715c9bf3bd
commit 4a153624db
8 changed files with 73 additions and 121 deletions

54
lib/registration.dart Normal file
View File

@@ -0,0 +1,54 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'dart:async';
/// Экран регистрации магазина и кассы.
class RegistrationScreen extends StatefulWidget {
@override State createState() => new _RegistrationScreenState();
}
class _RegistrationScreenState extends State<RegistrationScreen> {
static const platform = const MethodChannel('com.dinnect.checker/scanner');
@override Widget build(BuildContext context) {
return new Scaffold(appBar: new AppBar(
title: new Text("Регистрация магазина")), body: _buildScreen());
}
/// На экране будет отображаться Column, с отцентрированными виджетами.
Widget _buildScreen() {
return new Center(child: new Column(children: _getChildren()));
}
Future<Null> startScanner() async {
try {
platform.invokeMethod('startScanner');
} on PlatformException {
}
}
void _handleSubmitted(String text) {
}
List<Widget> _getChildren() {
return<Widget>[
_getLogo(),
_getInputField("ID кассы"),
_getInputField("Номер кассы"),
];
}
Row _getLogo() {
return new Row(
// TODO: Два Image() с логотипом
);
}
Container _getInputField(String hint) {
return new Container(padding: new EdgeInsets.all(8.0),
child: new TextField(decoration: new InputDecoration(hintText: hint))) ;
}
}