firebase_realtime_helper is helper for firebase realtime database know whether this package might be useful for them.
Features
firebase_realtime_helper is helper for firebase realtime database
Getting started
Configure your project with firebase is prerequisite.
Usage
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:firebase_realtime_helper/firebase_realtime_helper.dart';
void main() async{
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
///For LIST
Zealgrid.getInstance().child('home').getList('list',).then((value){
debugPrint('DATA : ${value}');
if(value.isNotEmpty){
var list = value.map((e) => MyModelClass.fromJson(e)).toList();
debugPrint('DATA ==>> ${list.first.url}');
}
}).catchError((e){
debugPrint('ERROR == ${e}');
});
///For Object
Zealgrid.getInstance()
.getObject('home').then((value){
debugPrint('DATA ${value}');
}).catchError((e){
debugPrint('ERROR getObject ${e}');
});
return MaterialApp(
title: 'FirebaseRealtimeHelper Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: Scaffold(
body: Text('Hello World')
),
);
}
}
Additional information
firebase_realtime_helper is helper for firebase realtime database,which works with firebase.