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
- drag and drop was using the wrong draggables (long press vs short
press).
- navigation.dart wasn't using material correctly and so was ending up
with some red text.
- piano wasn't followig our style guide even a little.
- date picker was not scrollable.
PageRoute is now MaterialPageRoute.
This also changes the following:
- Now the HeroController is a Navigator observer, rather than a feature
of HeroPageRoutes, which are gone. This means heroes can work between
any kind of ModalRoute now.
- ModalPageRoute is moved from modal_barrier.dart to routes.dart.
- It allows routes to opt-out of their modal barrier being a shortcut to
popping the route.
- Features of PageRoute that aren't Material-specific get promoted to
ModalRoute features: storage, the subtree key, offstageness...
The AnimatedModalBarrier is still a ModalRoute feature.
Safely clear SnackBack and BottomSheet placeholders
Correct one stocks demo bug: displaying the stock symbol viewer (single tap on a row) while a BottomSheet or SnackBar was up, would assert.
Thep SnackBack and BottomSheet placeholder keys are cleared when they're obscured by a route with an opaque OverlayEntry. So in that case there's no need to try and clear the placeholder's child again.
Prior to this patch, MultiChildLayoutDelegate couldn't be re-entered because it
cleared _idToChild when unwinding its stack. Now we restore the previous value
of _idToChild when we unwind.
Now we use a zero-width space to force the engine to resolve the font and tell
us how large the text is likely to be once there's text in the widget.
Fixes#302
Make sure to send tapcancel when the primary pointer fails because of
slop, even if the gesture won by default.
Also, minor cleanup and clarification of an invariant.
- Drop the unused BindingHitTestEntry class. (Well, it was
constructed, but its member was never used, so it wasn't doing
anything a boring old HitTestEntry couldn't already do.)
- Add toString()s to HitTestEntry and HitTestResult, to aid in
debugging hit-test related code.
When we reactivate a subtree that had a global key, we weren't updating the
parent data because:
1) The child wasn't in the tree when we updated the parent data element.
2) The activated child didn't go through mount (just through update).
This patch moves the parent data update work to when we attach the render
object, which we do both during mount and when reactivating a child.
Fixes#345
Other changes in this patch:
- Make the 'flutter' tool say "Updating flutter tool..." when it calls
pub get, to avoid confusion about what the pub get output is about.
- Make the bash flutter tool call pub get when the revision has
changed. (This was already happening on Windows.)
- Fix a raft of bugs found by the analyzer.
- Fix some style nits in various bits of code that happened to be near
things the analyzer noticed.
- Remove the logic in "flutter test" that would run "pub get", since
upon further reflexion it was determined it didn't work anyway.
We'll probably have to add better diagnostics here and say to run the
updater script.
- Remove the native velocity tracker script, since it was testing code
that has since been removed.
Notes on ignored warnings:
- We ignore warnings in any packages that are not in the Flutter repo or
in the author's current directory.
- We ignore various irrelevant Strong Mode warnings. We still enable
strong mode because even though it's not really relevant to our needs,
it does (more or less accidentally) catch a few things that are
helpful to us.
- We allow CONSTANTS_LIKE_THIS, since we get some of those from other
platforms that we are copying for sanity and consistency.
- We allow one-member abstract classes since we have a number of them
where it's perfectly reasonable.
- We unfortunately still ignore warnings in mojom.dart autogenerated
files. We should really fix those but that's a separate patch.
- We verify the actual source file when we see the 'Name non-constant
identifiers using lowerCamelCase.' lint, to allow one-letter variables
that use capital letters (e.g. for physics expressions) and to allow
multiple-underscore variable names.
- We ignore all errors on lines that contain the following magic
incantation and a "#" character:
// analyzer doesn't like constructor tear-offs
- For all remaining errors, if the line contains a comment of the form
// analyzer says "..."
...then we ignore any errors that have that "..." string in them.