These end up not actually being used, currently, because we don't have
generic methods, which you'd need for showDialog() and friends, and we
don't have any way to parameterise a class type at runtime, which you'd
need for MaterialApp routes, but it's a step in the right direction.
Rather than have delayed calls to super.didPop(), which raises my
eyebrow every time I see it, this provides a separate finished()
function to call, and uses the convention that if you want to call it
yourself, you just don't call super.didPop().
- `Scaffold.of(context).showBottomSheet(widget);`
- Returns an object with .closed Future and .close() method.
- Uses a StateRoute to handle back button.
- Take the Navigator logic out of the BottomSheet widget.
- Support showing a sheet while an old one is going away.
- Add Navigator.remove().
This updates the Flutter tools to match the proposed new packaging of artifacts
in the engine release script.
* The GCS URL for artifacts is now gs://mojo/flutter/$revision/$platform
* Categories have been removed from the Artifact class
* All artifacts for a given platform now live in a zip file. If an artifact
is not present in the local cache, then the zip will be downloaded and
extracted.
Note that darwin-x64 artifacts go through a different process that (for now)
continues to use the old format.
This patch improves the repaint strategy for HomogeneousViewport so that the
list itself and every entry in the list has a repaint boundary. That means that
we only record list items as they enter the view.
Many of the widgets that use CustomPaint were spamming repaints because
CustomPaint repaints when the identity of the onPaint callback changes, which
it does every build for StatelessComponents.
This patch changes CustomPaint to use a CustomPainter, similar to the new
custom layout widgets. The CustomPainter has a `shouldRepaint` function along
with its `paint` function. This function gives clients explicit control over
when the custom paint object repaints.
This pattern breaks when using compositing because we need to lift those
operations into the compositing tree. This patch removes all the ones I could
find and adds an assert to help prevent more from getting introduced.
Fixes#191
This patch simplifies PaintingContext with several goals:
1) We now call a callback instead of assuming the caller has a single child to
paint. This change will let us handle render objects that wish to paint more
than one child.
2) We now avoid creating lots of empty picture layers because we don't eagerly
start recording pictures. Instead, we wait for the first caller to touch the
canvas before creating the picture recorder.
3) We now are more consistent about which values have incorporated the painting
offset.
Previously, we were putting a ForcedLayer just below the overlay, but that
causes trouble for routes like the popup menu that want to position themselves
inside the overlay. Instead, I've moved the ForcedLayer down into ModalRoute.
Also, rename ForcedLayer to RepaintBoundary, which is more descriptive of what
this widget does.
Fixes#485
"showSnackBar()" is now a feature of a Scaffold. To get to a Scaffold
you either use a global key (`scaffoldKey.currentState.showSnackBar(...)`),
or you use `Scaffold.of(context)`.
Snack bars no longer have a route. They are entirely managed by the
Scaffold. Fixes#432.
Snack bars now queue up when you have several of them. Fixes#374.
Snack bars now auto-size themselves around their contents. This is step
one towards implementing multiline snack bars.
Snack bars now self-dismiss after some per-snackbar configurable period.
The self-dismissing pauses while a dialog is up above the snackbar (or
anything that uses ModalRoute). To enable this, there's now a
`ModalRoute.of(context)` API that returns the current ModalRoute, and
you will be rebuilt if you asked for this and the route's "current"
status changes. To implement this, the Navigator now rebuilds
unconditionally any time it pushes or pops a route.
Snack bars now use the curves that Android uses for snack bars.
Snack bar contents now fade in.
Now we use a forced layer around the reprojected content of the drawer, which
means we don't have to re-record it during the slide animation. This saves 2ms
per frame.
The total main-thread time for the drawer animation is now 2.0ms.
Now we use a ForcedLayer in the navigator overlay to cache the recording for
each entry in the overlay. This mechanism just caches the display list, not the
underlying pixels.
Also, remove the "dispose" notification in the Layer tree because it was
disposing layer too eagerly. We don't actually need this notification for
anything other than eagerly freeing some C++ memory.
Shadows now render as three seprate MaskFilter.blur components per the most recent Material spec.
The shadows Map was replaced by a similar Map called elevationToShadow with entries that match the 10 elevations specifed by http://www.google.com/design/spec/what-is-material/elevation-shadows.html.
The "level" property (many classes) is now called "elevation", to match the Material spec.
BoxShadow now includes a spreadRadius parameter - as in CSS box-shadow. Renamed the BoxShadow blur property to blurRadius to further align BoxShadow with CSS box-shadow.
Turns out we were assuming that once the global key is gone, our
listener is unregistered. It isn't.
I'm planning on adding a test as part of my nested navigator work.
A common pattern is to use a Positioned with a Sized box to give both an offset
from the edge as well as a fixed size to the child. This patch rolls into into
the Stack layout algorithm for simplicity.
Fixes#250