Firebase Realtime Database CRUD Operations for Flutter Project

In this post, you will learn about firebase realtime database crud operation for flutter project.

The Firebase realtime database is NoSQL, which means we don’t have the traditional columns and rows.

In the firebase realtime database we can store data in JSON tree structure like below.

firebase-realtime-database-android

In this post we will create an app in which we will perform the CRUD operation of firebase realtime database (Create, Read, Update and Delete).

Firebase Realtime Database CRUD Operations in Flutter

First of all, create a new flutter project and connect it with firebase to use

firebase realtime database in your project.

Below is the detailed video tutorial of How to connect flutter project with firebase.

After this open your pubspec.yaml file and add the below dependencies.

Now create a directory inside lib and name it screens, then creates 3 dart files in the screens directory.

  • fetch_data.dart
  • insert_data.dart
  • update_record.dart

Now start coding the application.

main.dart

insert_data.dart

fetch_data.dart

 

update_record.dart

 

So guys at this point our tutorial is completed and in the above steps we

performed the CRUD operations of Firebase Realtime Database.

Happy Coding…

Written by Hilal Ahmad

One Comment

Leave a Reply
  1. D:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/lib/src/firebase_app.dart:18:25: Error: Member not found: ‘FirebaseAppPlatform.verifyExtends’.
    FirebaseAppPlatform.verifyExtends(_delegate);
    ^^^^^^^^^^^^^

Leave a Reply

Your email address will not be published. Required fields are marked *