Fixes, Android adaptive icon for crypto.
This commit is contained in:
@@ -50,6 +50,8 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> {
|
||||
/// Возвращает контейнер с всеми виджетами экрана.
|
||||
Widget getScreenContent();
|
||||
|
||||
bool isAutomaticallyImplyLeading();
|
||||
|
||||
/// Возвращает заголовок для AppBar
|
||||
String getTitle() {
|
||||
return null;
|
||||
@@ -59,6 +61,7 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> {
|
||||
return new AppBar(title: new Container(
|
||||
margin: new EdgeInsets.only(left: 16.0),
|
||||
child: new Text(getTitle(), style: new TextStyle(fontSize: 18.0))),
|
||||
automaticallyImplyLeading: isAutomaticallyImplyLeading(),
|
||||
backgroundColor: Resources.getPrimaryColor(app), actions: getMenuButtons());
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ class _CurrenciesState extends SettingsBaseState<CurrenciesScreen> {
|
||||
|
||||
_CurrenciesState(SqliteHelper helper, String app) : super(helper, app);
|
||||
|
||||
bool isAutomaticallyImplyLeading() => true;
|
||||
|
||||
@override
|
||||
List<String> getOptions() {
|
||||
|
||||
@@ -22,6 +22,8 @@ class EntryItem extends StatelessWidget {
|
||||
const EntryItem(this.entry);
|
||||
final Entry entry;
|
||||
|
||||
bool isAutomaticallyImplyLeading() => true;
|
||||
|
||||
Widget _buildTiles(BuildContext context, Entry root) {
|
||||
EdgeInsets margin = new EdgeInsets.only(left: 20.0, right: 20.0);
|
||||
TextStyle titleStyle = Theme.of(context).textTheme.button.copyWith(
|
||||
|
||||
@@ -24,6 +24,8 @@ class RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
||||
bool _tokenActive = false;
|
||||
String _merchantID = '';
|
||||
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
if (_merchantID == '') {
|
||||
helper.getMerchantID().then((result) {
|
||||
|
||||
@@ -18,6 +18,8 @@ class LanguagesState extends SettingsBaseState<LanguagesScreen> {
|
||||
|
||||
List<String> languages = const ['ru', 'en', 'ua', 'es'];
|
||||
|
||||
bool isAutomaticallyImplyLeading() => true;
|
||||
|
||||
@override
|
||||
List<String> getOptions() {
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
FocusNode _focusNodeSum = new FocusNode();
|
||||
FocusNode _focusNodeBonus = new FocusNode();
|
||||
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
|
||||
PurchaseScreenState(SqliteHelper helper, String app, String userString, String card) : super(helper, app) {
|
||||
this.user = JSON.decode(userString);
|
||||
this.card = card;
|
||||
|
||||
@@ -41,6 +41,8 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
int currency;
|
||||
bool showBonus;
|
||||
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
|
||||
@override String getTitle() {
|
||||
return StringsLocalization.carryingPurchase();
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ class RegistrationScreenState extends BaseState<RegistrationScreen> {
|
||||
RegistrationScreenState(SqliteHelper helper, String app) : super(helper, app);
|
||||
FocusNode _focusNode = new FocusNode();
|
||||
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext ctx) {
|
||||
return getMainWidget();
|
||||
|
||||
@@ -36,6 +36,8 @@ class SettingsState extends BaseState<SettingsScreen> {
|
||||
|
||||
bool returnToScanner;
|
||||
|
||||
bool isAutomaticallyImplyLeading() => true;
|
||||
|
||||
SettingsState(SqliteHelper helper, String app, bool returnToScanner) : super(helper, app) {
|
||||
this.returnToScanner = returnToScanner;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
_SplashScreenState(SqliteHelper helper, String app) : super(helper, app);
|
||||
bool a = false;
|
||||
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user