MyPlatformEx extension

on

Properties

isAndroid → bool

Available on MyPlatform, provided by the MyPlatformEx extension

no setter
isDesktop → bool

Available on MyPlatform, provided by the MyPlatformEx extension

只有真正的桌面平台才为true;原来用_ => true兜底会把web也当成桌面
no setter
isIos → bool

Available on MyPlatform, provided by the MyPlatformEx extension

判断是否为 ios 平台
no setter
isMacos → bool

Available on MyPlatform, provided by the MyPlatformEx extension

no setter
isMobile → bool

Available on MyPlatform, provided by the MyPlatformEx extension

只有移动端系统才为true(web 两者都不是)
no setter

Methods

runInAndroid(VoidCallback call) → Future<void>

Available on MyPlatform, provided by the MyPlatformEx extension

runInAndroidAndIos<T>(Future<T> call()) → Future<T?>

Available on MyPlatform, provided by the MyPlatformEx extension

runInAndroidAndIos2<T>({Future<T?> ios()?, Future<T?> android()?}) → Future<T?>

Available on MyPlatform, provided by the MyPlatformEx extension

runInAndroidAndIos3<T>({T? ios()?, T? android()?}) → T?

Available on MyPlatform, provided by the MyPlatformEx extension

runInIos(VoidCallback call) → Future<void>

Available on MyPlatform, provided by the MyPlatformEx extension