Получение информации о пользователе, разные исправления
This commit is contained in:
@@ -8,21 +8,22 @@ import 'purchase.dart';
|
||||
/// Экран проведения покупки.
|
||||
class PurchaseSuccessScreen extends StatefulWidget {
|
||||
|
||||
String val = '';
|
||||
PurchaseSuccessScreen(this.val, this.name);
|
||||
String val;
|
||||
String name;
|
||||
|
||||
PurchaseSuccessScreen(String val) {
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
@override State createState() => new PurchaseSuccessScreenState(val);
|
||||
@override State createState() => new PurchaseSuccessScreenState(val, name);
|
||||
}
|
||||
|
||||
class PurchaseSuccessScreenState<T> extends PurchaseScreenState<T> {
|
||||
class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
|
||||
String val = '';
|
||||
PurchaseSuccessScreenState(this.sum, this.username);
|
||||
|
||||
PurchaseSuccessScreenState(String val) {
|
||||
this.val = val;
|
||||
String sum;
|
||||
String username;
|
||||
|
||||
@overide getMenuButtons(BuildContext context) {
|
||||
return <Widget>[getFaqButton(), getLogoutButton()];
|
||||
}
|
||||
|
||||
@override String getTitle() {
|
||||
@@ -31,7 +32,7 @@ class PurchaseSuccessScreenState<T> extends PurchaseScreenState<T> {
|
||||
|
||||
@override Widget getScreenContent() {
|
||||
return new Column(children: <Widget>[
|
||||
getValueWithTitle('Покупатель', 'Знаменитый Рокер Паук'),
|
||||
getValueWithTitle('Покупатель', username),
|
||||
getSuccessMessage(),
|
||||
new Expanded(child: new Center()),
|
||||
buildButton(new EdgeInsets.only(bottom: 74.0, left: buttonVerticalMargin, right: buttonVerticalMargin), buildRaisedButton(context, 'СКАНИРОВАТЬ', () => startScanner(context)))
|
||||
@@ -41,7 +42,7 @@ class PurchaseSuccessScreenState<T> extends PurchaseScreenState<T> {
|
||||
getSuccessMessage() {
|
||||
return new Row(children: <Widget>[new Expanded(child: new Container(margin: new EdgeInsets.only(top: 20.0), height: 64.0,
|
||||
decoration: new BoxDecoration(color: greenBackground),
|
||||
child: new Center(child: new Text('Покупка на сумму ${val} руб. проведена', textAlign: TextAlign.center,
|
||||
child: new Center(child: new Text('Покупка на сумму ${sum} руб. проведена', textAlign: TextAlign.center,
|
||||
style: new TextStyle(fontWeight: FontWeight.bold, color: tokenActiveTextColor)))))]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user