PlatformVersion class

Utility class for checking OS version with caching.

This class provides cached version detection to avoid repeated method channel calls. The version is fetched once and cached for the lifetime of the application.

Constructors

PlatformVersion()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

iosVersion int?
Gets the cached iOS major version, or null if not iOS or not initialized.
no setter
isIOS26OrLater bool
Checks if the current iOS version is 26 or later.
no setter
isMacOS26OrLater bool
Checks if the current macOS version is 26 or later.
no setter
macOSVersion int?
Gets the cached macOS major version, or null if not macOS or not initialized.
no setter
shouldUseNativeGlass bool
Checks if Liquid Glass effects should use native platform views.
no setter
supportsLiquidGlass bool
Checks if the platform supports native Liquid Glass effects.
no setter
supportsSFSymbols bool
Checks if the platform supports native SF Symbol rendering.
no setter

Static Methods

initialize() Future<void>
Initializes version detection by fetching and caching the OS version.
reset() → void
Forces a refresh of the cached version (useful for testing).