May 14, 2025
Create Firebase Project:
crud_tutorial.Connect Firebase to Flutter Project:
Firebase login.flutter Pub Global activate flutterfire_cli.flutterfire configure, selecting the newly created project and targeting both Android and iOS.flutter Pub add Firebase core.WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
Create Firestore Database:
MaterialApp structure with a homepage.services folder and a firestore_service.dart file.notes collection.Create A Note
TextController.addNote method and update the UI.Read Notes
getNotesStream method using a stream to listen for database changes.ListView within a StreamBuilder.Update Notes
openNoteBox to handle both create and update functionalities.updateNote method to modify existing notes.Delete Notes
deleteNote function to remove notes.