dragDownstreamMobileHandleByDistanceInSuperTextField method
Drags the SuperTextField downstream handle by the given delta and returns the TestGesture used to perform the drag.
By default, this method expects a single SuperTextField in the widget tree and
finds it byType. To specify one SuperTextField among many, pass a superTextFieldFinder.
Implementation
Future<TestGesture> dragDownstreamMobileHandleByDistanceInSuperTextField(
Offset delta, [
Finder? superTextFieldFinder,
]) async {
final fieldFinder =
SuperTextFieldInspector.findInnerPlatformTextField(superTextFieldFinder ?? find.byType(SuperTextField));
final match = fieldFinder.evaluate().single.widget;
if (match is SuperAndroidTextField) {
return _dragAndroidDownstreamHandleByDistanceInSuperTextField(delta, fieldFinder);
}
if (match is SuperIOSTextField) {
return _dragIOSDownstreamHandleByDistanceInSuperTextField(delta, fieldFinder);
}
throw Exception("Couldn't find a SuperTextField with the given Finder: $fieldFinder");
}