Using the enterText()
method from the WidgetTester.

Note:
  This recipe builds upon previous widget testing recipes.
  To learn the core concepts of widget testing,
  see the following recipes:

Introduction to widget testing

Finding widgets in a widget test

3. Ensure tapping a button adds the todo

After entering text into the TextField, ensure that tapping
the FloatingActionButton adds the item to the list.

This involves three steps:

Tap the add button using the tap() method.

Rebuild the widget after the state has changed using the
pump() method.

Ensure that the list item appears on screen.

4. Ensure swipe-to-dismiss removes the todo

Finally, ensure that performing a swipe-to-dismiss action on the todo
item removes it from the list. This involves three steps: