ardera / flutter-pi

A light-weight Flutter Engine Embedder for Linux Embedded that runs without X11 or Wayland.
MIT License
1.6k stars 160 forks source link

MissingPluginException No implementation found for method openFile #427

Open prattom opened 3 months ago

prattom commented 3 months ago

I am getting following error while running application on raspberry pi. I am using flutterpi_tool 0.3.0

`[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method openFile on channel plugins.flutter.dev/file_selector_linux)

0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332)

#1 MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:520) #2 FileSelectorLinux.openFile (package:file_selector_linux/file_selector_linux.dart:45) #3 ImagePickerLinux.getImageFromSource (package:image_picker_linux/image_picker_linux.dart:103) #4 selectMedia (package:tokenscreen4/flutter_flow/upload_data.dart:205) #5 _HomePageWidgetState.build. (package:tokenscreen4/pages/home_page/home_page_widget.dart:134) `
ardera commented 3 months ago

Unfortunately, the file_selector plugin is not supported with flutter-pi, and right now it's not really possible to support it :/

file_selector (on linux) opens a native GTK+ file picker dialogue in a popup window. Flutter-pi runs without any window manager underneath and also without GTK+, so unfortunately can't make use of that with flutter-pi.

You can implement your own file picker though, or there's probably someone that did that already.