Trying to set up Anonymous sign in option from an old example it seems. Did Google change something? I'm getting error: Undefined class 'AuthResult'. Try changing the name to the name of an existing class, or creating a class with the name 'AuthResult'.
class AuthService {
final FirebaseAuth _auth = FirebaseAuth.instance;
Future signInAnonymously() async {
try {
AuthResult result = await _auth.signInAnonymously();
User user = result.user;
return user;
} catch (e) {
print(e.toString());
return null;
}
}
}