isNull property Null safety

bool isNull

Checks whether the String is null.

Example 1

String? foo;
bool isNull = foo.isNull; // returns true

Example 2

String foo = 'fff';
bool isNull = foo.isNull; // returns false

Implementation

bool get isNull {
  return this == null;
}