remove trailing spaces in dart files, refs #9991
This commit is contained in:
@@ -54,7 +54,7 @@ abstract class BaseState<T> extends State<T> {
|
||||
getHintLabel() {
|
||||
double horizontalMargin = 8.0;
|
||||
return new Container(margin: new EdgeInsets.only(top: horizontalMargin, bottom: horizontalMargin, left: verticalMargin, right: verticalMargin),
|
||||
child: new Row(crossAxisAlignment: CrossAxisAlignment.start,
|
||||
child: new Row(crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[new Text(getHintText(), textAlign: TextAlign.left,
|
||||
style: new TextStyle(fontWeight: FontWeight.w300, color: error == null ? greyTextColor : primaryColor, fontSize: 14.0))]));
|
||||
}
|
||||
@@ -63,7 +63,7 @@ abstract class BaseState<T> extends State<T> {
|
||||
if (textFieldValue.length == 0 && error == null) {
|
||||
return ' ';
|
||||
} else if (error != null) {
|
||||
return error;
|
||||
return error;
|
||||
} else {
|
||||
return getHint();
|
||||
}
|
||||
@@ -87,9 +87,9 @@ abstract class BaseState<T> extends State<T> {
|
||||
getPaddingForTextWidget() {
|
||||
const double verticalPadding = 12.0;
|
||||
const double horizontalPadding = 16.0;
|
||||
return new EdgeInsets.only(top: verticalPadding,
|
||||
bottom: verticalPadding,
|
||||
left: horizontalPadding,
|
||||
return new EdgeInsets.only(top: verticalPadding,
|
||||
bottom: verticalPadding,
|
||||
left: horizontalPadding,
|
||||
right: horizontalPadding);
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ abstract class BaseState<T> extends State<T> {
|
||||
Widget buildButton(EdgeInsets margin, Widget widget) {
|
||||
return new Container(margin: margin, height: buttonHeight, child: new Row(children: <Widget>[new Expanded(child: widget)]));
|
||||
}
|
||||
|
||||
|
||||
Widget buildRaisedButton(BuildContext context, String text, VoidCallback onPressed) {
|
||||
return new RaisedButton(child: new Text(text,
|
||||
style: new TextStyle(color: Colors.white)),
|
||||
@@ -146,4 +146,4 @@ abstract class BaseState<T> extends State<T> {
|
||||
border: new Border.all(color: primaryColor, width: 1.0),
|
||||
borderRadius: new BorderRadius.all(new Radius.circular(4.0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,15 +27,15 @@ class SplashScreen extends StatelessWidget {
|
||||
// Возвращает столбец с логотипом приложения и текстом под ним.
|
||||
// Столбец занимает не все доступное пространство, а необходимый минимум в центре экрана.
|
||||
getLogo() {
|
||||
return new Center(child: new Column(mainAxisSize: MainAxisSize.min,
|
||||
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)]));
|
||||
}
|
||||
|
||||
// Возвращает контейнер, который содержит decoration с фоновым изображением.
|
||||
getSplashBackground() {
|
||||
return new Container(decoration:
|
||||
new BoxDecoration(image:
|
||||
return new Container(decoration:
|
||||
new BoxDecoration(image:
|
||||
new DecorationImage(image: new ExactAssetImage(splash_png), fit: BoxFit.cover)));
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class SplashScreen extends StatelessWidget {
|
||||
|
||||
token = await platform.invokeMethod('getToken');
|
||||
print('token: $token');
|
||||
|
||||
|
||||
// В случае, если в приложении отсутствует токен,
|
||||
// необходимо запустить регистрацию кассы.
|
||||
if (token == null) {
|
||||
@@ -74,7 +74,7 @@ class SplashScreen extends StatelessWidget {
|
||||
pushRoute(context, new RegistrationScreen());
|
||||
});
|
||||
} else {
|
||||
|
||||
|
||||
Map statusResponseMap = JSON.decode(statusResponse.body);
|
||||
bool active = statusResponseMap['active'] == null ? false : statusResponseMap['active'];
|
||||
|
||||
@@ -82,8 +82,8 @@ class SplashScreen extends StatelessWidget {
|
||||
startScanner(context);
|
||||
} else {
|
||||
if (await platform.invokeMethod('isOnline')) {
|
||||
createToken(await platform.invokeMethod('getMerchantID'), await platform.invokeMethod('getPosID')).then((response) {
|
||||
if (response.statusCode == 409) {
|
||||
createToken(await platform.invokeMethod('getMerchantID'), await platform.invokeMethod('getPosID')).then((response) {
|
||||
if (response.statusCode == 409) {
|
||||
pushRoute(context, new FinishRegistrationScreen());
|
||||
} else if (response.statusCode == 201) {
|
||||
platform.invokeMethod('removeKeys').then((result) {
|
||||
@@ -103,4 +103,4 @@ class SplashScreen extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user