isNullableType<T> function

bool isNullableType<T>()

Implementation

bool isNullableType<T>() {
  try {
    // ignore: unused_local_variable, prefer_const_declarations
    final T val = null as T;
  } catch (e) {
    return false;
  }

  return true;
}