I want build app flutter on web but I get error when I run
flutter run -d chrome
error
Error: Unsupported operation: Platform._operatingSystem
at Object.throw_ [as throw] (http://localhost:55259/dart_sdk.js:5334:11)
at Function._operatingSystem (http://localhost:55259/dart_sdk.js:56144:17)
at Function.get operatingSystem [as operatingSystem] (http://localhost:55259/dart_sdk.js:56190:27)
at get _operatingSystem (http://localhost:55259/dart_sdk.js:56103:27)
at Function.desc.get [as _operatingSystem] (http://localhost:55259/dart_sdk.js:5839:17)
at Function.get operatingSystem [as operatingSystem] (http://localhost:55259/dart_sdk.js:56056:26)
at main$ (http://localhost:55259/packages/doxaspc/main.dart.lib.js:205:48)
at main$.next (<anonymous>)
at http://localhost:55259/dart_sdk.js:39032:33
at _RootZone.runUnary (http://localhost:55259/dart_sdk.js:38889:58)
at _FutureListener.thenAwait.handleValue (http://localhost:55259/dart_sdk.js:33875:29)
at handleValueCallback (http://localhost:55259/dart_sdk.js:34435:49)
at Function._propagateToListeners (http://localhost:55259/dart_sdk.js:34473:17)
at _Future.new.[_completeWithValue] (http://localhost:55259/dart_sdk.js:34315:23)
at async._AsyncCallbackEntry.new.callback (http://localhost:55259/dart_sdk.js:34338:35)
at Object._microtaskLoop (http://localhost:55259/dart_sdk.js:39176:13)
at _startMicrotaskLoop (http://localhost:55259/dart_sdk.js:39182:13)
at http://localhost:55259/dart_sdk.js:34689:9
function main of me
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(MyApp());
}
I have build a app android and it work good. but when I want anable web see error above
please show me how fix it?
Aucun commentaire:
Enregistrer un commentaire