* Move integration tests to use vm_service_lib
* Turn off debug logging that was accidentally committed
* Run update-packages --force to fix checksum for new dev dependency
* Trim trailing whitespace
This converts existing ## Sample code samples to {@tool sample}...{@end-tool} form.
Also:
1. Fixed a minor bug in analyze-sample-code.dart
2. Made the snippet tool only insert descriptions if the description is non-empty.
3. Moved the Card diagram to before the code sample.
Should fix#22226.
Code introduced in #20890 caused a regression that broke color flooding animations in a BottomNavigationBar that has BottomNavigationBarType.shifting.
The original issue (#19653) dealt with background color changes not occurring until another tab was selected. The result is that the background color instantly changes whenever the state changes and when the widget changes, instead of allowing a new widget to animate the background color change.
This rewrites the sample code analysis script to be a little less of a hack (but still not pretty), and to handle snippets as well.
It also changes the semantics of how sample code is handled: the namespace for the sample code is now limited to the file that it appears in, so some additional "Examples can assume:" blocks were added. The upside of this is that there will be far fewer name collisions.
I fixed the output too: no longer will you get 4000 lines of numbered output with the error at the top and have to grep for the actual problem. It gives the filename and line number of the original location of the code (in the comment in the tree), and prints out the source code on the line that caused the problem along with the error.
For snippets, it prints out the location of the start of the snippet and the source code line that causes the problem. It can't print out the original line, because snippets get formatted when they are written, so the line might not be in the same place.
This stops reading from pipe-to-file log after the build is completed. Attempting to read from pipe-to-file keeps open blocked because nobody is going to write into that pipe.
It's not usual for this not to be set, but it affected at least one user (#23909) and there are a non-zero number of people online saying it's not set. It's better that we don't crash.
Fixes#23909.
`RenderEditable.paint` assumes that if the length of the text fits within the
visible region, then the text will be rendered at the start of the region and be
completely visible. This is not always true, since the text may still be
rendered at an offset if an animation is ongoing when the text begins to fit.
This fixes#22288 and #14121
* Use Xcode build configurations to drive Flutter build mode
* Proper check wrt local_engine, print error if profile mode misisng
* Remove unused code, update tests, fix template problem, update warning
* fix up warning
* add explanatory dev comment
* fix whitespace
* missing words, change lambda arrow to function body
* error indentation
* Test early exits for xcode_backend.sh
* only on macOS, use right test
* Update error messages
* case insensitive compare for build config
* Update gallery podfile
* update projects to add profile configuration
* make compatible with flavors
* add missing plist files
* add FLUTTER_FRAMEWORK_DIR back, set swift version for profile, tell Podfile about profile
Re-landing #23412 with a fix to the PlatformLayer's addToScene signature.
#23412 was broken by the change to Layer done in #23434.
It seemed green as the presubmits were done before #23434 was landed, and when #23412 landed it broke the build.
Reverts #23779
This PR adds the full framework stack (layer->render object->widget, and
service) for embedding iOS views with minimal functionality.
I allowed myself to throw the entire framework stack in one PR since we're mostly
mirroring the structure we already established for embedded Android views, so this PR
is a little bigger than usual. I'm happy to break it down to the
different pieces of the stack if reviewers prefer.
Specifically this PR adds:
* A UiKitView widget for embedding a UIView in the widget tree.
* A RenderUiKitView which is the render object for showing a
UIView.
* A PlatformViewLayer which denotes the position of a UIView in the
layer tree.
* The iOS platform_views system channel client code in services/platform_views.dart
* Splits the fake platform views controller to an Android and iOS
controllers.
TBD in following PRs:
* Plumb the layout direction all the way to the platform view (currently
there is still no engine support for it).
* Integrate with gesture arenas (engine support is still missing as
well).
This adds flutter create --sample which allows users to execute a command which will create a working sample app from samples embedded in the API docs.
The command looks something like this:
flutter create --sample=chip.DeletableChipAttributes.onDeleted mysample
Subcommand output (gradle, adb, etc) is no longer wrapped, and wrapping notices when the terminal column width changes dynamically now.
Fixes#23267.
Fixes#23266.
* Use Xcode build configurations to drive Flutter build mode
* Proper check wrt local_engine, print error if profile mode misisng
* Remove unused code, update tests, fix template problem, update warning
* fix up warning
* add explanatory dev comment
* fix whitespace
* missing words, change lambda arrow to function body
* error indentation
* Test early exits for xcode_backend.sh
* only on macOS, use right test
* Update error messages
* case insensitive compare for build config
* Update gallery podfile
* update projects to add profile configuration
* make compatible with flavors
* add missing plist files
162b2e98c036a8f8c355fd475dbe0db4f4bc886c..7be0217d6796954694753647b7a757b8e3907f64
7be0217d6 Roll back _countryCode assert - breaking change (#6693)
91a019cfd Fix popSystemNavigator (#6691)
2b2fbf0f6 Add Locale.fromSubtags and support for scriptCode. (#6518)
58c8e30e5 Roll src/third_party/skia ab18c8e6cc20..d48b7a881b24 (5 commits) (#6690)
3b17cfb68 Flutter tester default locales (#6689)
96bbd2b36 Roll buildroot to 11a934e99eaa4aa8e278cd2772aff4f51f1f3c41 (#6687)
0e9defbd6 Roll src/third_party/skia 68825776f4b4..ab18c8e6cc20 (11 commits) (#6688)
cc686d7ae Don't populate the external view embedder in PaintContext. (#6686)
ab782faa7 Roll src/third_party/skia 1de48d8040aa..68825776f4b4 (1 commits) (#6685)
c4aa8d343 Roll src/third_party/skia 797197a772b8..1de48d8040aa (2 commits) (#6684)
7352251eb Roll src/third_party/skia 79c96811863f..797197a772b8 (1 commits) (#6683)
3dac47e4d Roll src/third_party/skia 38e4fd0c5654..79c96811863f (1 commits) (#6682)
2f06a53a8 Roll src/third_party/skia b53f1f46982d..38e4fd0c5654 (1 commits) (#6681)
a1d7cad70 Fix inconsistent include syntax (#6680)
236661cd8 Roll src/third_party/skia 3b79aa3a5ad0..b53f1f46982d (13 commits) (#6679)
c4f50611d Roll buildroot to pick up Mac toolchain updates. (#6678)
ba8f6aa71 Handle Windows headers defining ERROR to 0 in log levels. (#6677)
505d2a923 Roll buildroot to pick up updates to custom toolchains. (#6674)
6c2a0b3a6 Undefine ERROR in platform_view_layer.cc (#6675)
55e12993a Update FlutterPlugin.h docs, suppress warning for older API (#6672)
f7970048d Attach and position embedded UIVIews (#6614)
df85722fa Plumb the iOS PlatformViewsController into flow. (#6603)
2bfb893cf iOS Embedding Refactor (#6447)
Luckily this class didn't actually need to extend its superclass, it
only implements the interface. So we can change `extends` to
`implements` and that's close enough, while allowing the class to be
mixed in again.
* Avoid abbreviations
* Sample code for AppBar.leading
* Add a test for OverflowBox/FractionallySizedBox
* Minor wording improvements in the text.
The words "note that" here don't really contribute to the flow.
* Revert "Revert "Run reload asynchronously so that multiple devices can reload in parallel. (#22693)" (#23598)"
This reverts commit 0b68068d6a.
* Fix refreshViews so it sends app-wide(rather than per-isolate) service request.
Sending per-isolate request caused dead-lock in the engine in case of more-than-one ui isolate.
* Added '--check-for-remote-artifacts' option for Flutter Doctor.
This option takes a Flutter engine revision and issues HEAD requests to
determine whether or not artifacts for the provided engine revision are
available from cloud storage. This functionality is needed for the Dart
SDK autoroller to avoid creating a PR to roll the engine into the
framework while artifacts haven't finished building, which would cause
Cirrus tests to fail.
* Revert "[H] Created a variant of InheritedWidget specifically for Listenables (#23393)"
This reverts commit 931328596a.
* Revert "Fix a race condition in vmservice_test.dart (#23529)"
This reverts commit 5e7b0a366b.
Bug #1: These didn't work with directional alignments, due to an error
in the types of the constructor arguments.
Bug #2: Pretty sure RenderSizedOverflowBox never worked at all. As
soon as I wrote a test for it, the test showed that there was a
fundamental bug in its performLayout method: it didn't set
parentUsesSize, but it immediately tried to use the child's size.
* Improve documentation
* Potential performance win in hit testing
Rather than copying the list every time we access `path`, this just
exposes it as an `Iterable`. People who want to copy it can use
`toList()`.
(This isn't a breaking change since code that expects a `List` is
still going to get one.)
* Enforce the Oxford Comma.
* Revert "Revert "make LocalHistoryRoute a proper super-mixin (#23382)" (#23430)"
This reverts commit 3bbb3082b8.
This relands the LocalHistoryRoute change. The analyzer bug has been fixed.
* mark dartdocs as flaky
* Revert "Remove duplicate code comment in flutter_gallery (#23422)"
This reverts commit 8039620bb4.
* Revert "Add explicit completed status trace to hot reload and restart commands (#23338)"
This reverts commit 245ef023b2.
This creates a custom dartdoc tool that will generate snippet blocks in our API docs that allow the user to copy easily to the clipboard, and will also embed the snippet code into a template to show it in a larger context with an app.
This PR adds the snippet tool, a template, and a couple of HTML skeleton files, one for snippets that are designed to be in an application setting, and one where it simply puts a nice container around existing snippets, making them easier to copy to the clipboard.
Ensure that cached dill files for builds with --track-widget-creation
always have .track. in the file name to avoid mixing transformed and
untransformed kernel files.
Coverage 0.12.3 includes a fix for dart-lang/coverage#194, which was
causing errors on the flutter build bots.
Linter was updated automatically as a side effect of running
`flutter update-packages --force-upgrade`.
* Switch to URIs for breakpoints and unskip tests on Windows
addBreakpointWithScriptUri expects Uris. By coincidence, FS paths work on Mac/Linux but they fail on Windows. One of the issues in the skip comment is fixed, the other one seems not relevant here.
* Apply symlink resolution to all integration tests
The default temp folders we get include symlinks which breaks breakpoints.
* Save 🙄
* Fix typo
Make it possible to disable TextField's default handlers for tap and long press. If enableInteractiveSelection is false then taps no longer move the text caret and long-press no longer selects text and shows the cut/copy/paste menu. Accessibility is similarly limited.
`FlutterDevice.views` is limited by a filter. Pipe this filter up as an
option for the commands that instantiate `FlutterDevice`s. This is the
first change necessary for the CLI tooling to target specific isolates
(#22009).
More work needs to be done after this patch.
* Isolate names are dynamically generated and change every restart.
* This just filters views, not background isolates (`VMService.isolates`).
--track-widget-creation=false to
--track-widget-creation=true
but not when switching from
--track-widget-creation=true
to
--track-widget-creation=false
due to the surprising behavior of Gradle @Optional inputs.
If the scroll is out of range for any reason (for instance, changing scroll physics or manually messing with scroll position), the spring simulation causes the scroll position to slingshot towards the end. Also, before this change, `end` was unused.
aed6b8c46 Roll Dart to ac6d4f7e653deba11d4836768376537893a9e9d6. (#6549)
3ba6270b2 Roll src/third_party/skia 921ec976556c..4b7b2ceb4ad9 (14 commits) (#6550)
If `items` or `onChanged` is null the button will be disabled, the down arrow will be grayed out, and
the new `disabledHint` will be shown (if provided).
Before this PR AndroidView's gestureRecognizers field was a list of
gesture recognizers. This was problematic as when the widget was rebuilt
with the same gesture recognizer instances we would try to re-join the
recognizers to a gesture arena team and crash (as a OneSeqeunceGestureRecognizer
team can only be set once).
With this change, we instead take a set of factories.
This allows AndroidView to create the gesture recognizers just before
adding them to the team, and thus be sure that they are only added once to a
team.
The factories are identified by the type of the object they create, this
allows AndroidView to know when it is given an equivalent set of gesture
recognizer factories, and do nothing in that case.
* Add support for shadows in text.
* Use dart:ui Shadow as base class for Shadows
* Update lerp definition
* Roll engine 3ffa3629523..84fe4a9f7e24e4 - Text Shadows and update goldens for skia roll.
git log 50c2e69daff4e207c54e463d2304139985c7511c..32f417db0d566d354605305cb29c251276fa65ee --oneline --no-merges
32f417db0 Roll tonic to 077be256142ede39a271385907faadf4fcc62a4d. (#6541)
4ee77256c Revert "Roll Dart to 1f4dfce179c8f05c9e48759300a15e671b88cc10 (#6515)" (#6537)
964acafeb Roll src/third_party/skia 646d917d3c71..c6a17104ad68 (1 commits) (#6536)
d4bae4ca4 Roll src/third_party/skia 2b2c00f6ec36..646d917d3c71 (1 commits) (#6535)
ff93ccf47 Roll src/third_party/skia 681692726fc0..2b2c00f6ec36 (1 commits) (#6534)
a4161c895 Roll src/third_party/skia 23775a2e9736..681692726fc0 (1 commits) (#6532)
116072e46 Roll src/third_party/skia 7435f2553f53..23775a2e9736 (1 commits) (#6531)
ef0b0f6e9 Roll src/third_party/skia bc7a51e79c5b..7435f2553f53 (1 commits) (#6530)
f46b7b971 Roll src/third_party/skia b28db529c866..bc7a51e79c5b (1 commits) (#6529)
9033c3902 Roll src/third_party/skia 7e67041a1428..b28db529c866 (1 commits) (#6528)
e6887a412 Add missing imports for unicode/utf16.h (#6524)
1242f6dfe Roll src/third_party/skia d38382d060ca..7e67041a1428 (2 commits) (#6527)
a1bbea77c Add a no-op platform view layer. (#6505)
2bb3afad8 Roll src/third_party/skia 21bd60daa3f3..d38382d060ca (10 commits) (#6526)
75e875240 Fix the Mac embedder build (#6525)
436f9707b Add version check for dismissable (#6522)
7767c785b Provide a default GL function resolver in the embedder (#6523)
32841dd89 Case-insensitive matching of family names for custom fonts (#6519)
a9076c7e6 Roll src/third_party/skia 419709dbb167..21bd60daa3f3 (11 commits) (#6520)
f2e7441b5 An API for loading fonts from a buffer provided by the application (#6508)
05aac0f27 fix ResourceExtractor npe. (#6461)
cf5a2a145 Roll src/third_party/skia b27a9cf2f4a8..419709dbb167 (16 commits) (#6517)
84fe4a9f7 Re-revert invalid line height tests (#6516)
5f529566c Add support for text shadows (#6385)
e44c10c96 Reland "Share engine layers with the framework" (#6412) (#6468)
ba0449971 Roll Dart to 1f4dfce179c8f05c9e48759300a15e671b88cc10 (#6515)
TextTheme.apply was incorrectly applying displayColor to the TextTheme's headline, title, subhead, body1, and body2 TextStyle colors. In all cases it should have been bodyColor.
Users can set `PaintingBinding.decodedCacheRatioCap` to control the max
amount of memory used per image to avoid decoding frames each animation
loop.
This depends on flutter/engine#6310.
Fixes#20998, and fixes#14344
Service extensions can only be activated in debug or profile mode, their code should never be included in release mode. This PR adds guards around all service extension registration calls that enable Dart's tree shaker to remove the extension's code in release mode, which reduces our binary size:
Android Snapshot (uncompressed): minus 127,384 Bytes (-124.40KB)
APK (compressed): minus 38,136 Bytes (-37.24KB)
iOS Snapshot (App.framework, uncompressed): 264,304 Bytes(-258.10KB)
For details: https://docs.google.com/document/d/13JlgvliCn5sWwT2K2SfDwD1NhEfxpJH9DCf22gZZru8/edit
**Benchmark Regressions:** This PR may cause benchmarks to regress because it may change the timing of GC. If you notice a benchmark regression **please note down the exact set of benchmarks that regressed on this PR** and then feel free to revert. I will follow-up with a PR that forces a GC before the effected benchmarks run to get a clean baseline before re-applying this PR.
Goldens updated due to Skia AA changes. We previously also made a mistake by having a golden test run on MacOS.
git log 3ffa36295234..50c2e69da --no-merges --oneline
50c2e69da Roll src/third_party/skia 1b62fad4b188..b27a9cf2f4a8 (1 commits) (flutter/engine#6514)
8757bf2a1 Roll src/third_party/skia 05caa69a3f5a..1b62fad4b188 (2 commits) (flutter/engine#6513)
c2fd10ad1 Roll src/third_party/skia 2a138544646d..05caa69a3f5a (1 commits) (flutter/engine#6512)
For G3 Roll:
* Revert "MaterialButton must honor its minWidth and height parameters (#22919)"
This reverts commit a02332335a.
* Revert "Update uses of ButtonTheme.bar: pass along the current Theme's colorScheme (#22827)"
This reverts commit 655bf6a290.
* Revert "ButtonTheme.of().colorScheme defers to Theme (#22880)"
This reverts commit a590940e45.
* Revert "Bring TextTheme into alignment with the current Material spec (#22330)"
This reverts commit 8bfb4b3ee5.
* Revert "Added ColorScheme, updated ThemeData, ButtonTheme, material buttons (#22013)"
This reverts commit eea3465ae7.
* Manual adjustments to fix reversion issues.
This attempts to re-land #22656.
There are two changes from the original:
I turned off wrapping completely when not sending output to a terminal. Previously I had defaulted to wrapping at and arbitrary 100 chars in that case, just to keep long messages from being too long, but that turns out the be a bad idea because there are tests that are relying on the specific form of the output. It's also pretty arbitrary, and mostly people sending output to a non-terminal will want unwrapped text.
I found a better way to terminate ANSI color/bold sequences, so that they can be embedded within each other without needed quite as complex a dance with removing redundant sequences.
As part of these changes, I removed the Logger.supportsColor setter so that the one source of truth for color support is in AnsiTerminal.supportsColor.
* Turn on line wrapping again in usage and status messages, adds ANSI color to doctor and analysis messages. (#22656)
This turns on text wrapping for usage messages and status messages. When on a terminal, wraps to the width of the terminal. When writing to a non-terminal, wrap lines at a default column width (currently defined to be 100 chars). If --no-wrap is specified, then no wrapping occurs. If --wrap-column is specified, wraps to that column (if --wrap is on).
Adds ANSI color to the doctor and analysis output on terminals. This is in this PR with the wrapping, since wrapping needs to know how to count visible characters in the presence of ANSI sequences. (This is just one more step towards re-implementing all of Curses for Flutter. :-)) Will not print ANSI sequences when sent to a non-terminal, or of --no-color is specified.
Fixes ANSI color and bold sequences so that they can be combined (bold, colored text), and a small bug in indentation calculation for wrapping.
Since wrapping is now turned on, also removed many redundant '\n's in the code.
We decided that redefining the default for templates was premature. We're going to go back to having "module" in experimental land again, and we'll try again when we have the feature set fully baked.
This keeps the writing of the .metadata files, and writing the template type to them, because that was a good improvement, and there are still a bunch of added tests that improve our coverage.
* Allow passing a restart reason through to analytics
* Update to avoid overlaps with other code
* Remove TODO as this is the real live value
* Improve formatting + constant name
Reverts flutter/flutter#22837
Try to fix application_test
* Revert "Add a profile build type to the app template (#22837)"
This reverts commit 3b248fdc11.
* Refactor AnimatedSwitcher
This is mostly just a little bit of cleanup with hopefully no semantic
changes, done to teach me how the code works so that I could fix a bug.
* Add debugging information to AnimatedSwitcher
* Fix AnimatedSwitcher to handle the case of back-to-back changes
Previously, if a child was replaced the very next frame after it was
added, we'd get confused because we tried to reverse the controller,
which causes us to remove the child from the going-away list, before
we had added the child to the list in the first place.
The fix is just to move the reverse to after the add.
Adds a Fuchsia compatibility function that allows for connecting to a
specific Isolate by name when running Flutter Driver on a Fuchsia
device. This will check over multiple Dart VM's in an attempt to find
an Isolate by its name.
* Adds comments clarifying the procedure used to render the menu as well as tests verifying various dropdown menu button positioning and initial scroll states.
Fixes a gradle error where it was failing to find a plugin because of an absolute path in the .flutter-plugins file instead of a relative path.
I had originally removed this variable because I thought it was redundant with the projectDir, but apparently I was wrong about that (one resolves to a relative path, and one resolves to an absolute path).
This PR reverts that part of the change and reintroduces the (not really) redundant variable.
This turns on text wrapping for usage messages and status messages. When on a terminal, wraps to the width of the terminal. When writing to a non-terminal, wrap lines at a default column width (currently defined to be 100 chars). If --no-wrap is specified, then no wrapping occurs. If --wrap-column is specified, wraps to that column (if --wrap is on).
Adds ANSI color to the doctor and analysis output on terminals. This is in this PR with the wrapping, since wrapping needs to know how to count visible characters in the presence of ANSI sequences. (This is just one more step towards re-implementing all of Curses for Flutter. :-)) Will not print ANSI sequences when sent to a non-terminal, or of --no-color is specified.
Fixes ANSI color and bold sequences so that they can be combined (bold, colored text), and a small bug in indentation calculation for wrapping.
Since wrapping is now turned on, also removed many redundant '\n's in the code.