features property
What this device can do — every optional capability, as one set.
The one place to ask; the supportsX getters it replaced are gone since
1.0. A feature this version of the contract does not name cannot be in
it; a feature it names and this device lacks answers false, and every
call that feature gates throws UnsupportedCapabilityException.
A mixin is a capability too, and the two agree. Three capabilities
are types a device opts into rather than members every device carries:
EncodedImageUpload, SynchronousBufferReadback (from
package:flutter3d_hardware/testing.dart, not the main library) and the
RenderBundleEncoder an encoder mixes in. Each is asked with is, and
where a DeviceFeature names the same thing
(DeviceFeature.synchronousReadback, DeviceFeature.renderBundles) a
device lists the feature exactly when it is the type. A mixin is used
where the capability is a member with no honest refusal for most
devices; a feature is used where every device carries the member and
the ones without it refuse.
Implementation
@override
DeviceFeatures get features => _features;