HardwareCapabilities class

Describes which SDK features are expected to be available on this runtime.

This is a lightweight Dart-side capability snapshot. Mobile native calls may still return false when permissions, hardware, or OS settings block a feature at runtime.

Constructors

HardwareCapabilities({required String platform, required bool isWeb, required bool isDesktop, required bool isMobile, required bool camera, required bool audio, required bool bluetooth, required bool location, required bool biometrics, required bool sensors, required bool haptics, required bool storage, required bool health, required bool nativeCameraPreview})
API Documentation for HardwareCapabilities.
const
HardwareCapabilities.current()
Returns a conservative capability snapshot for the current Flutter target.
factory

Properties

audio bool
API Documentation for audio;.
final
biometrics bool
API Documentation for biometrics;.
final
bluetooth bool
API Documentation for bluetooth;.
final
camera bool
API Documentation for camera;.
final
featureMatrix Map<HardwareFeature, HardwareFeatureSupport>
API Documentation for Public member.
no setter
haptics bool
API Documentation for haptics;.
final
hashCode int
The hash code for this object.
no setterinherited
health bool
API Documentation for health;.
final
isAndroid bool
API Documentation for 'android';.
no setter
isDesktop bool
API Documentation for isDesktop;.
final
isIos bool
API Documentation for 'ios';.
no setter
isLinux bool
API Documentation for 'linux';.
no setter
isMacos bool
API Documentation for 'macos';.
no setter
isMobile bool
API Documentation for isMobile;.
final
isWeb bool
API Documentation for isWeb;.
final
isWindows bool
API Documentation for 'windows';.
no setter
location bool
API Documentation for location;.
final
nativeCameraPreview bool
API Documentation for nativeCameraPreview;.
final
platform String
A readable platform name such as android, ios, web, or macos.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sensors bool
API Documentation for sensors;.
final
storage bool
API Documentation for storage;.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
supportFor(HardwareFeature feature) HardwareFeatureSupport
API Documentation for supportFor.
supports(HardwareFeature feature) bool
API Documentation for supports.
toMap() Map<String, Object>
API Documentation for toMap.
toString() String
A string representation of this object.
override

Operators

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