ConditionalOnDart class

The ConditionalOnDart annotation in Jetleaf allows developers to conditionally process a class or method based on the Dart SDK version.

This annotation evaluates the Dart runtime version using the OnDartCondition condition class. Developers can specify a specific version or a range of versions that must match for the annotated element to be processed.

Usage Example:

@ConditionalOnDart('3.1.0')
class ModernFeaturePod {
  // This pod will only be loaded if the Dart SDK version matches 3.1.0
}
Annotations
  • @Conditional([ClassType<OnDartCondition>()])
  • @Target.new({TargetKind.classType, TargetKind.method})

Constructors

ConditionalOnDart(String version, [VersionRange range = const VersionRange()])
The ConditionalOnDart annotation in Jetleaf allows developers to conditionally process a class or method based on the Dart SDK version.
const

Properties

annotationType Type
Returns the annotation _type of this annotation.
no setter
hashCode int
The hash code for this object.
no setterinherited
range VersionRange
Optional version Range used internally by Jetleaf to evaluate version constraints.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version String
The Dart SDK version required for the annotated element to be processed.
final

Methods

equalizedProperties() List<Object?>
Mixin-style contract for value-based equality, hashCode, and toString.
equals(Object other) bool
Checks whether the given object is logically equivalent to this annotation.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a string representation of this annotation.

Operators

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