Новые ассеты, диалог выглядит в стиле приложения

This commit is contained in:
Ivan Murashov
2017-07-28 12:47:25 +03:00
parent 344eda9040
commit ddd9caeba1
10 changed files with 130 additions and 33 deletions

View File

@@ -11,8 +11,6 @@ abstract class BaseState<T> extends State<T> {
String error = null;
String textFieldValue = '';
TextEditingController controller = new TextEditingController();
@override Widget build(BuildContext context) {
return new Scaffold(appBar: getAppBar(context), body: getBody(context));
}
@@ -108,7 +106,6 @@ abstract class BaseState<T> extends State<T> {
return new TextField(keyboardType: TextInputType.number,
decoration: new InputDecoration.collapsed(hintText: getHint(),
hintStyle: new TextStyle(color: greyTextColor, fontSize: 16.0)),
controller: controller,
onChanged: (text) => handleUserInput(text));
}

View File

@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
// Serious constants
const String url = 'http://pos-api-autoclub.dinect.com/20130701/';
const String appToken = 'bdea0f3ba9034b688019a7cac753d1209e2b227f';
const String url = 'https://pos-api-int.dinect.com/20130701/';
const String appToken = '9fec83cdca38c357e6b65dbb17514cdd36bf2a08';
// Hints
const String merchantIDHint = 'ID магазина';
@@ -17,7 +17,7 @@ const String active_token_bg_png = 'assets/active_token_message_background.png';
const String expansion_icon_png = 'assets/expansion_icon.png';
const String powered_by_dinect_splash_png = 'assets/powered_by_dinect_splash.png';
const String powered_by_dinect_png = 'assets/powered_by_dinect.png';
const String splash_logo_png = 'assets/splash_logo_png';
const String splash_text_png = 'assets/splash_text.png';
// Colors
const Color primaryColor = const Color(0xffeb0004);

View File

@@ -66,6 +66,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
/// Смена состояния экрана при изменении текста в поле ввода.
@override handleUserInput(String tmpString) {
setState(() {
double.parse(tmpString);
tmpString = tmpString.replaceAll('-', '');
tmpString = tmpString.replaceAll(',', '');
print(tmpString);
@@ -85,6 +86,12 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
});
}
@override getTextWidget() {
return new TextField(decoration: new InputDecoration.collapsed(hintText: getHint(),
hintStyle: new TextStyle(color: greyTextColor, fontSize: 16.0)),
onChanged: (text) => handleUserInput(text));
}
getLoyality(String url) {
print(url);

View File

@@ -18,10 +18,15 @@ class SplashScreen extends StatelessWidget {
showNextScreen(context);
});
return new Stack(children: <Widget>[getBackgroundContainer(),
return new Stack(children: <Widget>[getBackgroundContainer(), getLogo(),
new Align(alignment: FractionalOffset.bottomRight, child:
new Container(margin: new EdgeInsets.only(right: 11.0, bottom: 5.0), child: new Image.asset(powered_by_dinect_splash_png, height: 16.0, width: 122.0))),
new Center(child: new Image.asset(splash_logo_png, height: 198.0, width: 252.0))]);
new Container(margin: new EdgeInsets.only(right: 11.0, bottom: 5.0), child: new Image.asset(powered_by_dinect_splash_png, height: 16.0, width: 122.0)))]);
}
getLogo() {
return new Center(child: new Column(mainAxisSize: MainAxisSize.min,
children: <Widget>[new Image.asset(logo_png, height: 112.0, width: 252.0),
new Image.asset(splash_text_png, height: 40.0, width: 240.0)]));
}
getBackgroundContainer() {