Локализация платформонезависимой части приложения
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'main.dart';
|
||||
import 'common.dart';
|
||||
import 'consts.dart';
|
||||
import 'base_state.dart';
|
||||
import 'purchase.dart';
|
||||
|
||||
/// Экран проведения покупки.
|
||||
class PurchaseSuccessScreen extends StatefulWidget {
|
||||
|
||||
PurchaseSuccessScreen(this.val, this.name);
|
||||
String val;
|
||||
String name;
|
||||
|
||||
@override State createState() => new PurchaseSuccessScreenState(val, name);
|
||||
}
|
||||
|
||||
class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
|
||||
PurchaseSuccessScreenState(this.sum, this.username);
|
||||
|
||||
String sum;
|
||||
String username;
|
||||
|
||||
@overide getMenuButtons(BuildContext context) {
|
||||
return <Widget>[getFaqButton(), getLogoutButton()];
|
||||
}
|
||||
|
||||
@override String getTitle() {
|
||||
return "Проведение покупки";
|
||||
}
|
||||
|
||||
@override Widget getScreenContent() {
|
||||
return new Column(children: <Widget>[
|
||||
getValueWithTitle('Покупатель', username),
|
||||
getSuccessMessage(),
|
||||
new Expanded(child: new Center()),
|
||||
buildButton(new EdgeInsets.only(bottom: 74.0, left: buttonVerticalMargin, right: buttonVerticalMargin), buildRaisedButton(context, 'СКАНИРОВАТЬ', () => startScanner(context)))
|
||||
]);
|
||||
}
|
||||
|
||||
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('Покупка на сумму ${sum} руб. проведена', textAlign: TextAlign.center,
|
||||
style: new TextStyle(fontWeight: FontWeight.bold, color: tokenActiveTextColor)))))]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user