'Flutter web complaining about device_info_plus
I'm getting these logs when I wasn't before (I'm pretty sure):
../../../../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 supports web, but I wonder if this conditional check is failing for some reason:
import 'dart:io' if (dart.library.html) 'dart:html';
Does anyone have any ideas?
Solution 1:[1]
flutter pub cache repair did the job.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user2892437 |
