Skip to content

Commit 2d12a6c

Browse files
committed
refactor: remove usage of cupertino client
1 parent 93f3f8f commit 2d12a6c

File tree

4 files changed

+1
-70
lines changed

4 files changed

+1
-70
lines changed

packages/supabase_flutter/lib/src/platform_http_io.dart

Lines changed: 0 additions & 41 deletions
This file was deleted.

packages/supabase_flutter/lib/src/platform_http_web.dart

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/supabase_flutter/lib/src/supabase.dart

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import 'package:supabase_flutter/src/supabase_auth.dart';
1414
import 'hot_restart_cleanup_stub.dart'
1515
if (dart.library.js_interop) 'hot_restart_cleanup_web.dart';
1616

17-
import 'platform_http_io.dart'
18-
if (dart.library.js_interop) 'platform_http_web.dart';
1917
import 'version.dart';
2018

2119
final _log = Logger('supabase.supabase_flutter');
@@ -119,14 +117,6 @@ class Supabase with WidgetsBindingObserver {
119117
),
120118
);
121119
}
122-
if (realtimeClientOptions.webSocketTransport == null) {
123-
final platformWebSocketChannel = getPlatformWebSocketChannel();
124-
if (platformWebSocketChannel != null) {
125-
realtimeClientOptions = realtimeClientOptions.copyWith(
126-
webSocketTransport: (url, headers) =>
127-
platformWebSocketChannel(url));
128-
}
129-
}
130120
_instance._init(
131121
url,
132122
anonKey,
@@ -205,16 +195,10 @@ class Supabase with WidgetsBindingObserver {
205195
...Constants.defaultHeaders,
206196
if (customHeaders != null) ...customHeaders
207197
};
208-
final Client platformHttpClient;
209-
if (httpClient != null) {
210-
platformHttpClient = httpClient;
211-
} else {
212-
platformHttpClient = getPlatformHttpClient();
213-
}
214198
client = SupabaseClient(
215199
supabaseUrl,
216200
supabaseAnonKey,
217-
httpClient: platformHttpClient,
201+
httpClient: httpClient,
218202
headers: headers,
219203
realtimeClientOptions: realtimeClientOptions,
220204
postgrestOptions: postgrestOptions,

packages/supabase_flutter/pubspec.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ dependencies:
2323
shared_preferences: ^2.0.0
2424
logging: ^1.2.0
2525
web: '>=0.5.0 <2.0.0'
26-
cupertino_http: '>=1.4.0 <3.0.0'
27-
web_socket_channel: '>=2.3.0 <4.0.0'
2826

2927
dev_dependencies:
3028
dart_jsonwebtoken: ^2.4.1

0 commit comments

Comments
 (0)