minor fixes
This commit is contained in:
@@ -10,23 +10,9 @@ import 'package:qpay/providers/splash_provider.dart';
|
||||
import 'package:qpay/screens/workspaces/workspace_provider.dart';
|
||||
import 'package:qpay/providers/uptime_provider.dart';
|
||||
import 'package:qpay/theme/app_theme.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'firebase_options.dart';
|
||||
|
||||
const String testEnv = 'assets/.env.test';
|
||||
const String liveEnv = 'assets/.env.live';
|
||||
const String appEnv = String.fromEnvironment('APP_ENV', defaultValue: 'test');
|
||||
|
||||
String resolveEnvFile(String env) {
|
||||
switch (env.toLowerCase()) {
|
||||
case 'live':
|
||||
return liveEnv;
|
||||
case 'test':
|
||||
default:
|
||||
return testEnv;
|
||||
}
|
||||
}
|
||||
import 'config/app_config.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@@ -35,8 +21,6 @@ void main() async {
|
||||
}
|
||||
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||||
|
||||
await dotenv.load(fileName: resolveEnvFile(appEnv));
|
||||
|
||||
// Read the persisted auth token before the first frame so the router
|
||||
// knows whether the user is already signed in on cold start. Without
|
||||
// this we would briefly treat logged-in users as guests and bounce
|
||||
|
||||
Reference in New Issue
Block a user