Developer
Developer

Reputation: 789

The named parameter 'options' isn't defined

I am creating an app to send data to database where I am using this piece of code and "The named parameter 'options' isn't defined" this problem is appearing.

final FirebaseApp app = FirebaseApp(
  options: FirebaseOptions(
  googleAppID: '',
  apiKey: '',
  databaseURL: '',
)
);

Upvotes: 2

Views: 1044

Answers (1)

Nick Shrefler
Nick Shrefler

Reputation: 106

Use the documentation: https://pub.dev/documentation/firebase_core/latest/firebase_core/FirebaseApp-class.html

FireBaseApp has a static method named .configure that accepts a String name and FireBaseOptions options that returns an existing unmodified Future<FireBaseApp> or a new configured Future<FireBaseApp> asynchronously.

Upvotes: 1

Related Questions