getOsVersion abstract method

Future<int> getOsVersion()
inherited

Gets the OS version.

Returns the OS version as an integer (e.g., 30 for Android 11).

This can be useful for conditional logic in tests that need to behave differently based on the OS version.

Example:

final osVersion = await $.native.getOsVersion();
if (osVersion >= 30) {
  // Android 11+ specific behavior
}

Implementation

Future<int> getOsVersion();