isMobile function

bool isMobile(
  1. TargetPlatform platform
)

Implementation

bool isMobile(TargetPlatform platform) {
  switch (platform) {
    case TargetPlatform.android:
    case TargetPlatform.iOS:
    case TargetPlatform.fuchsia:
      return true;
    case TargetPlatform.macOS:
    case TargetPlatform.linux:
    case TargetPlatform.windows:
      return false;
    default:
      // TODO: Other platforms. For TargetPlatform.ohos.pc2in1
      // TODO: ohos.mobile
      return false;
  }
}