Сделал экраны Проведения покупки
This commit is contained in:
@@ -32,7 +32,7 @@ class PurchaseScreenState<T> extends BaseState<T> {
|
||||
}
|
||||
|
||||
@override Widget getScreenContent() {
|
||||
return new Container(height: 398.0,
|
||||
return new Container(height: 412.0,
|
||||
child: new ListView(reverse: true, children: <Widget>[
|
||||
new Column(children: <Widget>[
|
||||
getValueWithTitle('ФИО', 'Знаменитый Рокер Паук'),
|
||||
@@ -40,38 +40,33 @@ class PurchaseScreenState<T> extends BaseState<T> {
|
||||
getValueWithTitle('Вознаграждение', '100%'),
|
||||
getHintLabel(),
|
||||
getDecoratedTextWidget(),
|
||||
getApprovePurchaseButton(context),
|
||||
buildScanButton(context)])
|
||||
buildButton(new EdgeInsets.only(top: 36.0, left: 70.0, right: 70.0), buildRaisedButton(context, 'ЗАВЕРШИТЬ ПОКУПКУ', () => _purchase(context))),
|
||||
buildButton(new EdgeInsets.only(top: 24.0, left: 70.0, right: 70.0), buildFlatButton(context, 'СКАНИРОВАТЬ', primaryColor))])
|
||||
].reversed.toList()));
|
||||
}
|
||||
|
||||
Widget getValueWithTitle(String title, String value) {
|
||||
return new Container(padding: new EdgeInsets.only(left: verticalMargin, right: verticalMargin, top: 12.0),
|
||||
return new Container(padding: new EdgeInsets.only(left: verticalMargin, right: verticalMargin, top: 18.0),
|
||||
child: new Column(children: <Widget>[
|
||||
new Row(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[new Text(title, textAlign: TextAlign.left, style: new TextStyle(color: greyTextColor, fontSize: 14.0))]),
|
||||
new Row(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[new Text(value, textAlign: TextAlign.left, style: new TextStyle(color: Colors.black, fontSize: 20.0))])
|
||||
]));
|
||||
}
|
||||
|
||||
Widget buildButton(EdgeInsets margin, Widget widget) {
|
||||
return new Container(margin: margin, height: 48.0, child: new Row(children: <Widget>[new Expanded(child: widget)]));
|
||||
}
|
||||
|
||||
Widget getApprovePurchaseButton(BuildContext context) {
|
||||
return new Container(margin: new EdgeInsets.only(top: 36.0), height: 44.0,
|
||||
child: new RaisedButton(child: new Text('ЗАВЕРШИТЬ ПОКУПКУ',
|
||||
Widget buildRaisedButton(BuildContext context, String text, VoidCallback onPressed) {
|
||||
return new RaisedButton(child: new Text(text,
|
||||
style: new TextStyle(color: Colors.white)),
|
||||
onPressed: () => _purchase(context),
|
||||
color: primaryColor));
|
||||
onPressed: onPressed,
|
||||
color: primaryColor);
|
||||
}
|
||||
|
||||
Widget buildScanButton(BuildContext context) {
|
||||
return new Container(margin: new EdgeInsets.only(top: 24.0, left: 70.0, right: 70.0), child: _getScanButtonRow(context));
|
||||
}
|
||||
|
||||
Widget _getScanButtonRow(BuildContext context) {
|
||||
return new Row(children: <Widget>[new Expanded(child: _getScanButton(context))]);
|
||||
}
|
||||
|
||||
Widget _getScanButton(BuildContext context) {
|
||||
return new Container(height: 44.0, child: new FlatButton(child: new Text('СКАНИРОВАТЬ',
|
||||
style: new TextStyle(color: primaryColor)),
|
||||
Widget buildFlatButton(BuildContext context, String title, Color textColor) {
|
||||
return new Container(height: 48.0, child: new FlatButton(child: new Text(title,
|
||||
style: new TextStyle(color: textColor)),
|
||||
onPressed: () => startScanner(context)),
|
||||
decoration: _getDecoraionForScanButton());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user