We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b846fa commit 08d634cCopy full SHA for 08d634c
tdesign-component/example/lib/main.dart
@@ -1,3 +1,6 @@
1
+// 仅在 Web 平台导入
2
+import 'dart:html' as html if (dart.library.html) 'dart:html';
3
+
4
import 'package:flutter/foundation.dart' show kIsWeb;
5
import 'package:flutter/material.dart';
6
import 'package:flutter/services.dart';
@@ -13,9 +16,6 @@ import 'l10n/app_localizations.dart';
13
16
import 'provider/locale_provider.dart';
14
17
import 'provider/theme_mode_provider.dart';
15
18
-// 仅在 Web 平台导入
-import 'dart:html' as html if (dart.library.html) 'dart:html';
-
19
Future<void> main() async {
20
WidgetsFlutterBinding.ensureInitialized();
21
0 commit comments