title: How to write a simple test for a Snack Bar in Flutter?
body: <p>I'm surprised no one seems to have asked this before, which means the answer might be obvious, but I have  a screen with a text field and a button. The user enters their email in the text field. Then presses the button to see if the email is in the database. The program then displays a snackbar with 'success' text or 'fail' text (2 second duration).</p>
  <p>Here is my code (5 lines):</p>
  <pre><code>await driver.enterText(field, 'wrongemail@email.com');
  
  var btn = find.widgetWithText(RaisedButton, 'SEND MY PASSWORD');
  
  await driver.tap(btn);
  
  await driver.pump();
  
  expect(find.text( 'E-mail address not found!'), findsOneWidget);
  </code></pre>
  <p>When I use the app in the emulator, everything is fine but in the test the last line throws an error saying that it cannot find the matching widget.  What am I missing?</p>