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