FeatureSet class abstract

An unordered collection of Feature objects.

Constructors

FeatureSet.forTesting({String sdkVersion, List<Feature> additionalFeatures})
Computes a set of features for use in a unit test. Computes the set of features enabled in sdkVersion, plus any specified additionalFeatures.
factory
FeatureSet.fromEnableFlags(List<String> flags)
Computes the set of features implied by the given set of experimental enable flags.
factory
FeatureSet.fromEnableFlags2({required Version sdkLanguageVersion, required List<String> flags})
Computes the set of features implied by the given set of experimental enable flags.
factory
FeatureSet.latestLanguageVersion()
Computes the set of features for the latest language version known to the analyzer, without any experiments. Use it only if you really don't care which language version you want to use, and sure that the code that you process is valid for the latest language version.
factory

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

isEnabled(Feature feature) bool
Queries whether the given feature is contained in this feature set.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restrictToVersion(Version version) FeatureSet
Computes a subset of this FeatureSet by removing any features that are not available in the given language version.
toString() String
A string representation of this object.
inherited

Operators

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