Instead of PointerInputEvent having a "type" field, we now have a
different class for each pointer type.
This has ripple effects throughout the system.
I also did code cleanup in affected files while I was there.
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.
The names are probably less familiar, but more consistent:
- FrameCallback: a callback that is relative to the frame and wants the
frame offset (a duration) as argument.
- addXFrameCallback: adds the given callback to the internal lists/maps.
- scheduleXFrameCallback (currently only X = ""): add the callback, but
also trigger a new frame.
- handleX: the method that is invoked when the event-loop or the frame
calls into the scheduler.
- ensureXYZ: ensure that the callback happens.
Unfortunately there is the ambiguity between a "callback": it can be a
closure, or the action of doing a callback, so we end up with:
ensureBeginFrameCallback, and ensureEventLoopCallback, where
"callback" means the action of being called back.
We use a number of non-public APIs in the test package, which makes our
dependency quite fragile. This patch pins a specific, known-good version. We
should update to the lastest version in a follow-up patch.