File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
packages/supabase_flutter/lib/src Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,10 @@ http.Client getPlatformHttpClient() {
23
23
///
24
24
/// It may return `null` because the differentiation for the other platforms
25
25
/// is done in [RealtimeClient] .
26
- WebSocketChannel ? getPlatformWebSocketChannel (String url) {
26
+ WebSocketChannel Function (String url) ? getPlatformWebSocketChannel ( ) {
27
27
if (Platform .isIOS || Platform .isMacOS) {
28
- return AdapterWebSocketChannel (
29
- CupertinoWebSocket .connect (Uri .parse (url)),
30
- );
28
+ return (String url) =>
29
+ AdapterWebSocketChannel (CupertinoWebSocket .connect (Uri .parse (url)));
31
30
}
32
31
return null ;
33
32
}
Original file line number Diff line number Diff line change @@ -120,10 +120,11 @@ class Supabase with WidgetsBindingObserver {
120
120
);
121
121
}
122
122
if (realtimeClientOptions.webSocketTransport == null ) {
123
- final platformWebSocketChannel = getPlatformWebSocketChannel (url );
123
+ final platformWebSocketChannel = getPlatformWebSocketChannel ();
124
124
if (platformWebSocketChannel != null ) {
125
125
realtimeClientOptions = realtimeClientOptions.copyWith (
126
- webSocketTransport: (url, headers) => platformWebSocketChannel);
126
+ webSocketTransport: (url, headers) =>
127
+ platformWebSocketChannel (url));
127
128
}
128
129
}
129
130
_instance._init (
You can’t perform that action at this time.
0 commit comments