isAssignableFrom function

bool isAssignableFrom(
  1. Type target,
  2. Type source
)

Checks if a type is assignable from another type

Implementation

bool isAssignableFrom(Type target, Type source) {
  // Basic type equality check - for more complex inheritance checking,
  // you would need compile-time code generation or manual registration
  return target == source || target == Object || target == dynamic;
}