isNullable abstract method

bool isNullable(
  1. DartType type
)

Return true if the type is a nullable type.

We say that a type T is nullable if Null <: T. This is equivalent to the syntactic criterion that T is any of:

  • Null
  • S? for some S
  • FutureOr<S> for some S where S is nullable
  • dynamic
  • void

The result of this method is undefined when the experiment 'non-nullable' is not enabled.

Implementation

bool isNullable(DartType type);