skip to Main Content

I am trying to open the camera and fetch live video, similar to a CCTV camera, on an ARM64-based Ubuntu machine using a Flutter application. However, I am encountering the following error when attempting to access the camera:

>[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: MissingPluginException(No implementation found for method availableCameras on channel plugins.flutter.io/camera)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7)
#1 MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:520:35)
#2 MethodChannelCamera.availableCameras (package:camera_platform_interface/src/method_channel/method_channel_camera.dart:66:52)
#3 main (package:git_camera_example/main.dart:1053:16)
**

I’ve tried using the camera package and various other packages and examples. I even attempted the official example to open the camera provided by Flutter: Flutter Camera Example.

The camera installation is fine and works on the machine, but it’s not functioning within the Flutter app. If anyone has a solution or guidance, please help!

Note : I tried flutter_webrtc, which supports Linux, but I am still facing the same error.

2

Answers


  1. This is because the Camera package is not suitable for flutter Linux:

    Login or Signup to reply.
  2. The error mean that camera package is not provide implementation for Linux. From camera package pub.dev information, this package only support platform:

    • iOS
    • Android
    • Web

    as stated in this Github Issue, camera on linux platform support is still on development.

    But, if you want to experiment with linux camera, after a quick research i found this camera_linux package. I never use it so i don’t know if it’s work or not. I recommend you to wait for official flutter support.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search