byTypeLocation<T extends Widget> method

TapTarget byTypeLocation<T extends Widget>()

Returns a TapTarget centered on the first match for widget type T.

Implementation

TapTarget byTypeLocation<T extends Widget>() {
  final match = firstByType<T>();
  if (match == null) {
    throw StateError('No mounted element found for type $T');
  }
  return _ElementTapTarget(match);
}