Now that we get sky.Image callbacks synchronously, we were actually figuring in
the width and height of images the second time the drawer opened in the Stocks
app. That exposed a bug in our RenderImage layout code whereby it would ignore
the _width and _height properties when the image was non-null.
This patch converts sky.Paint to be a pure Dart object, which means we don't
need to open a weak handle to sky.Paint. Avoiding the weak handle reduces the
amount of weak handle callbacks we need to process at the end of GC and
therefore reduces jank.
Added a ScrollListener listener to Scrollable. The ScrollListener runs each time the Scrollable's scrollOffset changes. This can be used to keep overlay widgets in sync with a Scrollable below them.
Removed the Scrollable ScrollClient API. It was no longer used and was clumsy to use as a ScrollListener.
Added global function findScrollableAncestor() to scrollable.dart.
Added examples/widgets/overlay_geometry.dart. The app's Scaffold is contained by a Stack. The Stack is used to display green overlay "Markers" at the corners of the most recently selected list item and where the corresponding tap occurred. The app uses widget.localToGlobal() to compute the global overlay positions of the markers. The ScrollListener is used to keep the markers' positions up to date.
Using ImageResource solves two problems:
1) Listeners can be notified synchronously when the sky.Image is already
available. This change removes flash of 0x0 layout when moving an
already-cached image around in the render tree.
2) In the future, when we support animated images, we can notify listeners
multiple times whenever a new image is available.
This patch simplifies the SkPicture we generate for Skia. Instead of drawing
everything into a nested SkPicture, we now draw everything into the top-level
picture, which requires us to apply the device scale factor in Dart.
If you tap multiple tabs in a row, the tab animation used to snap to the
last selected tab when starting a new animation. Fix that.
Also use the BuilderTransition so we don't have to rebuild the tab bar
every frame.
There were two problems:
1) When starting the mimic, we put up a bad frame because although we set the
`begin` value of the animation, we were building using the current `value`,
which hadn't been updated.
2) When stoping the mimic, we'd dirty a component during didUnmount, which
wouldn't get cleaned until the next frame. Now we're sure to clean all the
components before leaving flushBuild.