Last updated:
0 purchases
patapata firebase core
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
copied to clipboard
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';
copied to clipboard
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();
}
copied to clipboard
Contributing #
Check out the CONTRIBUTING guide to get started.
License #
See the LICENSE file
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.