0

Recently i tried to develop some flutter apps using firebase, and i follow along the tutorial on the youtube how to make connection with it, but i got trouble when in the video, the person hover his cursor to some word, and it showed option for correction and add some library in it, and in my case, there's no option for adding the library, but to make some class or mixin.

Here's mine And This is the tutorial

import 'package:firebase_auth/firebase_auth.dart';
import 'package:get/get.dart';

class AuthController extends GetxController{
  static AuthController instance = Get.find();
  Rx<User?> _user;
 FirebaseAuth auth = FirebaseAuth.instance;

  @override
  void onReady(){
    super.onReady();
    _user = Rx<User?>(auth.currentUser)
  }
}

The problem was in Rx<User?>, i already add the library manually, but still have the same error message

The name 'User' isn't a type so it can't be used as a type argument.

  • the problem is in Rx, User already provided from Firebase_Auth library, but it can't retrieve it, and it makes me to create new class of User. – XYZ.Currate Jun 08 '22 at 02:50

1 Answers1

0

Android studio needs to re index the dependencies. have a look at the solution here (similar case): https://stackoverflow.com/a/24406882/11914081