isNull method Null safety

void isNull(
  1. String field
)

You can invoke this method to add a query condition in which a field in an entity class is null.

Implementation

void isNull(String field) {
  if (field.isEmpty) {
    throw FormatException('field cannot be an empty string.', field);
  }
  _queryElements.add(
    <String, dynamic>{
      _QueryConstants.FIELD: field,
      _QueryConstants.OPERATION: _QueryConstants.IS_NULL,
    },
  );
}