clearText method

Future<void> clearText(
  1. String id, {
  2. TestStep? step,
  3. Future<void> onBeforeText()?,
})

Implementation

Future<void> clearText(
  String id, {
  TestStep? step,
  Future<void> Function()? onBeforeText,
}) async {
  final finder = assertions.finderForId(id);
  _expectSingleWidget(finder, id, 'clearText');
  await _ensureTextTargetReady(finder, 'clearText');
  await _emitEvidenceBoundary(step);
  await onBeforeText?.call();
  await tester.enterText(finder, '');
  await runtime.settleAfterAction();
}