Hide discount widgets for crypto flavor
This commit is contained in:
@@ -83,7 +83,16 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
// В случае, если в приложении отсутствует токен,
|
||||
// необходимо запустить регистрацию кассы.
|
||||
if (token == null) {
|
||||
pushRouteReplacement(context, new RegistrationScreen(helper, app));
|
||||
|
||||
new Future.delayed(const Duration(milliseconds: 200), () {
|
||||
var route = new MaterialPageRoute<bool>(
|
||||
builder: (BuildContext context) => new RegistrationScreen(helper, app), fullscreenDialog: true);
|
||||
Navigator.of(context).push(route).then((b) {
|
||||
_initAndStartScanner(context, app, token, helper);
|
||||
});
|
||||
});
|
||||
|
||||
// pushRoute(context, new RegistrationScreen(helper, app));
|
||||
} else {
|
||||
if (await platform.invokeMethod('isOnline')) {
|
||||
getCheckTokenStatusRequest(token).then((statusResponse) {
|
||||
@@ -100,7 +109,6 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
/// Если токен не активен, попробовать создать его еще раз.
|
||||
handleStatusResponse(var statusResponse, SqliteHelper helper) async {
|
||||
int code = statusResponse.statusCode;
|
||||
|
||||
if (code == 404) {
|
||||
helper.clear().then((result) {
|
||||
pushRouteReplacement(context, new RegistrationScreen(helper, app));
|
||||
@@ -191,7 +199,14 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
} else if (call.method == 'faq') {
|
||||
faq(helper, app, context, true);
|
||||
} else if (call.method == 'settings') {
|
||||
pushRoute(context, new SettingsScreen(helper, app, true));
|
||||
new Future.delayed(const Duration(milliseconds: 200), () {
|
||||
var route = new MaterialPageRoute<bool>(
|
||||
builder: (BuildContext context) => new SettingsScreen(helper, app, true), fullscreenDialog: true);
|
||||
Navigator.of(context).push(route).then((b) {
|
||||
print('purchase closed: $b');
|
||||
_initAndStartScanner(context, app, token, helper);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
String userString;
|
||||
|
||||
@@ -254,5 +269,4 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user