isSubtypeOf method

  1. @override
bool isSubtypeOf(
  1. RuntimeType other, {
  2. Object? value,
})
override

Checks if this type is a subtype of other.

Implementation

@override
bool isSubtypeOf(RuntimeType other, {Object? value}) {
  // An enum is a subtype of itself and Object.
  // For now, we don't handle complex type hierarchies involving enums.
  // We might need to look up 'Object' in the environment later.
  return identical(this, other) || other.name == 'Object';
}