import 'package:cloud_firestore/cloud_firestore.dart';
import 'package: firebase _auth/firebase_auth.dart';
class shocker{
static const String appName = 'Shocker'
static FirebaseAuth firebaseAuth;
static FireStore FireStore;
static FirebaseUser firebaseUser;
}
Asked
Active
Viewed 63 times
-1

Victor Eronmosele
- 7,040
- 2
- 10
- 33
-
What do you mean by "the firebase user and the FireStore isn't responding to the static command" ? – Victor Eronmosele Jun 28 '21 at 22:06
-
It keeps giving that error line when I implement the FireStore and firebase user with a static – Darhnieel Raphael Harnozie Jun 28 '21 at 23:07
-
What does the error line say? – Victor Eronmosele Jun 29 '21 at 00:12
-
Undefined class.... Do you have any idea why that is sir??? – Darhnieel Raphael Harnozie Jun 29 '21 at 06:52
-
1Please show the *exact* error, including which line it's referring to. It's really important that whenever you're asking a question about an error, you make the error itself as clear as possible. – Jon Skeet Jun 29 '21 at 07:11
-
@Jon Skeet... I just did, the FirebaseUser shown there shows undefined class even after I imported the firebase_auth dependency into the dart file – Darhnieel Raphael Harnozie Jun 29 '21 at 08:34
-
"the FirebaseUser shown there shows undefined class" - where is that stated in the question? Earlier - but still in comments - you told us that you received an "Undefined class" error message, but with no indication of where or which class is shown as being undefined. *Details matter.* – Jon Skeet Jun 29 '21 at 08:38
-
See https://stackoverflow.com/questions/63482162 for FirebaseUser being a problem. (And note that that was the first result for a query of "undefined class FirebaseUser".) – Jon Skeet Jun 29 '21 at 08:38
1 Answers
1
You need to change FireStore
to FirebaseFirestore
.
static FireStore FireStore;
becomes
static FirebaseFirestore firestore;
Check out the Cloud Firestore Usage Documentation: https://firebase.flutter.dev/docs/firestore/usage

Victor Eronmosele
- 7,040
- 2
- 10
- 33