'MissingPluginException for Linux desktop app

Just added desktop support to my flutter app, it runs fine in the android emulator, but wont render any element in neither browser nor desktop, just a simple blank page without errors.

enter image description here

Here is the error I get in console, not sure if that error is really the problem since its from firebase.

Launching lib/main.dart on Linux in debug mode...
Building Linux application...
Debug service listening on ws://127.0.0.1:40449/v58VaNveMLo=/ws
Syncing files to device Linux...
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core)
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:175:7)
<asynchronous suspension>
#1      MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:363:35)
<asynchronous suspension>
#2      MethodChannelFirebase._initializeCore (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:31:23)
<asynchronous suspension>
#3      MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:73:7)
<asynchronous suspension>
#4      Firebase.initializeApp (package:firebase_core/src/firebase.dart:42:31)
<asynchronous suspension>
#5      main (package:sqlite_provider_starter/main.dart:9:3)
<asynchronous suspension>

Any help appreciated!



Solution 1:[1]

For present time firebase_core package is supported on Android, IOS, MacOS, and Web. It's not supported yet for Linux. Execute your portion of code where you have operations based on that package conditionally according to the host platform.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kerim