ancestorStateOfType method

  1. @Deprecated('Use findAncestorStateOfType instead. ' 'This feature was deprecated after v1.12.1.')
State<StatefulWidget> ancestorStateOfType (
  1. TypeMatcher matcher
)
@Deprecated('Use findAncestorStateOfType instead. ' 'This feature was deprecated after v1.12.1.')

Returns the State object of the nearest ancestor StatefulWidget widget that matches the given TypeMatcher.

This method is deprecated. Please use findAncestorStateOfType instead.

Implementation

// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated(
  'Use findAncestorStateOfType instead. '
  'This feature was deprecated after v1.12.1.'
)
State ancestorStateOfType(TypeMatcher matcher);