File tree Expand file tree Collapse file tree 3 files changed +17
-11
lines changed
packages/supabase/lib/src Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 11import 'package:supabase/src/version.dart' ;
2- import 'dart:io' show Platform;
3-
4- const bool kIsWeb = bool .fromEnvironment ('dart.library.js_util' );
2+ import 'platform_stub.dart' if (dart.library.io) 'platform_io.dart' ;
53
64class Constants {
7- static String ? get platform {
8- return kIsWeb ? null : Platform .operatingSystem;
9- }
10-
11- static String ? get platformVersion {
12- return kIsWeb ? null : Platform .operatingSystemVersion;
13- }
14-
155 static final Map <String , String > defaultHeaders = {
166 'X-Client-Info' : 'supabase-dart/$version ' ,
177 if (platform != null )
Original file line number Diff line number Diff line change 1+ import 'dart:io' ;
2+
3+ String ? get platform {
4+ return Platform .operatingSystem;
5+ }
6+
7+ String ? get platformVersion {
8+ return Platform .operatingSystemVersion;
9+ }
Original file line number Diff line number Diff line change 1+ String ? get platform {
2+ return null ;
3+ }
4+
5+ String ? get platformVersion {
6+ return null ;
7+ }
You can’t perform that action at this time.
0 commit comments