Hello, I'd like to share my experience setting up Firebase with Flutter. This is a simple setup guide that doesn't cover a large project, as the main focus here is specifically on integrating Flutter and Firebase.

  1. FIREBASE FLUTTER SETUP
  2. Login Firebase Console
  3. Create project FLUTTER

After that follow this instruction bellows:

<aside> 💡

flutter pub get firebase_core

flutter pub add firebase_core

flutter pub get

</aside>

<aside> 💡

import 'package:firebase_core/firebase_core.dart'; //optional

WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  print('Firebase initialized!');
  runApp(MyApp());

</aside>

<aside> 💡

npm install -g firebase-tools

add fluterfire into env

dart pub global activate flutterfire_cli

flutterfire config

flutterfire login (if needed)

</aside>

SETUP DATABASE FIREBASE

example setup firebase

example setup firebase

<aside> 💡

flutter pub add firebase_database

</aside>

<aside> 💡

Add manualy on file code ‘firebase_optional.dart’

or

ReRun ‘flutterfire config’ and select the database (follow the instructions).

</aside>