I switched myself to Flutter but now I am facing some problems. I have an app in which I am getting this error. trying about 4 hrs ago but didn't come to any solution.
======== Exception caught by widgets library ======================================================= The following UnsupportedError was thrown building LoginScreen(dirty, state: _LoginScreenState#9c2c3): Unsupported operation: Platform._operatingSystem
CodePudding user response:
Some functionalities are unsupported for particular platforms for that platforms you have to code with os check conditions and call native or other package function which is supported by the platform.
CodePudding user response:
I've recently encountered this issue. This error occurs when you're are using a flutter package that is not supported for your platform like some packages only support Android and IOS that you integrated in your code. When you run project in Web this error occurs.
Now solution is, **
Check your packages platform compatibility from pub dev that you're using in your project.
Remove or replace that packages with supported packages.
Alternatively if you don't need that features in specified platform, you can only remove implementation for that platform.**