diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_app.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_app.png index b00aa5d..d8e734f 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_app.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_app.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_app.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_app.png index b44fb4c..c777f24 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_app.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_app.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_app.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_app.png index e5fb779..923f212 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_app.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_app.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_app.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_app.png index 79b3322..976d9c4 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_app.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_app.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_app.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_app.png index d37e5d4..48ceacf 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_app.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_app.png differ diff --git a/assets/registration_logo.png b/assets/registration_logo.png index dcece20..29eda7a 100644 Binary files a/assets/registration_logo.png and b/assets/registration_logo.png differ diff --git a/assets/splash.png b/assets/splash.png index 929bcb5..3b9611d 100644 Binary files a/assets/splash.png and b/assets/splash.png differ diff --git a/lib/activate_token.dart b/lib/activate_token.dart index b357a61..7a34687 100644 --- a/lib/activate_token.dart +++ b/lib/activate_token.dart @@ -15,7 +15,7 @@ class _RegistrationScreenState extends BaseState { AppBar _getAppBar() { return new AppBar(title: new Text("Регистрация магазина"), - backgroundColor: const Color(primaryColor), actions: [ + backgroundColor: primaryColor, actions: [ new IconButton( icon: new Icon(Icons.help_outline), tooltip: 'Air it', @@ -75,8 +75,7 @@ class _RegistrationScreenState extends BaseState { Decoration _getDecoraionForInputField() { return new BoxDecoration(color: Colors.white, - border: new Border.all( - color: const Color(0xffcfd8dc), width: 1.0,), + border: new Border.all(color: const Color(0xffcfd8dc), width: 1.0), borderRadius: new BorderRadius.all(new Radius.circular(4.0))); } diff --git a/lib/main.dart b/lib/main.dart index 1427bcd..ff905c2 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -22,7 +22,8 @@ const String logout_png = 'assets/logout.png'; const String activate_token_bg_png = 'assets/activate_token_message_background.png'; // Colors -const int primaryColor = 0xffeb0004; +const Color primaryColor = const Color(0xffeb0004); +const Color disabledColor = const Color(0xffbfbfbf); // HttpClient final httpClient = createHttpClient(); diff --git a/lib/registration.dart b/lib/registration.dart index daa43d0..87dacf0 100644 --- a/lib/registration.dart +++ b/lib/registration.dart @@ -19,7 +19,7 @@ class _RegistrationScreenState extends BaseState { AppBar _getAppBar() { return new AppBar(title: new Text("Регистрация"), - backgroundColor: const Color(primaryColor), actions: [ + backgroundColor: primaryColor, actions: [ new IconButton( icon: new Icon(Icons.help_outline), tooltip: 'Air it', @@ -29,32 +29,31 @@ class _RegistrationScreenState extends BaseState { } Widget _getScreen(BuildContext context) { - return new Center(child: new Column(children: [ - _getLogo(), - _getDecoratedInputField(), - _getButton(context) - ])); + return new Container(height: 332.0, + child: new ListView(reverse: true, children: [ + new Center(child: new Column(children: [ + _getLogo(), + _getDecoratedInputField(), + _getButton(context)])) + ].reversed.toList())); } - Container _getLogo() { - return new Container(height: 192.0, + Widget _getLogo() { + return new Container(height: 192.0, width: 156.0, child: new Image.asset(logo_png, height: 24.0, width: 156.0)); } - Container _getDecoratedInputField() { - return new Container( - padding: new EdgeInsets.only(left: 28.0, right: 28.0), - child: new Container(height: 48.0, - padding: new EdgeInsets.only(left: 16.0, right: 16.0), + Widget _getDecoratedInputField() { + return new Container(margin: 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), decoration: _getDecoraionForInputField(), - child: _getInputField())) ; + child: _getInputField()); } - TextField _getInputField() { - return new TextField(decoration: new InputDecoration(hintText: merchantIDHint, - hideDivider: true, - hintStyle: new TextStyle(color: const Color(0xffa5a5a5), - fontSize: 16.0)), onChanged: (text) => _handleUserInput(text)); + Widget _getInputField() { + return new TextField(decoration: new InputDecoration.collapsed(hintText: merchantIDHint, + hintStyle: new TextStyle(color: const Color(0xffa5a5a5), fontSize: 16.0)), + onChanged: (text) => _handleUserInput(text)); } void _handleUserInput(String text) { @@ -67,23 +66,19 @@ class _RegistrationScreenState extends BaseState { Decoration _getDecoraionForInputField() { return new BoxDecoration(color: Colors.white, - border: new Border.all( - color: const Color(0xffcfd8dc), width: 1.0,), + border: new Border.all(color: const Color(0xffcfd8dc), width: 1.0,), borderRadius: new BorderRadius.all(new Radius.circular(4.0))); } - Container _getButton(BuildContext context) { - return new Container(padding: new EdgeInsets.only(top: 36.0), - child: new Container(height: 64.0, padding: new EdgeInsets.all(8.0), + Widget _getButton(BuildContext context) { + 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 RaisedButton(child: new Text('ЗАРЕГИСТРИРОВАТЬ', style: new TextStyle(color: Colors.white)), onPressed: _isValidMerchantID() ? () => _registerShop(context, _merchantID) : null, - disabledColor: const Color(0xffbfbfbf), - color: primaryColor))); + color: primaryColor)); } - _isValidMerchantID() { - print(_merchantID.length); + bool _isValidMerchantID() { return _merchantID.length == 5; } @@ -122,6 +117,5 @@ class _RegistrationScreenState extends BaseState { }).catchError((error) { print(error.toString()); }); - } } \ No newline at end of file