Let MaterialApp.onGenerateRoute return a Route

Also:
 - minor code reindents in places.
 - reset the widget tree between tests.
 - once you generate a route, don't let its builder change
   (previously it would keep changing as the routes table changed).
 - revert the stocks app toolbar-fading-on-forward-transition thing.
This commit is contained in:
Hixie
2015-12-03 12:41:48 -08:00
parent 884b2cf56a
commit df07a69b12
10 changed files with 64 additions and 103 deletions

View File

@@ -21,6 +21,7 @@ class WidgetTester {
clock = async.getClock(new DateTime.utc(2015, 1, 1)) {
timeDilation = 1.0;
ui.window.onBeginFrame = null;
runApp(new ErrorWidget()); // flush out the last build entirely
}
final FakeAsync async;