isAppleOS method

bool isAppleOS(
  1. BuildContext context
)

Whether the current platform is Apple OS. 当前平台是否苹果系列系统 (iOS & MacOS)

Implementation

bool isAppleOS(BuildContext context) {
  switch (Theme.of(context).platform) {
    case TargetPlatform.iOS:
    case TargetPlatform.macOS:
      return true;
    default:
      return false;
  }
}