You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Classes and mixins can only implement other classes and mixins.
Try specifying a class or mixin, or remove the name from the list. in class auth_test.dart
pls remove this error.
Classes and mixins can only implement other classes and mixins.
Try specifying a class or mixin, or remove the name from the list. in class auth_test.dart
class MockAuthProvider implements AuthProvider {
AuthUser? _user;
var _isInitialized = false;
bool get isInitialized => _isInitialized;
@OverRide
Future createUser({
required String email,
required String password,
}) async {
if (!isInitialized) throw NotInitializedException();
await Future.delayed(const Duration(seconds: 1));
return logIn(
email: email,
password: password,
);
}
@OverRide
AuthUser? get currentUser => _user;
@OverRide
Future initialize() async {
await Future.delayed(const Duration(seconds: 1));
_isInitialized = true;
}
@OverRide
Future logIn({
required String email,
required String password,
}) {
if (!isInitialized) throw NotInitializedException();
if (email == '[email protected]') throw UserNotFoundAuthException();
if (password == '12345') throw WrongPasswordAuthExeption();
const user = AuthUser(isEmailVerified: false);
_user = user;
return Future.value(user);
}
@OverRide
Future logOut() async {
if (!isInitialized) throw NotInitializedException();
if (_user == null) throw UserNotFoundAuthException();
await Future.delayed(const Duration(seconds: 1));
_user = null;
}
@OverRide
Future sendEmailVerification() async {
if (!isInitialized) throw NotInitializedException();
final user = _user;
if (user == null) throw UserNotFoundAuthException();
const newUser = AuthUser(isEmailVerified: true);
_user = newUser;
}
}
The text was updated successfully, but these errors were encountered: