|
|
|
@ -9,7 +9,7 @@ import 'package:provider/provider.dart';
|
|
|
|
|
import '../constants/environment/environment.dart';
|
|
|
|
|
import '../providers/user_provider.dart';
|
|
|
|
|
import '../utils/hive_store.dart';
|
|
|
|
|
import 'login/login_page.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Loading extends StatefulWidget {
|
|
|
|
|
Loading({Key? key}) : super(key: key);
|
|
|
|
@ -27,14 +27,14 @@ class _LoadingState extends State<Loading> {
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
final userProvider = Provider.of<UserProvider>(context, listen: false);
|
|
|
|
|
var env = const String.fromEnvironment('ENV', defaultValue: 'dev');
|
|
|
|
|
if (kDebugMode) {
|
|
|
|
|
print('env :$env');
|
|
|
|
|
}
|
|
|
|
|
DevEV.instance.setEnvironment(
|
|
|
|
|
context,
|
|
|
|
|
environment: env == 'dev',
|
|
|
|
|
);
|
|
|
|
|
// var env = const String.fromEnvironment('ENV', defaultValue: 'dev');
|
|
|
|
|
// if (kDebugMode) {
|
|
|
|
|
// print('env :$env');
|
|
|
|
|
// }
|
|
|
|
|
// DevEV.instance.setEnvironment(
|
|
|
|
|
// context,
|
|
|
|
|
// environment: env == 'dev',
|
|
|
|
|
// );
|
|
|
|
|
Future.delayed(const Duration(milliseconds: 1000), () async {
|
|
|
|
|
await initialAll();
|
|
|
|
|
if (!await userProvider.init()) {
|
|
|
|
|