isSubtype<S, T> method

bool isSubtype<S, T>()

Implementation

bool isSubtype<S, T>() {
  final isSASubtypeOfT = <S>[] is List<T>;
  final isTASubtypeOfS = <T>[] is List<S>;
  return isSASubtypeOfT && !isTASubtypeOfS;
}