Локализация платформонезависимой части приложения
This commit is contained in:
@@ -2,13 +2,12 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'common.dart';
|
||||
import 'network.dart';
|
||||
import 'consts.dart';
|
||||
|
||||
abstract class BaseState<T> extends State<T> {
|
||||
abstract class BaseState<T> extends State<StatefulWidget> {
|
||||
|
||||
bool loading = false;
|
||||
String error = null;
|
||||
String error;
|
||||
String textFieldValue = '';
|
||||
|
||||
TextEditingController controller = new TextEditingController();
|
||||
@@ -22,7 +21,7 @@ abstract class BaseState<T> extends State<T> {
|
||||
backgroundColor: primaryColor, actions: getMenuButtons(context));
|
||||
}
|
||||
|
||||
@overide getMenuButtons(BuildContext context) {
|
||||
getMenuButtons(BuildContext context) {
|
||||
return <Widget>[getFaqButton()];
|
||||
}
|
||||
|
||||
@@ -38,7 +37,7 @@ abstract class BaseState<T> extends State<T> {
|
||||
return new Stack(children: <Widget>[getScreenContent(), getProgressIndicator()]);
|
||||
}
|
||||
|
||||
Widget getScreenContent(BuildContext context);
|
||||
Widget getScreenContent();
|
||||
|
||||
String getTitle();
|
||||
|
||||
@@ -80,7 +79,7 @@ abstract class BaseState<T> extends State<T> {
|
||||
getDecoratedTextWidget() {
|
||||
return new Container(margin: new EdgeInsets.only(left: verticalMargin, right: verticalMargin),
|
||||
padding: getPaddingForTextWidget(),
|
||||
decoration: getDecoraionForTextWidget(),
|
||||
decoration: getDecorationForTextWidget(),
|
||||
child: getTextWidget());
|
||||
}
|
||||
|
||||
@@ -94,7 +93,7 @@ abstract class BaseState<T> extends State<T> {
|
||||
}
|
||||
|
||||
/// Метод возвращает BoxDecoration для _getDecoratedInputField
|
||||
getDecoraionForTextWidget() {
|
||||
getDecorationForTextWidget() {
|
||||
return new BoxDecoration(color: getTextFilledBackground(),
|
||||
border: new Border.all(color: textBorderColor, width: 1.0),
|
||||
borderRadius: new BorderRadius.all(new Radius.circular(4.0)));
|
||||
@@ -138,10 +137,10 @@ abstract class BaseState<T> extends State<T> {
|
||||
return new Container(height: buttonHeight, child: new FlatButton(child: new Text(title,
|
||||
style: new TextStyle(color: textColor)),
|
||||
onPressed: () => startScanner(context)),
|
||||
decoration: _getDecoraionForScanButton());
|
||||
decoration: getDecorationForScanButton());
|
||||
}
|
||||
|
||||
_getDecoraionForScanButton() {
|
||||
getDecorationForScanButton() {
|
||||
return new BoxDecoration(
|
||||
border: new Border.all(color: primaryColor, width: 1.0),
|
||||
borderRadius: new BorderRadius.all(new Radius.circular(4.0)));
|
||||
|
||||
Reference in New Issue
Block a user