signIn method
Implementation
Future<void> signIn({
required String email,
required String password,
}) async {
setLoading(isLoading: true, error: null);
final result = await authService.loginWithEmail(
LoginWithEmailPayload(email: email, password: password),
);
await result.when(
success: (tokens) async {
await applyAuthTokens(tokens);
if (!ref.mounted) return;
setLoading(isLoading: false);
},
failure: (error) {
if (!ref.mounted) return;
setLoading(isLoading: false, error: error.message);
},
);
}