我得到这些日志时,我不是以前(我很确定):
../../../../Development/flutter/.pub-cache/hosted/pub.dartlang.org/device_info_plus-3.2.3/lib/device_info_plus.dart:88:20: Error: Member not found:
'isAndroid'.
if (Platform.isAndroid) {
^^^^^^^^^
../../../../Development/flutter/.pub-cache/hosted/pub.dartlang.org/device_info_plus-3.2.3/lib/device_info_plus.dart:90:27: Error: Member not found:
'isIOS'.
} else if (Platform.isIOS) {
^^^^^
../../../../Development/flutter/.pub-cache/hosted/pub.dartlang.org/device_info_plus-3.2.3/lib/device_info_plus.dart:92:27: Error: Member not found:
'isLinux'.
} else if (Platform.isLinux) {
^^^^^^^
../../../../Development/flutter/.pub-cache/hosted/pub.dartlang.org/device_info_plus-3.2.3/lib/device_info_plus.dart:94:27: Error: Member not found:
'isMacOS'.
} else if (Platform.isMacOS) {
^^^^^^^
../../../../Development/flutter/.pub-cache/hosted/pub.dartlang.org/device_info_plus-3.2.3/lib/device_info_plus.dart:96:27: Error: Member not found:
'isWindows'.
} else if (Platform.isWindows) {
device_info_plus.dart
支持web,但我想知道这个条件检查是否由于某种原因失败:
import 'dart:io' if (dart.library.html) 'dart:html';
有人有什么想法吗?
flutter pub cache repair
完成了任务。