Skip to content

Commit

Permalink
refactor: Migrate conditional imports to js_interop (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmigloz committed Jun 10, 2024
1 parent 694ca64 commit a6a78cf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export 'http_client_stub.dart'
if (dart.library.io) 'http_client_io.dart'
if (dart.library.js) 'http_client_html.dart'
if (dart.library.html) 'http_client_html.dart';
if (dart.library.js_interop) 'http_client_html.dart';
3 changes: 1 addition & 2 deletions packages/googleai_dart/lib/src/http_client/http_client.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export 'http_client_stub.dart'
if (dart.library.io) 'http_client_io.dart'
if (dart.library.js) 'http_client_html.dart'
if (dart.library.html) 'http_client_html.dart';
if (dart.library.js_interop) 'http_client_html.dart';
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import 'package:http/http.dart' as http;

export 'http_client_stub.dart'
if (dart.library.io) 'http_client_io.dart'
if (dart.library.js) 'http_client_html.dart'
if (dart.library.html) 'http_client_html.dart';
if (dart.library.js_interop) 'http_client_html.dart';

/// {@template custom_http_client}
/// Custom HTTP client that wraps the base HTTP client and allows to override
Expand Down
3 changes: 1 addition & 2 deletions packages/mistralai_dart/lib/src/http_client/http_client.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export 'http_client_stub.dart'
if (dart.library.io) 'http_client_io.dart'
if (dart.library.js) 'http_client_html.dart'
if (dart.library.html) 'http_client_html.dart';
if (dart.library.js_interop) 'http_client_html.dart';
3 changes: 1 addition & 2 deletions packages/ollama_dart/lib/src/http_client/http_client.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export 'http_client_stub.dart'
if (dart.library.io) 'http_client_io.dart'
if (dart.library.js) 'http_client_html.dart'
if (dart.library.html) 'http_client_html.dart';
if (dart.library.js_interop) 'http_client_html.dart';
3 changes: 1 addition & 2 deletions packages/openai_dart/lib/src/http_client/http_client.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export 'http_client_stub.dart'
if (dart.library.io) 'http_client_io.dart'
if (dart.library.js) 'http_client_html.dart'
if (dart.library.html) 'http_client_html.dart';
if (dart.library.js_interop) 'http_client_html.dart';

0 comments on commit a6a78cf

Please sign in to comment.