isNullable<T> function

bool isNullable<T>()

Returns true if T is a nullable type.

Implementation

// See <https://stackoverflow.com/a/66249380/>.
bool isNullable<T>() => null is T;