lastWhere method

T lastWhere(
  1. bool function(
    1. T function
    )
)

Returns the last element that satisfies the given predicate function.

  • function: A function that returns true for the desired element.
  • Returns: The last matching element.
  • Throws: A StateError if no element matches.

Implementation

T lastWhere(bool Function(T function) function) => value.lastWhere(function);