isSameType<T, S> function
Checks if the types T and S are equal. Ignore nullability.
Returns true if the types T and S are equal, otherwise returns false.
Implementation
bool isSameType<T, S>() => typeOf<T>() == typeOf<S?>() || typeOf<T>() == typeOf<S>() || typeOf<T?>() == typeOf<S?>() || typeOf<T?>() == typeOf<S>();