Skip to content

Commit

Permalink
Fix dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Oct 21, 2024
1 parent ec34375 commit 9d96626
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 32 deletions.
8 changes: 0 additions & 8 deletions pkgs/cupertino_http/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
32 changes: 16 additions & 16 deletions pkgs/cupertino_http/lib/src/cupertino_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -885,25 +885,25 @@ class URLSession extends _ObjectHolder<ncb.NSURLSession> {
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);
});
}

Expand Down Expand Up @@ -935,23 +935,23 @@ class URLSession extends _ObjectHolder<ncb.NSURLSession> {
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);
});
Expand Down
8 changes: 0 additions & 8 deletions pkgs/cupertino_http/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/

0 comments on commit 9d96626

Please sign in to comment.