firstWhere method

IndexedNode firstWhere(
  1. bool test(
    1. IndexedNode element
    ), {
  2. IndexedNode orElse()?,
})
override

Get the first child node that matches the criterion in the test. An optional orElse function can be provided to handle the test is not able to find any node that matches the provided criterion.

Implementation

IndexedNode firstWhere(bool Function(IndexedNode element) test,
    {IndexedNode orElse()?}) {
  return children.firstWhere(test, orElse: orElse);
}