I need to customize web app whether it is used on laptop or phone, found ios or android detection, so would it work if I just did:
if (android or ios) {return phone version} else {computer version} ?
SOLUTION solutions below gave me an error, but this package helped me:
https://pub.dev/packages/universal_io
checkOS() {
if (Platform.isAndroid || Platform.isIOS) {
return PhoneVersion;
} else {
return ComputerVersion,
);
}
}
or
log('os: ${Platform.operatingSystem}');