Reputation: 41
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
Reputation: 63549
You need to set up Firebase on your project. Start with firebase init
Follow this docs
You will get similar to this
then import the file
Upvotes: 4