Splash fix

merge-update-with-lab-changes
haroon amjad 2 years ago
parent 32757c85f8
commit 6e558bf5a6

@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
@ -30,16 +31,19 @@ class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
AppGlobal.context = context;
super.initState();
Timer(
Duration(seconds: 1, milliseconds: 500),
() async {
await loadPrivilege().then((value) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (BuildContext context) => LandingPage(),
),
);
if(!_privilegeService.hasError) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (BuildContext context) => LandingPage(),
),
);
} else {}
});
},
);
@ -58,10 +62,6 @@ class _SplashScreenState extends State<SplashScreen> {
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));
PushNotificationHandler(context).init(); // Asyncronously
AppSharedPreferences().getAll().then((value) {
// debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value));
});
}
@override

@ -40,9 +40,9 @@ class MyInAppBrowser extends InAppBrowser {
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS

Loading…
Cancel
Save