erase method Null safety

Future<void> erase()

Implementation

Future<void> erase() async {
  await tap();

  while (_text != '') {
    _text = _text.substring(0, _text.length - 1);

    await tester.enterText(_finder, _text);
  }
}