toString method

  1. @override
String toString(
  1. {bool describeSelf = false}

A string representation of this finder or its results.

By default, this describes the results of the search in order to play nicely with expect and its output when a failure occurs. If you wish to get a string representation of the finder itself, pass describeSelf as true.


String toString({bool describeSelf = false}) {
  if (describeSelf) {
    return 'A finder that searches for ${describeMatch(Plurality.many)}.';
  } else {
    if (!hasFound) {
    return found.toString();