diff --git a/ios/Flutter/app.flx b/ios/Flutter/app.flx index 3f94061..b9fa089 100644 Binary files a/ios/Flutter/app.flx and b/ios/Flutter/app.flx differ diff --git a/ios/Runner.xcworkspace/xcuserdata/kifio.xcuserdatad/UserInterfaceState.xcuserstate b/ios/Runner.xcworkspace/xcuserdata/kifio.xcuserdatad/UserInterfaceState.xcuserstate index cf47919..a9a7349 100644 Binary files a/ios/Runner.xcworkspace/xcuserdata/kifio.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/Runner.xcworkspace/xcuserdata/kifio.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/lib/screens/purchase.dart b/lib/screens/purchase.dart index 93abe56..e625cce 100644 --- a/lib/screens/purchase.dart +++ b/lib/screens/purchase.dart @@ -46,6 +46,7 @@ class PurchaseScreenState extends BaseState { @override void initState() { + loading = true; requestAsyncData(user); super.initState(); } @@ -225,9 +226,6 @@ class PurchaseScreenState extends BaseState { } requestAsyncData(Map user) async { - setState(() { - loading = true; - }); bool showBonus = await platform.invokeMethod('showBonus'); if (await platform.invokeMethod('isOnline')) { var response, couponResponse; @@ -248,8 +246,8 @@ class PurchaseScreenState extends BaseState { coupons['results'].forEach((couponItem) { couponItem['isSet'] = false; }); - setState(() { + loading = false; this.coupons = coupons['results']; this.loyalityType = loyality['type']; setBonuses(loyality, showBonus); @@ -343,6 +341,9 @@ class PurchaseScreenState extends BaseState { } purchase(String sumTotal) async { + setState(() { + loading = true; + }); if (await platform.invokeMethod('isOnline')) { if (!purchaseInProgress) { purchaseInProgress = true; @@ -363,7 +364,6 @@ class PurchaseScreenState extends BaseState { 'curr_iso_code': currency.toString(), 'commit': 'true', 'sum_total': sumTotal, -// 'coupons': [] }; if (bonusController.text.length > 0) { diff --git a/lib/screens/splash.dart b/lib/screens/splash.dart index 04771ee..f07f5c4 100644 --- a/lib/screens/splash.dart +++ b/lib/screens/splash.dart @@ -28,20 +28,13 @@ class SplashScreen extends BaseScreen { class _SplashScreenState extends BaseState { _SplashScreenState(SqliteHelper helper, String app) : super(helper, app); - bool a = false; + bool a = true; bool isAutomaticallyImplyLeading() => false; @override void initState() { - - print('init state!'); - - new Future.delayed(const Duration(milliseconds: 1000), () { - showNextScreen(); - a = true; - }); - + showNextScreen(); super.initState(); } @@ -173,6 +166,11 @@ class _SplashScreenState extends BaseState { SqliteHelper helper) { // Канал ловит вызовы методов из "нативной" части приложения. // Могут быть вызваны либо exit либо faq, либо purchase. + + setState(() { + a = false; + }); + platform.setMethodCallHandler((MethodCall call) async { print(this.toString()); if (call.method == 'findUser') {