Изменил название пакета, начал работу по регистрации магазина
This commit is contained in:
54
lib/registration.dart
Normal file
54
lib/registration.dart
Normal 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))) ;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user