xxxxxxxxxx
import 'package:firebase_database/firebase_database.dart';
final DatabaseReference databaseReference = FirebaseDatabase.instance.reference();
void readDataFromDatabase() {
databaseReference.once().then((DataSnapshot snapshot) {
if (snapshot.value != null) {
Map<dynamic, dynamic> map = snapshot.value;
// Process the data using the map
// ...
}
});
}
xxxxxxxxxx
Open the pubspec.
Add your Flutter application to Firebase by clicking on the Android icon.
Add your application's package name as shown in the image below.
You can find your package name in the app-level – build.
Download the google-services.
Paste classpath 'com.
xxxxxxxxxx
Open the pubspec.
Add your Flutter application to Firebase by clicking on the Android icon.
Add your application's package name as shown in the image below.
You can find your package name in the app-level – build.
Download the google-services.
Paste classpath 'com.