Unable to query data from Firebase

Issue I’m trying to retrieve data from Firebase. Here’s my code snippet Future main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); // DatabaseReference ref = FirebaseDatabase.instance.ref(); runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { final

Continue reading

How to write Firebase's instance in Kotlin

Issue @Module @InstallIn(ViewModelComponent::class) class HiltModule { @Provides fun provideAuthentication(): FirebaseAuth = Firebase.auth } Now I’m learning Kotlin. I think if I want to use an instance, I should do it below: @Module @InstallIn(ViewModelComponent::class) class HiltModule { @Provides fun provideAuthentication(){ FirebaseAuth

Continue reading