skip to Main Content

Flutter code doesn't run when firebase is initialized

So I have this code when I run it without initializing firebase; it works, but once I initialize firebase on the main.dart, it returns a black screen and some error: Error: Error: Assertion failed: file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-2.0.2/lib/src/firebase_core_web.dart:228:11 C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49 throw_ C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 29:3…

VIEW QUESTION

Kotlin coroutine with firebase functions

I was having a problem implementing the Firebase anonymous sign-in function with Kotlin coroutine. Following is the code for that: Repository.kt suspend fun getUserId(){ firebaseHelper.getUserId().collect{ if (it == "Successful"){ emit(it) } else { emit("Task unsuccessful") } } } FirebaseHelper.kt fun…

VIEW QUESTION
Back To Top
Search