remove trailing spaces in dart files, refs #9991

This commit is contained in:
anonymouzz
2017-08-04 15:59:48 +07:00
parent dff8c14cae
commit dc1511dc51
2 changed files with 15 additions and 15 deletions

View File

@@ -54,7 +54,7 @@ abstract class BaseState<T> extends State<T> {
getHintLabel() { getHintLabel() {
double horizontalMargin = 8.0; double horizontalMargin = 8.0;
return new Container(margin: new EdgeInsets.only(top: horizontalMargin, bottom: horizontalMargin, left: verticalMargin, right: verticalMargin), 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, children: <Widget>[new Text(getHintText(), textAlign: TextAlign.left,
style: new TextStyle(fontWeight: FontWeight.w300, color: error == null ? greyTextColor : primaryColor, fontSize: 14.0))])); 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) { if (textFieldValue.length == 0 && error == null) {
return ' '; return ' ';
} else if (error != null) { } else if (error != null) {
return error; return error;
} else { } else {
return getHint(); return getHint();
} }
@@ -87,9 +87,9 @@ abstract class BaseState<T> extends State<T> {
getPaddingForTextWidget() { getPaddingForTextWidget() {
const double verticalPadding = 12.0; const double verticalPadding = 12.0;
const double horizontalPadding = 16.0; const double horizontalPadding = 16.0;
return new EdgeInsets.only(top: verticalPadding, return new EdgeInsets.only(top: verticalPadding,
bottom: verticalPadding, bottom: verticalPadding,
left: horizontalPadding, left: horizontalPadding,
right: horizontalPadding); right: horizontalPadding);
} }
@@ -126,7 +126,7 @@ abstract class BaseState<T> extends State<T> {
Widget buildButton(EdgeInsets margin, Widget widget) { Widget buildButton(EdgeInsets margin, Widget widget) {
return new Container(margin: margin, height: buttonHeight, child: new Row(children: <Widget>[new Expanded(child: 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) { Widget buildRaisedButton(BuildContext context, String text, VoidCallback onPressed) {
return new RaisedButton(child: new Text(text, return new RaisedButton(child: new Text(text,
style: new TextStyle(color: Colors.white)), 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), border: new Border.all(color: primaryColor, width: 1.0),
borderRadius: new BorderRadius.all(new Radius.circular(4.0))); borderRadius: new BorderRadius.all(new Radius.circular(4.0)));
} }
} }

View File

@@ -27,15 +27,15 @@ class SplashScreen extends StatelessWidget {
// Возвращает столбец с логотипом приложения и текстом под ним. // Возвращает столбец с логотипом приложения и текстом под ним.
// Столбец занимает не все доступное пространство, а необходимый минимум в центре экрана. // Столбец занимает не все доступное пространство, а необходимый минимум в центре экрана.
getLogo() { 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), 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)])); new Image.asset(splash_text_png, height: 40.0, width: 240.0)]));
} }
// Возвращает контейнер, который содержит decoration с фоновым изображением. // Возвращает контейнер, который содержит decoration с фоновым изображением.
getSplashBackground() { getSplashBackground() {
return new Container(decoration: return new Container(decoration:
new BoxDecoration(image: new BoxDecoration(image:
new DecorationImage(image: new ExactAssetImage(splash_png), fit: BoxFit.cover))); new DecorationImage(image: new ExactAssetImage(splash_png), fit: BoxFit.cover)));
} }
@@ -44,7 +44,7 @@ class SplashScreen extends StatelessWidget {
token = await platform.invokeMethod('getToken'); token = await platform.invokeMethod('getToken');
print('token: $token'); print('token: $token');
// В случае, если в приложении отсутствует токен, // В случае, если в приложении отсутствует токен,
// необходимо запустить регистрацию кассы. // необходимо запустить регистрацию кассы.
if (token == null) { if (token == null) {
@@ -74,7 +74,7 @@ class SplashScreen extends StatelessWidget {
pushRoute(context, new RegistrationScreen()); pushRoute(context, new RegistrationScreen());
}); });
} else { } else {
Map statusResponseMap = JSON.decode(statusResponse.body); Map statusResponseMap = JSON.decode(statusResponse.body);
bool active = statusResponseMap['active'] == null ? false : statusResponseMap['active']; bool active = statusResponseMap['active'] == null ? false : statusResponseMap['active'];
@@ -82,8 +82,8 @@ class SplashScreen extends StatelessWidget {
startScanner(context); startScanner(context);
} else { } else {
if (await platform.invokeMethod('isOnline')) { if (await platform.invokeMethod('isOnline')) {
createToken(await platform.invokeMethod('getMerchantID'), await platform.invokeMethod('getPosID')).then((response) { createToken(await platform.invokeMethod('getMerchantID'), await platform.invokeMethod('getPosID')).then((response) {
if (response.statusCode == 409) { if (response.statusCode == 409) {
pushRoute(context, new FinishRegistrationScreen()); pushRoute(context, new FinishRegistrationScreen());
} else if (response.statusCode == 201) { } else if (response.statusCode == 201) {
platform.invokeMethod('removeKeys').then((result) { platform.invokeMethod('removeKeys').then((result) {
@@ -103,4 +103,4 @@ class SplashScreen extends StatelessWidget {
} }
} }
} }
} }