isLast<V> function

bool isLast<V>(
  1. Iterable<V> list,
  2. V element
)

Returns a true value if element is the last in the list.

Implementation

bool isLast<V>(Iterable<V> list, V element) {
  return lastOrNull<V>(list) == element;
}