Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Feb 19, 2025
1 parent ef460b6 commit 46292f9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/html_web.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export 'html.dart';
export 'src/html_web.dart' show HtmlProviderWeb;
export 'src/web/html_web.dart' show htmlProviderWeb;
export 'src/web/platform.dart' show htmlProviderWeb;
1 change: 1 addition & 0 deletions lib/src/web/platform.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export 'platform_stub.dart' if (dart.library.js_interop) 'platform_web.dart';
4 changes: 4 additions & 0 deletions lib/src/web/platform_stub.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import '../../html.dart';

/// Web only
HtmlProvider get htmlProviderWeb => throw UnsupportedError('Web only');
1 change: 1 addition & 0 deletions lib/src/web/platform_web.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export 'html_web.dart' show htmlProviderWeb;
5 changes: 4 additions & 1 deletion test/universal_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ void testMain(HtmlProvider html) {
expect(htmlTidyDocument(doc), [
'<!DOCTYPE html>',
'<html>',
'<head></head>',
'<head>',
'\t<meta charset="utf-8">',
'\t<title></title>',
'</head>',
'<body></body>',
'</html>'
]);
Expand Down

0 comments on commit 46292f9

Please sign in to comment.