isNonNullable abstract method

bool isNonNullable(
  1. DartType type
)

Return true if the type is a non-nullable type.

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

  • Object, int, bool, Never, Function
  • Any function type
  • Any class type or generic class type
  • FutureOr<S> where S is non-nullable
  • X extends S where S is non-nullable
  • X & S where S is non-nullable

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

Implementation

bool isNonNullable(DartType type);