I am converting a very basic Flutter mobile project to Flutter_web. I have it running just with the demo screen just fine.
I want to be able to produce a different layout in the browser if I'm running on MacOS/Windows vs Android/IOS.
When I run this project in a browser, the Platform code returns 'android'. I'm using Google Chrome.
I have tried utilizing the Platform library to decipher the currently running OS.
import 'package:flutter_web/io.dart
print("PLATFORM: ${Platform.operatingSystem}");
//This just produces 'android' which is obviously not right
if(Platform.Android || Platform.isIOS){
return Widget();
} else {
return null;
}
I'd like to get an accurate depiction of which Platform I'm running on. Any thoughts? THANK YOU!