endsWith method

void endsWith(
  1. String field,
  2. String value
)

You can invoke this method to add a query condition in which the value of a field of the String or Text type in an entity class ends with a specified substring.

Supports the following data types:

  • String for String, and Text.

Implementation

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