flutter-clutter/flutter-simple-edge-detection

Error while executing in iOS

Opened this issue · 2 comments

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.

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

same issue