请问Flutter开发的App在请求接口的时候传platform的值怎么说

小趴菜 2022-12-14 239

Flutter这种基本上多端包含了 需要在调用接口的时候判断一下用户设备是ios还是安卓吗?还是说随便传都可以的

最新回复 (2)
  • HeavyRain 2022-12-15
    引用 2
    不能随便传,需要传入正确的平台类型
  • x86 2022-12-15
    引用 3
    PlatformType_UNSET(0),
    PlatformType_iOS(1),
    PlatformType_Android(2),
    PlatformType_Windows(3),
    PlatformType_OSX(4),
    PlatformType_WEB(5),
    PlatformType_WX(6),
    PlatformType_Linux(7),
    PlatformType_iPad(8),
    PlatformType_APad(9);
返回