Локаль можно задать на этапе сборки
This commit is contained in:
@@ -24,11 +24,11 @@ class _RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
||||
}
|
||||
|
||||
@override String getTitle() {
|
||||
return Strings.of(context).registration();
|
||||
return StringsLocalization.registration();
|
||||
}
|
||||
|
||||
@override getHint() {
|
||||
return Strings.of(context).idStore();
|
||||
return StringsLocalization.idStore();
|
||||
}
|
||||
|
||||
@override Widget getScreenContent() {
|
||||
@@ -37,9 +37,9 @@ class _RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
||||
getHintLabel(),
|
||||
getInputField(),
|
||||
getMessage(),
|
||||
buildRaisedButton(context, _tokenActive
|
||||
? Strings.of(context).completeRegistration()
|
||||
: Strings.of(context).refreshActivationStatus(), () => handleTap())
|
||||
buildRaisedButton(_tokenActive
|
||||
? StringsLocalization.completeRegistration()
|
||||
: StringsLocalization.refreshActivationStatus(), () => handleTap())
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ class _RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
||||
startScanner(context);
|
||||
} else {
|
||||
if (await platform.invokeMethod('isOnline')) {
|
||||
String token = await platform.invokeMethod('getToken');
|
||||
checkTokenStatus(token).then((response) {
|
||||
|
||||
print(response.body);
|
||||
@@ -68,8 +69,9 @@ class _RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
@override Widget getTextWidget() {
|
||||
return new Row(children: <Widget>[new Text(_merchantID != null ? _merchantID : '', style: new TextStyle(color: Colors.black, fontSize: 16.0))]);
|
||||
@override getTextWidget() {
|
||||
return new Row(children: <Widget>[new Text(_merchantID != null ? _merchantID : '',
|
||||
style: new TextStyle(color: Colors.black, fontSize: 16.0))]);
|
||||
}
|
||||
|
||||
/// Достаем сохраненный в SharedPreferences merchantID.
|
||||
@@ -84,7 +86,7 @@ class _RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
||||
|
||||
/// Метод возвращает контейнер с текстом сообщения и бэкграундом.
|
||||
getMessage() {
|
||||
return new Container(height: _tokenActive ? 72.0 : 108.0, decoration: _getDecoraionForMessageField(),
|
||||
return new Container(height: _tokenActive ? 72.0 : 108.0, decoration: _getDecorationForMessageField(),
|
||||
margin: new EdgeInsets.only(top: 20.0, left: 12.0, right: 12.0),
|
||||
padding: new EdgeInsets.only(bottom: 22.0, left: 14.0, right: 14.0),
|
||||
child: new Center(child: getMessageTextWidget()));
|
||||
@@ -100,13 +102,14 @@ class _RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
||||
/// Получаем текст сообщения, в зависимости от статуса активации.
|
||||
getMessageString() {
|
||||
return _tokenActive
|
||||
? Strings.of(context).completeRegistration()
|
||||
: Strings.of(context).refreshActivationStatus();
|
||||
? StringsLocalization.completeRegistration()
|
||||
: StringsLocalization.refreshActivationStatus();
|
||||
}
|
||||
|
||||
/// Фоновое изображение для сообщения.
|
||||
Decoration _getDecoraionForMessageField() {
|
||||
Decoration _getDecorationForMessageField() {
|
||||
return new BoxDecoration(image: new DecorationImage(
|
||||
image: new ExactAssetImage(_tokenActive ? active_token_bg_png : activate_token_bg_png), fit: _tokenActive ? BoxFit.fitWidth : BoxFit.fill));
|
||||
image: new ExactAssetImage(_tokenActive ? active_token_bg_png : activate_token_bg_png),
|
||||
fit: _tokenActive ? BoxFit.fitWidth : BoxFit.fill));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user