SUMIT SINGH
SUMIT SINGH

Reputation: 41

Undefined name 'DefaultfirebaseOptions'. Try correcting the name to one that is defined, or defining the name

I Got This Weird Error:

"Undefined name 'DefaultfirebaseOptions' "

@override 
    Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Register"),
        ), 
      body:FutureBuilder(
        future: Firebase.initializeApp(
          options: DefaultfirebaseOptions.currentPlatform,
          ),
      builder: (context,snapshot) {
        switch (snapshot.connectionState) {
          case ConnectionState.done:```

Upvotes: 1

Views: 5080

Answers (1)

Md. Yeasin Sheikh
Md. Yeasin Sheikh

Reputation: 63549

You need to set up Firebase on your project. Start with firebase init

Follow this docs

You will get similar to this

enter image description here

then import the file

Upvotes: 4

Related Questions