patapata_firebase_core 1.0.2 patapata_firebase_core: ^1.0.2 copied to clipboard
This package is a plugin for Patapata that adds support for Firebase to your Patapata app.
Patapata - Firebase Core
Add support for Firebase to your Patapata app.
About #
This package is a plugin for Patapata that adds support for Firebase to your Patapata app.
This plugin itself just initializes Firebase. It does not do anything else itself. You will need to add other plugins to your app to use Firebase features.
Getting started #
-
Follow the instructions for your platform to set up Firebase at https://firebase.google.com/docs/flutter/setup, up until just after executing
flutterfire configure
. -
Add the dependency to your
pubspec.yaml
file
flutter pub add patapata_firebase_core
- Import the package and the settings from your
firebase_options.dart
file
import 'package:patapata_firebase_core/patapata_firebase_core.dart';
import 'firebase_options.dart';
- Activate the plugin
/// This Environment takes Firebase configuration from environment variables.
/// Pass environment variables to your app using the `--dart-define` flag.
class Environment with FirebaseCorePluginEnvironment {
const Environment();
/// The options of Firebase to pass to [Firebase.initializeApp].
/// You can keep this null if you use the old google_services.json method.
/// If you want to support a web project as well, the [FirebaseCorePluginEnvironment.firebaseWebOptions]
/// getter is also available.
@override
Map<TargetPlatform, FirebaseOptions>? get firebaseOptions => {
TargetPlatform.android: DefaultFirebaseOptions.android,
/// etc...
};
}
void main() {
App(
environment: const Environment(),
plugins: [
FirebaseCorePlugin(),
],
)
.run();
}
Contributing #
Check out the CONTRIBUTING guide to get started.