diff --git a/lib/config/config.dart b/lib/config/config.dart index 5c599425..0f38756d 100755 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -4,14 +4,14 @@ const MAX_SMALL_SCREEN = 660; const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; - const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; -// const BASE_URL_LIVE_CARE = 'https://uat.hmgwebservices.com/'; + // const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; +const BASE_URL_LIVE_CARE = 'https://uat.hmgwebservices.com/'; const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'http://10.20.200.111:1010/'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/'; diff --git a/lib/main.dart b/lib/main.dart index 24ab7384..043beb2b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -17,15 +17,25 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:provider/provider.dart'; +import 'package:shared_preferences/shared_preferences.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); HttpOverrides.global = MyHttpOverrides(); setupLocator(); + await clearPrefsOnFirstLaunch(); runApp(MyApp()); } +//clearing all the shared pref on the inital start to avoid any profile issue +Future clearPrefsOnFirstLaunch() async { + SharedPreferences prefs = await SharedPreferences. getInstance(); + bool isFirstLaunch = prefs.getBool('isFirstLaunch') ?? true; + await prefs.clear(); // Clear all prefs +} + + class MyApp extends StatelessWidget { @override Widget build(BuildContext context) {