Enhance authentication flow and user role management

- Updated AuthViewModel to hydrate user data from storage on initialization.
- Added method to AuthRepository for retrieving stored customer data.
- Enhanced AuthService to save and retrieve customer data from SharedPreferences.
- Refactored UI components to use context.watch for user role updates in MeetingTimeDialog, TenderDetailActions, and TendersPage.
- Improved navigation logic in final completion pages to handle user interactions more effectively.
This commit is contained in:
amirrezaghabeli
2025-10-14 12:24:04 +03:30
parent a343cf2469
commit 38222afcfa
9 changed files with 80 additions and 8 deletions
@@ -1,3 +1,4 @@
import 'package:tm_app/data/services/model/customer/customer.dart';
import 'package:tm_app/data/services/model/forgot_password_response/forgot_password_response_model.dart';
import 'package:tm_app/data/services/model/login_response/login_response_model.dart';
import 'package:tm_app/data/services/model/verify_otp_response/verify_otp_response_model.dart';
@@ -51,4 +52,8 @@ class AuthRepository {
Future<Result<bool>> checkIsLoggedIn() async {
return _authService.checkIsLoggedIn();
}
Future<Customer?> getStoredCustomer() async {
return _authService.getStoredCustomer();
}
}