AuthRepository constructor

AuthRepository({
  1. required AuthService authService,
  2. required Fresh<AuthTokenModel> fresh,
  3. required SecureStorage secureStorage,
  4. required UserRepository userRepository,
  5. required AuthFailureNotifier authFailureNotifier,
  6. required ToastService toastService,
  7. required AppLogger logger,
})

Creates an AuthRepository and subscribes to auth-failure notifications.

Implementation

AuthRepository({
  required AuthService authService,
  required Fresh<AuthTokenModel> fresh,
  required SecureStorage secureStorage,
  required UserRepository userRepository,
  required AuthFailureNotifier authFailureNotifier,
  required ToastService toastService,
  required AppLogger logger,
}) : _authService = authService,
     _fresh = fresh,
     _secureStorage = secureStorage,
     _userRepository = userRepository,
     _authFailureNotifier = authFailureNotifier,
     _toastService = toastService,
     _logger = logger {
  _subscribeToAuthFailures();
}