isIOS static method

bool isIOS(
  1. String platform,
  2. int maxTouchPoints
)

Whether the given navigator values identify an iOS browser.

maxTouchPoints is needed to separate iPadOS 13+ (which reports the desktop MacIntel platform) from real macOS.

Implementation

static bool isIOS(String platform, int maxTouchPoints) {
  return _iosPlatformPattern.hasMatch(platform) ||
      (platform == 'MacIntel' && maxTouchPoints > 1);
}