Flutter判断是否是Web端
2020-03-12 本文已影响0人
倪大头
// 判断是否是web端
const bool kIsWeb = identical(0, 0.0);
Web端好像不支持 Platform.isIOS 这种判断方式,运行会报错:
Unsupported operation: Platform._operatingSystem
// 判断是否是web端
const bool kIsWeb = identical(0, 0.0);
Web端好像不支持 Platform.isIOS 这种判断方式,运行会报错:
Unsupported operation: Platform._operatingSystem