checkStaticType<V> static method

bool checkStaticType<V>(
  1. dynamic v
)

Checks if the static type V matches the dynamic runtime type of v.

Returns true if types are different (ignoring nullability) and resolvable.

Implementation

static bool checkStaticType<V>(dynamic v) {
  // This is optimized to short-circuit when types are equal.
  return v.runtimeType != V && _checkTypesDiff(v.runtimeType, V);
}