endsWith method

bool endsWith(
  1. Object other, {
  2. bool caseSensitive = true,
})

Returns true if the string ends with other.

Implementation

bool endsWith(Object other, {bool caseSensitive = true}) {
  final v = caseSensitive ? value : value.toLowerCase();
  final t = caseSensitive ? _resolve(other) : _resolve(other).toLowerCase();
  return v.endsWith(t);
}