Заменил иконки, картину загрузки, логотип на экране регистрации, сделал автоматический скролл экрана при вводе id кассы, чтобы поле ввода не перекрывалось клавиатурой
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 368 KiB After Width: | Height: | Size: 432 KiB |
@@ -15,7 +15,7 @@ class _RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
|||||||
|
|
||||||
AppBar _getAppBar() {
|
AppBar _getAppBar() {
|
||||||
return new AppBar(title: new Text("Регистрация магазина"),
|
return new AppBar(title: new Text("Регистрация магазина"),
|
||||||
backgroundColor: const Color(primaryColor), actions: <Widget>[
|
backgroundColor: primaryColor, actions: <Widget>[
|
||||||
new IconButton(
|
new IconButton(
|
||||||
icon: new Icon(Icons.help_outline),
|
icon: new Icon(Icons.help_outline),
|
||||||
tooltip: 'Air it',
|
tooltip: 'Air it',
|
||||||
@@ -75,8 +75,7 @@ class _RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
|||||||
|
|
||||||
Decoration _getDecoraionForInputField() {
|
Decoration _getDecoraionForInputField() {
|
||||||
return new BoxDecoration(color: Colors.white,
|
return new BoxDecoration(color: Colors.white,
|
||||||
border: new Border.all(
|
border: new Border.all(color: const Color(0xffcfd8dc), width: 1.0),
|
||||||
color: const Color(0xffcfd8dc), width: 1.0,),
|
|
||||||
borderRadius: new BorderRadius.all(new Radius.circular(4.0)));
|
borderRadius: new BorderRadius.all(new Radius.circular(4.0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ const String logout_png = 'assets/logout.png';
|
|||||||
const String activate_token_bg_png = 'assets/activate_token_message_background.png';
|
const String activate_token_bg_png = 'assets/activate_token_message_background.png';
|
||||||
|
|
||||||
// Colors
|
// Colors
|
||||||
const int primaryColor = 0xffeb0004;
|
const Color primaryColor = const Color(0xffeb0004);
|
||||||
|
const Color disabledColor = const Color(0xffbfbfbf);
|
||||||
|
|
||||||
// HttpClient
|
// HttpClient
|
||||||
final httpClient = createHttpClient();
|
final httpClient = createHttpClient();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class _RegistrationScreenState extends BaseState<RegistrationScreen> {
|
|||||||
|
|
||||||
AppBar _getAppBar() {
|
AppBar _getAppBar() {
|
||||||
return new AppBar(title: new Text("Регистрация"),
|
return new AppBar(title: new Text("Регистрация"),
|
||||||
backgroundColor: const Color(primaryColor), actions: <Widget>[
|
backgroundColor: primaryColor, actions: <Widget>[
|
||||||
new IconButton(
|
new IconButton(
|
||||||
icon: new Icon(Icons.help_outline),
|
icon: new Icon(Icons.help_outline),
|
||||||
tooltip: 'Air it',
|
tooltip: 'Air it',
|
||||||
@@ -29,32 +29,31 @@ class _RegistrationScreenState extends BaseState<RegistrationScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _getScreen(BuildContext context) {
|
Widget _getScreen(BuildContext context) {
|
||||||
return new Center(child: new Column(children: <Widget>[
|
return new Container(height: 332.0,
|
||||||
_getLogo(),
|
child: new ListView(reverse: true, children: <Widget>[
|
||||||
_getDecoratedInputField(),
|
new Center(child: new Column(children: <Widget>[
|
||||||
_getButton(context)
|
_getLogo(),
|
||||||
]));
|
_getDecoratedInputField(),
|
||||||
|
_getButton(context)]))
|
||||||
|
].reversed.toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Container _getLogo() {
|
Widget _getLogo() {
|
||||||
return new Container(height: 192.0,
|
return new Container(height: 192.0, width: 156.0,
|
||||||
child: new Image.asset(logo_png, height: 24.0, width: 156.0));
|
child: new Image.asset(logo_png, height: 24.0, width: 156.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
Container _getDecoratedInputField() {
|
Widget _getDecoratedInputField() {
|
||||||
return new Container(
|
return new Container(margin: new EdgeInsets.only(left: 28.0, right: 28.0),
|
||||||
padding: new EdgeInsets.only(left: 28.0, right: 28.0),
|
padding: new EdgeInsets.only(top: 12.0, bottom: 12.0, left: 16.0, right: 16.0),
|
||||||
child: new Container(height: 48.0,
|
|
||||||
padding: new EdgeInsets.only(left: 16.0, right: 16.0),
|
|
||||||
decoration: _getDecoraionForInputField(),
|
decoration: _getDecoraionForInputField(),
|
||||||
child: _getInputField())) ;
|
child: _getInputField());
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField _getInputField() {
|
Widget _getInputField() {
|
||||||
return new TextField(decoration: new InputDecoration(hintText: merchantIDHint,
|
return new TextField(decoration: new InputDecoration.collapsed(hintText: merchantIDHint,
|
||||||
hideDivider: true,
|
hintStyle: new TextStyle(color: const Color(0xffa5a5a5), fontSize: 16.0)),
|
||||||
hintStyle: new TextStyle(color: const Color(0xffa5a5a5),
|
onChanged: (text) => _handleUserInput(text));
|
||||||
fontSize: 16.0)), onChanged: (text) => _handleUserInput(text));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _handleUserInput(String text) {
|
void _handleUserInput(String text) {
|
||||||
@@ -67,23 +66,19 @@ class _RegistrationScreenState extends BaseState<RegistrationScreen> {
|
|||||||
|
|
||||||
Decoration _getDecoraionForInputField() {
|
Decoration _getDecoraionForInputField() {
|
||||||
return new BoxDecoration(color: Colors.white,
|
return new BoxDecoration(color: Colors.white,
|
||||||
border: new Border.all(
|
border: new Border.all(color: const Color(0xffcfd8dc), width: 1.0,),
|
||||||
color: const Color(0xffcfd8dc), width: 1.0,),
|
|
||||||
borderRadius: new BorderRadius.all(new Radius.circular(4.0)));
|
borderRadius: new BorderRadius.all(new Radius.circular(4.0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Container _getButton(BuildContext context) {
|
Widget _getButton(BuildContext context) {
|
||||||
return new Container(padding: new EdgeInsets.only(top: 36.0),
|
return new Container(margin: new EdgeInsets.only(top: 36.0), height: 42.0, padding: new EdgeInsets.only(left: 40.0, right: 40.0),
|
||||||
child: new Container(height: 64.0, padding: new EdgeInsets.all(8.0),
|
|
||||||
child: new RaisedButton(child: new Text('ЗАРЕГИСТРИРОВАТЬ',
|
child: new RaisedButton(child: new Text('ЗАРЕГИСТРИРОВАТЬ',
|
||||||
style: new TextStyle(color: Colors.white)),
|
style: new TextStyle(color: Colors.white)),
|
||||||
onPressed: _isValidMerchantID() ? () => _registerShop(context, _merchantID) : null,
|
onPressed: _isValidMerchantID() ? () => _registerShop(context, _merchantID) : null,
|
||||||
disabledColor: const Color(0xffbfbfbf),
|
color: primaryColor));
|
||||||
color: primaryColor)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_isValidMerchantID() {
|
bool _isValidMerchantID() {
|
||||||
print(_merchantID.length);
|
|
||||||
return _merchantID.length == 5;
|
return _merchantID.length == 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,6 +117,5 @@ class _RegistrationScreenState extends BaseState<RegistrationScreen> {
|
|||||||
}).catchError((error) {
|
}).catchError((error) {
|
||||||
print(error.toString());
|
print(error.toString());
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||