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.
- force the time dilation to 1.0 for the Widget tests, so that a local
change doesn't break all the tests during development.
- add missing license block to all the files.
- set ui.window.onBeginFrame to null when you use WidgetTester, so that
the engine doesn't trigger any confusing frames after our fake frames.
Give the StockSymbolView's Hero a Key
The StockSymbolBottomSheet includes a Hero, as does the StockSymbolPage and the StockRow. When two or more heroes with the same tag are gathered together Heros.of() expects them to have distinguishing non-null keys. Now they do.
Fixes#382
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.
Since we don't care about the port, just allow any characters between the spaces after the device ID and the product.
Running Windows 10, running "adb devices -l" with my device attached to the computer gives:
FA34MW904146 device product:cm_m7 model:One device:m7
Which wasn't being matched correctly (no info on USB port).
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
Turns out that ignoring all error lines that match the empty string is a
poor way to go.
Also, we have to update all the example packages now too, since we
analyze them. So just have travis use our update script.
Also, remove flutter_tools' old travis stuff. It's now part of a bigger
repo.
Also, make travis use the dev Dart SDK, since we need the new analyzer.
Stable is way too out of date, e.g. it still complains about libraries
not having names and mixins using 'super', and the strong mode hints are
even more aggressive than on dev.
Some of our workflows have no way to silence analyzer warnings, and the
analyzer doesn't yet support constructor tear-offs, so pretend that we
can't use them for now.
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.