flutter-clutter / flutter-simple-edge-detection

A Flutter plugin enabling the user to detect edges of a given image. It returns the relative coordinates of the detection rectangle.
71 stars 47 forks source link

Error while executing in iOS #28

Open deathg0d opened 3 years ago

deathg0d commented 3 years ago

I am getting the following error in iOS any idea why? It is running fine on android:

Runner[7479:569477] [VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: type 'List<dynamic>' is not a subtype of type 'FutureOr<EdgeDetectionResult>'
#0      EdgeDetector._subscribeToPort.<anonymous closure> (package:appname/pages/image_manipulation/edge_detector.dart:64:26)
<asynchronous suspension>

This code on line 64 of edge_detector is:

  Future<T> _subscribeToPort<T>(ReceivePort port) async {
    StreamSubscription sub;

    var completer = new Completer<T>();

    sub = port.listen((result) async {
      await sub?.cancel();
      completer.complete(await result); // <- HERE
    });

    return completer.future;
  }

App is compiling fine, but whenever edge detection is triggered, the above error occurs.

KittuPatel commented 2 years ago

facing the same issue! @flutter-clutter please have a look at this.

halitince7 commented 21 hours ago

same issue