ancestor method

SerializableFinder ancestor ({@required SerializableFinder of, @required SerializableFinder matching, bool matchRoot: false })

Finds the widget that is an ancestor of the of parameter and that matches the matching parameter.

If the matchRoot argument is true then the widget specified by of will be considered for a match. The argument defaults to false.

Implementation

SerializableFinder ancestor({
  @required SerializableFinder of,
  @required SerializableFinder matching,
  bool matchRoot = false,
}) => Ancestor(of: of, matching: matching, matchRoot: matchRoot);