debugOverrideVersions static method
Pretends the running OS has these major versions, so a test can check the version gates (e.g. macOS 15, where shouldUseNativeGlass is false but shouldUseNativeControls is true). Platform itself is not changed. Call reset afterwards.
Implementation
@visibleForTesting
static void debugOverrideVersions({int? iosVersion, int? macOSVersion}) {
_cachedIOSVersion = iosVersion;
_cachedMacOSVersion = macOSVersion;
_isInitialized = true;
}