Skip to content

Error while executing in iOS #28

@deathg0d

Description

@deathg0d

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions