mynotes-course icon indicating copy to clipboard operation
mynotes-course copied to clipboard

Classes and mixins can only implement other classes and mixins. Try specifying a class or mixin

Open knitish23 opened this issue 1 year ago • 1 comments

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<AuthUser> 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<AuthUser> 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; } }

knitish23 avatar Feb 24 '24 09:02 knitish23

I am having this error as well. Do we know when this will be fixed/what the cause of the error is?

JosephDaws avatar May 04 '24 18:05 JosephDaws