fix : login and route
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_app/presentation/routes/app_pages.dart';
|
||||
import 'package:rasadyar_auth/auth.dart';
|
||||
import 'package:rasadyar_auth/data/services/token_storage_service.dart';
|
||||
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@@ -9,6 +11,10 @@ import 'infrastructure/service/auth_service.dart';
|
||||
Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await setupInjection();
|
||||
Get.put(TokenStorageService());
|
||||
var tokenService = Get.find<TokenStorageService>();
|
||||
await tokenService.init();
|
||||
Get.put(AuthMiddleware());
|
||||
Get.put(AuthService());
|
||||
|
||||
runApp(MyApp());
|
||||
|
||||
Reference in New Issue
Block a user