diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index db4a875ff7..5d15cf4a47 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -38,11 +38,3 @@ dev_dependencies: flutter: uses-material-design: true - -dependency_overrides: - ffi: - path: /Users/bquinlan/dart/native/pkgs/ffi/ - ffigen: - path: /Users/bquinlan/dart/native/pkgs/ffigen/ - objective_c: - path: /Users/bquinlan/dart/native/pkgs/objective_c/ diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index e2af108c70..0c4b4c0204 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -885,25 +885,25 @@ class URLSession extends _ObjectHolder { if (onResponse != null) { ncb.NSURLSessionDataDelegate.addToBuilderAsListener(protoBuilder, URLSession_dataTask_didReceiveResponse_completionHandler_: - (session, dataTask, response, completionHandler) { - final exactResponse = URLResponse._exactURLResponseType(response); + (nsSession, nsDataTask, nsResponse, nsCompletionHandler) { + final exactResponse = URLResponse._exactURLResponseType(nsResponse); final disposition = onResponse( - URLSession._(session, + URLSession._(nsSession, isBackground: isBackground, hasDelegate: true), - URLSessionTask._(dataTask), + URLSessionTask._(nsDataTask), exactResponse); - completionHandler.call(disposition); + nsCompletionHandler.call(disposition); }); } if (onData != null) { ncb.NSURLSessionDataDelegate.addToBuilderAsListener(protoBuilder, - URLSession_dataTask_didReceiveData_: (session, dataTask, data) { + URLSession_dataTask_didReceiveData_: (nsSession, nsDataTask, nsData) { onData( - URLSession._(session, + URLSession._(nsSession, isBackground: isBackground, hasDelegate: true), - URLSessionTask._(dataTask), - data); + URLSessionTask._(nsDataTask), + nsData); }); } @@ -935,23 +935,23 @@ class URLSession extends _ObjectHolder { if (onWebSocketTaskOpened != null) { ncb.NSURLSessionWebSocketDelegate.addToBuilderAsListener(protoBuilder, URLSession_webSocketTask_didOpenWithProtocol_: - (session, task, protocol) { + (nsSession, nsTask, nsProtocol) { onWebSocketTaskOpened( - URLSession._(session, + URLSession._(nsSession, isBackground: isBackground, hasDelegate: true), - URLSessionWebSocketTask._(task), - protocol?.toString()); + URLSessionWebSocketTask._(nsTask), + nsProtocol?.toString()); }); } if (onWebSocketTaskClosed != null) { ncb.NSURLSessionWebSocketDelegate.addToBuilderAsListener(protoBuilder, URLSession_webSocketTask_didCloseWithCode_reason_: - (session, task, closeCode, reason) { + (nsSession, nsTask, closeCode, reason) { onWebSocketTaskClosed( - URLSession._(session, + URLSession._(nsSession, isBackground: isBackground, hasDelegate: true), - URLSessionWebSocketTask._(task), + URLSessionWebSocketTask._(nsTask), closeCode, reason); }); diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 301e5252fe..271b110036 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -33,11 +33,3 @@ flutter: macos: ffiPlugin: true sharedDarwinSource: true - -dependency_overrides: - ffi: - path: /Users/bquinlan/dart/native/pkgs/ffi/ - ffigen: - path: /Users/bquinlan/dart/native/pkgs/ffigen/ - objective_c: - path: /Users/bquinlan/dart/native/pkgs/objective_c/