isInstanceOf function

bool isInstanceOf(
  1. dynamic obj,
  2. Type cls
)

Implementation

bool isInstanceOf(obj, Type cls) {
    return obj.runtimeType == cls;
}