checkCellular method

Future<CellularCheckResult> checkCellular({
  1. String host = 'www.apple.com',
  2. int port = 443,
  3. double timeoutSeconds = 5.0,
})

Supported on iOS only. Runs the passive + active cellular checks and returns a CellularCheckResult. Use .hasActiveMobileData for a simple "active mobile data" gate.

Implementation

Future<CellularCheckResult> checkCellular({
  String host = 'www.apple.com',
  int port = 443,
  double timeoutSeconds = 5.0,
}) async {
  final map = await SimDataPlatform.instance.checkCellular(
    host: host,
    port: port,
    timeoutSeconds: timeoutSeconds,
  );
  return CellularCheckResult.fromMap(map ?? const {});
}