realtime database firebase flutter code example

Example 1: flutter firebase database medium

FirebaseDatabase.reference().child('recent').child('id').update({'title':'sadab is amazing'   //yes I know.});

Example 2: flutter firebase database

dependencies:  flutter:    sdk: flutter  firebase_database: 1.0.3

Example 3: flutter firebase database medium

//you can use "push" if you want an automated id, I'm giving my document id here.FirebaseDatabase.instance.reference().child('recent').child('id').set({'title': 'Realtime db rocks','created_at': time});

Example 4: flutter firebase database

void createRecord(){  databaseReference.child("1").set({    'title': 'Mastering EJB',    'description': 'Programming Guide for J2EE'  });  databaseReference.child("2").set({    'title': 'Flutter in Action',    'description': 'Complete Programming Guide to learn Flutter'  });}

Tags:

Misc Example