* Change file paths to URIs to fix "Could not run configuration in engine" on Windows
Plus unskip test that was failing due to this.
Fixes#21348.
* Remove unused import
The asset subsystem uses URIs to represent asset locations. The font manifest
should also use URI-encoded paths instead of unencoded paths taken directly
from the manifest YAML.
Fixes https://github.com/flutter/flutter/issues/19452
Eliminates the --snapshot and --depfile parameters from the flutter
bundle command. The snapshot parameter is unused in Dart 2 -- code is
built to kernel .dill files and for profile/release builds, then AOT
compiled.
While depfiles are still used in Dart 2 (e.g. by the kernel compiler),
there are enough assumptions in the code that they lie in the default
location (e.g. in the Gradle build) and no reasons to support
user-cusomisation that it makes sense to eliminate the --depfile option
as well, and always use the default location.
This commit also renames 'depFilePath' to 'depfilePath' for consistency
across the codebase.
This also involves switching from Core JIT to App JIT snapshot, and replacing per-isolate VM snapshot with the shared VM snapshot.
For now there is no separate update bundle file, as the generated update gets packaged directly into the APK for testing purposes.
For retained rendering, we don't want to push the offset down to each leaf layer. Otherwise, changing an offset layer on the very high level could cascade the change to too many leaves, which means that we can't retain them.
To not push the offset downwards, we simply push a TransformLayer when there's an offset. Skia has a fast path for concatenating scale/translation-only matrix so this operation should be fast (no performance regression is measured on Moto G4).
This is our first step towards https://github.com/flutter/flutter/issues/21756
Through some integration testing checks, it looks like it's possible
that connecting to a new instance of the Dart VM may fail even after the
Dart VM instance has been discovered.
This means that _getDartVm should be checked in more than just one
place. This changes the function to return a null value in the event of
a 'well-known' exception (`HttpException` or `TimeoutException`
specifically).
As a result, code now calling _getDartVm checks for null and handles it
as appropriate, and the DartVm RPC calls are all updated with
consistent timeout params.
Contains the following changes:
d80c1de7b (HEAD -> master, upstream/master) Roll src/third_party/skia ab3144c3abb9..656cefe65d62 (11 commits) (#6362)
edf6249e0 Add pushOffset to SceneBuilder (#6349)
3a01f3956 Change log level from ERROR to WARNING (#6361)
5ae470845 Roll src/third_party/skia 227d4e10276c..ab3144c3abb9 (11 commits) (#6360)
763627fff Do not export libdart symbols (#6337)
3052dbd79 SystemNavigator.pop can pop w/o UINavigationController (#6341)
0c096f798 Roll src/third_party/skia b3e48afc936d..227d4e10276c (1 commits) (#6359)
b8c2a17a1 Roll src/third_party/skia cfe1264d7465..b3e48afc936d (3 commits) (#6356)
c589b312a Expose push/popRoute on FlutterViewController (#6347)
075b3fcca Roll src/third_party/skia 5ea41fc89b26..cfe1264d7465 (1 commits) (#6355)
2dd9b99aa Roll Dart to version 808ed6238b9262660e31ea826f7aea6cfa3a3493 (#6354)
5b799381f Dont make any binaries specify an X11 dependency. (#6353)
309ac4e1b V0.8.2 fix compile problem with xcode10 (#6339)
26fdd1e4f Roll src/third_party/skia 5767fc042834..5ea41fc89b26 (3 commits) (#6351)
cc44ca5d0 Perform persistent cache stores on the IO thread outside the frame workload. (#6350)
f2a3df97e Wire up the Skia persistent GPU related artifacts cache. (#6278)
In long lists this resulted in the dropdown scrolling to the very last
item in its list. Now clamping the value at `0.0`. Added a test to
verify that the selected item aligns with the button to test the offset.
Fixesflutter/flutter#15346
* Fix xcode_backend.sh script to support add2app
* Fix ios deployment target. Too old for new Xcode.
* Fix ios host app
* Register plugins with Flutter view
A dSYM file is created for the stripped `App.framework` and placed at `build/aot/App.dSYM`.
Reduces `App.framework` for Flutter Gallery by 6MB uncompressed, minus 23%.
Reduces `App.framework` for Hello World by 1.6MB uncompressed, minus 22%.
Fixes#4287.
Fixes#18693.
Helps with #21813.
See also #12012.
This change depends on https://dart-review.googlesource.com/c/sdk/+/76306.
* Prototype
* Fix paths to Flutter library resources
* Invoke pod install as necessary for materialized modules
* Add devicelab test for module use on iOS
* Remove debug output
* Rebase, reame materialize editable
* Add devicelab test editable iOS host app
* Removed add2app test section
Swap out the moon emoji used for progress spinner for a single-cell character.
The moon emoji looked cool, but couldn't be used because of bugs in xterm.js, used for VSCode's terminal, among others. The moon emoji is two character cells wide, but xterm.js doesn't advance by two cells when it adds the emoji, but does go back by two when it backspaces.
This changes us to a different character animation (dots) that is only one cell wide, and so doesn't have this problem.
* Make CupertinoApp and MaterialApp both use WidgetsApp for Navigator
* Make CupertinoApp and MaterialApp const constructors
* Make WidgetsApp routes aware
* Update tests
This will now make it so that the Dart VM class returns any Isolate that
matches the passed Pattern, without checking for any specific strings
like "main()"
This causes the search to skip over Isolates that would have matched.
* Improve documentation and clean up code.
* Remove "Note that".
The phrase "note that" is basically meaningless as a prefix to an
otherwise fine sentence.
This changes the compiler output for gradle to be less verbose and more easily read.
This only applies to compilation error messages: other gradle messages will continue to print as before.
It also fixes a small problem with the performance measurement printing (see that "7.1s" on it's own line in the original?) so that if something is expected to have multiple lines of output, it prints an initial line, and a "Done" line with the elapsed time, so that it's possible to know what the time applies to.
It also updates the spinner to be fancier, at least on platforms other than Windows (which is missing a lot of symbols in its console font).
Addresses #17307
This adds support to AnsiTerminal for colored output, and makes all tool output written to stderr (with the printError function) colored red.
No color codes are sent if the terminal doesn't support color (or isn't a terminal).
Also makes "progress" output print the elapsed time when not connected to a terminal, so that redirected output and terminal output match (redirected output doesn't print the spinner, however).
Addresses #17307
* Revert "Revert "Add RichText support to find.text" (#22046)"
This reverts commit 8e70421913.
* Revert "Implement Double Tap Handling in TextField and Editable (#21264)"
This reverts commit 02e87334dd.
Thanks @NikoYuwono for getting this working! We appreciate your help!
* Implement Double Tap Handling in TextField and Editable
* Fix test broken by the change and add test for double tap
* Fix affected tests
* Remove unnecessary new
* Fix test
Xcode 10 introduces a new build system which includes stricter checks on
duplicate build outputs.
When plugins are in use, there are two competing build actions that copy
Flutter.framework into the build application Frameworks directory:
1. The Embed Frameworks build phase for the Runner project
2. The [CP] Embed Pods Frameworks build phase that pod install creates
in the project.
Item (1) is there to ensure the framework is copied into the built app
in the case where there are no plugins (and therefore no CocoaPods
integration in the Xcode project). Item (2) is there because Flutter's
podspec declares Flutter.framework as a vended_framework, and CocoaPods
automatically adds a copy step for each such vended_framework in the
transitive closure of CocoaPods dependencies.
As an immediate fix, we opt back into the build system used by Xcode 9
and earlier. Longer term, we need to update our templates and
flutter_tools to correctly handle this situation.
See: https://github.com/flutter/flutter/issues/20685
Add back screenshot extension that was temporarily disabled.
Add matchesReferenceImage matcher to test that the screenshot extension
generates equivalent images to InspectorService.instance.screenshot.
This caused issues for projects without an Xcode workspace. Almost all
Flutter projects in the wild will have a workspace, but this patch needs
to add a check to catch any that lack one.
This reverts commit 021f472efc.
Xcode 10 introduces a new build system which includes stricter checks on
duplicate build outputs.
When plugins are in use, there are two competing build actions that copy
Flutter.framework into the build application Frameworks directory:
1. The Embed Frameworks build phase for the Runner project
2. The [CP] Embed Pods Frameworks build phase that pod install creates
in the project.
Item (1) is there to ensure the framework is copied into the built app
in the case where there are no plugins (and therefore no CocoaPods
integration in the Xcode project). Item (2) is there because Flutter's
podspec declares Flutter.framework as a vended_framework, and CocoaPods
automatically adds a copy step for each such vended_framework in the
transitive closure of CocoaPods dependencies.
As an immediate fix, we opt back into the build system used by Xcode 9
and earlier. Longer term, we need to update our templates and
flutter_tools to correctly handle this situation.
See: https://github.com/flutter/flutter/issues/20685
This is a blocker for Google roll since we are not at dev4.0:
- Future is not yet part of dart:core.
- Future.sync().then<dynamic>... causes failure without the new keyword.
Previously, the engine did not properly pass the AA flag on ClipRect.clipBehavior. flutter/engine#6199 fixes this and enables AA. However, default AA on clipRects has caused severe regressions in benchmark performance.
To maintain expected performance, we should now default the clipBehavior to hardEdge to disable default AA. This is consistent with any flutter projects that did not previously explicitly set the clipBehavior and should not change app appearance.
Replaced about 535 "TBD" translations with the real thing.
Added remainingTextFieldCharacterCountTwo, remainingTextFieldCharacterCountMany, remainingTextFieldCharacterCountFew, to GlobalMaterialLocalizations
* Don't set the `vmServices` member variable until it's fully initialized.
* Add a timeout to the future that sends the 'started' event to the IDE
https://github.com/flutter/flutter/issues/16604
* Ensure that the _childElements map is properly traversed as a sparse list and not inflated with garbage collected children.
* Add tests to ensure Lists/Tabs with KeepAlive children can make large jumps, don't lose children (including after rebuild).
* added shortcuts and delete functionality
* added first test
* afew chnages
* a few changes
* hope this works
* small change
* small changes
* fixed nits
* final changes:
* fixed initializing formals
* update comment
* minor change:
* added line
* final changes
* random change
* changed function to void
* one more
* removed line
* dis betta work
* final change
* actual final chnge
* [Material] Corrects default switch color.
* [Switch] Making black32 a local const.
* [Switch] Tests for default colors.
* [Switch] Correcting number for being over 255.
Now that Dart 1 support has been eliminated, generator should always be
populated to a kernel compiler instance.
Also moves the constructor to the top of the class, and orders final
fields before non-final fields, as dictated by the style guide.
This tickled a bug in KernelCompiler.compile() where the fingerprinter
doesn't include the outputFilePath in its list of dependencies. As such,
if the output .dill file is missing or corrupted, the fingerprint still
matches and re-compile is skipped, even though it shouldn't be. I'll fix
that in a followup, then look at how this triggered that issue. My
hypothesis is that that it's due to the aot kernel compile and bundle
kernel compile have separate output directories for the .dill files
(build/ vs build/aot) but the same output directory for the associated
depfiles (due to this patch).
This reverts commit 43a106e95a.
* added shortcuts and delete functionality
* added first test
* afew chnages
* a few changes
* hope this works
* small change
* small changes
* fixed nits
* final changes:
* fixed initializing formals
* update comment
* minor change:
* added line
* final changes
The --snapshot argument was only necessary in Dart 1. The --depfile
argument was only used in Dart 2 mode to pass to the kernel compiler,
but was inconsistent with the 'build aot' command, where the depfile was
always set to build/kernel_compile.d.
This patch updates 'build bundle' to emit the depfile to a location
consistent with the 'build aot' command; since it's not intended to be
user-configurable and flutter.gradle hardcodes the location to
build/kernel_compile.d either way, this patch also eliminates the
ability to configure the filename altogether.
This reverts commit 343b57036a.
Reverting because the assert introduced in framework.dart(inheritFromElement) is breaking certain Mulligan pages. @hixie suspects it might be due to global keys.
* Scale high-pixel-ratio images with BoxFit.none/BoxFit.scaleDown correctly
* add test cases for image scale
* make analyzer happy
* Make sure that test images always have a scale to make all tests pass
* add a new author
* use new keyword in tests
This recognizer can be passed in AndroidView's gesureRecognizers when we
want all touch events in the view bounds to be immediately dispatched
to the Android view.
I'm working on fixing up all tests that rely on fs.currentDirectory to allow us to run concurrently. This one proved to be really tricky because it calls a lot of code and spawns multiple processes that have a mix of absolute and relative paths passed to them. I managed to handle some of it with a ChrootFileSystem, but the paths passed to the external processes were wrong.
The functionality here is covered by all of the integration tests that use flutter_tester that were added after this, including flutter_run_test.dart, lifetime_test.dart etc. in this same folder but because they're run through `flutter run` as a separate process they get to set their own working directories without affecting other tests if run concurrently.
The average frame time of page transitions on Moto G4 is now very
close to 16ms (the last 10 measurements on our dashboard are
between 15.5ms to 16.7ms and half of them are below 16ms).
It is now much faster than when we disabled it (which was at about
35ms). So I think that we should be able to enable it by default.
I'll leave the flag there until we implement the retained rendering
to bring the frame time comfortably below 16ms.
See https://github.com/flutter/flutter/issues/13736
* Add a detach command to detach without terminating (#21376)
* Add a detach command to detach without terminating
Fixes#21154.
* Bump protocol version for app.detach
* Tweak to detach/quit text
* Change logPrefix to named param
* Fix the text that the devicelab attach test looks for
* Rename test file
* Fix detection to work regardless of whether there are other devices
On Windows we get one message, but on Mac we get another (because of the Simulator always being available).
* Allow FlutterTester to be provided with the working directory for execution
Previously this test set fs.currentDirectory which prevents running tests concurrently. This allows setting the working directory for a FlutterTester in the cosntructor (optionally) and passes it through from the test (without setting fs.currentDirectory).
* Remove trailing whitespace
* Add a detach command to detach without terminating
Fixes#21154.
* Bump protocol version for app.detach
* Tweak to detach/quit text
* Change logPrefix to named param
* Update asset_bundle_package_test to use MemoryFileSystem
This updates all tests in this file to use a memory filesystem (same as I did for asset_bundle_package_font_test) based on the current platform.
There were already a few minor tests at the bottom using a MemoryFileSystem and being run for all platforms - however this complicated the shared code I changed above to support Windows natively so I changed them to also work the same as others (that is, they just run the native platforms so require running on all to get full coverage - though this is the case for almost all other tests anyway).
* Move fixPath to the correct place
* First step in Flutter Doctor refactor. Assigns categories to all validators.
* Revert "Roll engine e54bc4ea1832..a84b210b3d26 (6 commits) (#20453)"
This reverts commit 05c2880a17.
* Split iOS and Android workflows into workflow and validator classes.
* Change ValidatorCategory to handle standalone validators that share a
category (e.g. IntelliJ).
Also make Android Studio and Android toolchain use separate categories.
At this stage, flutter doctor output matches what it was previously.
(The summary() method itself has not yet been changed )
* Change doctor summary code to support validator categories.
Output is still unchanged.
* Handle small formatting issues.
* Flip Flutter category's isGroup field to false until it's actually
needed.
* Revert auto-generated formatting changes to keep those lines from
muddying the pull.
* Small fixes pointed out by analyzer.
* Properly fix analyzer issues around const constructors.
* Small changes to address comments.
* Add tests to verify grouped validator behavior and validationtype
merging.
* Update doctor.dart
* Add comments for clarification.
Enable taking screenshots of arbitrary RenderObjects from a running application from within the inspector.
Key functionality is in the added _ScreenshotPaintingContext class.
Added InheritedModel: An InheritedWidget that's intended to be used as the base class for models whose dependents may only depend on one part or "aspect" of the overall model.
* Change assert_bundle_package_font_test to memory file system
This is to work towards being able to run the tests without `-j1` (#21113). These tests were using the real filesystem and setting/relying on fs.currentDirectory. There was a comment about this being because the memory provider didnt' support POSIX and Windows, however that seems to have changed since (and many other asset tests already do something similar to this).
* Trim trailing whitespace
* Add a workaround for Windows path slash directions
Strictly this is correct, but the real FS can tolerate either path. The in-memory file system is more strict (see https://github.com/google/file.dart/issues/112).
* Extract a helper for writing schema files in tests
* Missed file when saving!
* Remove redundant comment
* Rename writeBasicSchema -> writeEmptySchema
* Use the file we already have to write contents
* Make comments more descriptive
* Remove another dupe of writeSchema to use the shared one
* Rename schema -> pubspec_schema
* Trim whitespace
This patch eliminates the --preview-dart-2/--no-preview-dart-2 flag,
hardcoding all uses to true. It also defaults all previewDart2 method
parameters to true, where they hadn't yet been.
A series of subsequent patches will eliminate all previewDart2
parameters and the associated code from within the codebase.
* Unskip integration tests on Windows that now pass
The referenced issue is closed and these tests pass for me locally on Windows now.
* Remove import that's no longer used
* Add another issue that is afffecting these tests on Windows
* Add a hot restart test and mark skip on Windows
Skipped due to https://github.com/flutter/flutter/issues/21348.
This was a bug, when e.g a LongPressGestureRecognizer was in the gesture
arena, the android view gesture team may not yet win the arena when the
last pointer was up. This change allows AndroidView to win the gesture
even after all pointers are up.
DevFS.update only runs in Dart 2 mode when the generator parameter is
supplied. In Dart 2 mode, both mainPath and pathToReload are required
parameters; this patch marks them as such.
generator is required for running in Dart 2. All call sites other than tests already explicitly set this value.
Note the statements on line 510 and line 516 for why mainPath and pathToReload are required.
Its type uses a generic type which is limited to library-visibility.
Eliminating compilationQueue from ResidentCompiler's public interface
makes it possible to mock in tests.
* [FAB] Updated tooltip touch target.
* Remove "new" keyword
* [FAB] Updated tooltip touch target.
* "long press button edge"
* remove new
* remove new
* put "new" keywords back in
* Remove check for childless tooltip
* Added regression test - tooltip works on edge of FAB which has no child.
Added helper method to find the right edge of a in the tests.
* Changed "find.byType(text)" to "find.text('Add')"
When switching between channels, we were leaving around the version freshness stamp file (bin/cache/flutter_version_check.stamp), which meant that the flutter tool would read from that file to see what the cached date of the most recent commit to the current channel (branch) was. The problem was that since the file was created while on the previous channel, the cached date was for the wrong channel, so if you switch from master to beta, flutter would think that the channel was out of date, and a new version was available, at least for three days after the first time it checked (after three days since the last time the freshness was checked, the cached date would get updated).
This PR modifies the channel command to remove that stamp file whenever the user switches channels, so that the cached date will be from the right channel when it is recreated.
Fixes#21134
This is a bit of a stab in the dark for a flake sometimes seen on bots (but I can't repro locally) #20822. Detaching from a Flutter app currently seems to terminate it, so it may be the cause of the "app not found" when trying to stop the app subsequently.
This change means we stop the app from the main process first, before terminating the attach process.
* Roll engine to 56139397e6ae1257bdabd1ef79ff7aca96c67d4.6
Changes since last roll:
```
56139397e Roll src/third_party/skia 7ba1d64f0706..5f0726b01019 (12 commits) (#6104)
47a1ce0e6 Allow embedders to set the root surface transformation. (#6085)
```
* Roll engine to f3ff83a5db71262d240aa5337a2a9a22c73c4749. (dart roll).
* Add const
* Add ignore analyzer prefer_const_constructors_in_immutables
* Fix coverage collection crash
Based on Jason's patch in https://github.com/flutter/flutter/pull/19546/
This is more or less the same but I tried to avoid using `dynamic`.
* Improve argument and variable names in flutter_platform
* Don't bother with reduce, since the order is guaranteed.
* Don't time out if process terminates when told to stop but response was not processed
While trying to reproduce #20822 I found a condition where the app may quit before the `app.stop` response is received but this code (which is called in integration test teardown) would sit around waiting and time out. With this change, the process exit is considered a valid response to the stop request.
* Add process exit to log for better errors in failures
This log can be turned on for debugging but is also dumped when a test fails (in certain conditions). With this in the log, it'll be clear if the timeout is because we're waiting for an event but the process quit.
This re-lands commit c594696.
The original PR was breaking the integration test as while the
gesture was active the AndroidView's parent widget got rebuilt which
disposed the _AndroidViewGestureRecognizer and dropped pointer events
from that point on.
This change adds a unit test that reproduces the failure case, and
fixes it by not rebuilding the _AndroidViewGestureRecognizer if the
list of gesture recognizers did not change.
Pointer events are dispatched to the Android view only if it won
Flutter's gesture arena for the pointer.
Specific gestures that should be dispatched to the android view can be
specified with the gestureRecognizers parameter.
* added keyboard functionatliy to android builds
* Added tests
* almost ready for review
* ready for review
* Fixes
* final comments
* final commit
* removing raw keyboard changes
* removing raw keyboard changes
* removing raw keyboard changes
* actual last commit
* fixed the imports
* a few more changes
* A few more changes
* a few changes
* Final changes
* Final changes2
* final actual commit for real
* final actual commit for real2
* final actual commit for real3
* final actual commit for real4
* final
* final 2
* f
* f2
* fin
* fin 2
* fin3
* fin4
* Start logger in startProgress to avoid assertion failure
There are lots of places that create a Status() and all but two of them call ..start() immediately. This is one of the places that doesn't, which causes an assertion failure when running with --enable-asserts and the other is in the same file (I suspect it's also incorrect, but possibly it's never used - I'll look at that separately when I can trace some code that calls it).
Fixes#20812.
* Enable asserts for tools tests
* Fix lint
* Rename enableAsserts -> enableFlutterToolAsserts
To make it clearer that it only enables asserts for flutter_tools when set.
The team captain wins the arena on behalf of the team.
When any of the team members claims victory for the arena the captain
accepts the gesture.
This is used when embeddeding platform views - we allow configuring a
set of gestures that should be forwarded to the platform view.
We add the set of gesture recognizers to a GestureArenaTeam with a
captain, and if the captain accepts the gesture we forward it to the
platform view.
This fixes#20483 by letting InkWell do its own clipping.
PathOp.intersect is not used because we have too many unit tests that rely on clipping (e.g., paints..clipXXX()..drawCircle())
The goldens are updated due to small AA changes of the additional clipPath.
This test is sometimes flaky (#20822) because the two processes try to stop the same app. This fix changes to just gracefully terminate the attach process without explicitly trying to stop and then uses the original spawning process to stop the app.
I can't repro the flake locally to be certain, but I've verified only one stop command is sent now so it *should* be good.
- remove an //ignore that is no longer needed
- fix some intrinsic methods that used the API incorrectly (shouldn't affect correctness but should make things a tiny bit more efficient)
- add some asserts to help track down bugs quicker
- update a TODO to point to the currently relevant bug
- fix some indenting
- improve the naming of some privates to improve readability
* Don't keep parsing results once we've had the event we expected
* Report errors if an app.stop event is received while waiting for another event
* Don't throw if we see app.stop event when we've just sent an app.stop request
* Improve debug print to include --start-paused if being used
* Improve wrapping
* Add ability to set collapse mode in flexible space bar
* Add tests to collapse mode in flexible space bar
* Fix minor style nit
* Fix getting collapse mode does not handle unknown values
* Change const key to final in space bar collapse mode test
* Return null collapse padding if mode is unknown
flutter_tools cannot depend on flutter_goldens (as flutter_goldens
depdends on the Flutter sdk), so this commit splits client.dart from
flutter_goldens to a pure-dart flutter_goldens_client package.
* `flutter analyze` cleanup
* Make `--dartdocs` work in all modes.
* Make `analyze-sample-code.dart` more resilient.
* Add a test for `analyze-sample-code.dart`.
* Minor cleanup in related code and files.
* Apply review comments
* Fix tests
* Fixes resulting from audit of issues links
I looked at every link to GitHub in our repo. For cases where we had a TODO that was waiting for a bug to be fixed, and the bug has now been fixed, I applied the pending change. For cases where the link was out of date, I updated the link.
* Update run_test.dart
skip this test again since it failed on linux and macos bots
* Fix TODO syntax.
* Clarify messages for some timeouts, to aid debugging.
* Increase some other timeouts that were a needlessly short, to reduce sources of flakes.
* Remove some more timeouts that were mostly redundant, to remove complexity.
* Minor style cleanup.
* Remove some dangerous traps (specifically, hide the explicit start/end times in TimedEvent since they shouldn't matter).
All temporary directory start with `flutter_` and have their random component separated from the name by a period, as in `flutter_test_bundle.YFYQMY`.
I've tried to find some of the places where we didn't cleanly delete temporary directories, too. This greatly reduces, though it does not entirely eliminate, the directories we leave behind when running tests, especially `flutter_tools` tests.
While I was at it I standardized on `tempDir` as the variable name for temporary directories, since it was the most common, removing occurrences of `temp` and `tmp`, among others.
Also I factored out some common code that used to catch exceptions that happen on Windows, and made more places use that pattern.
* Try to resolve an intermitted crash during coverage collection
The only theory I can come up with is that maybe the test completes
before we finish processing the standard input, so I made the test
harness wait for the observatory URL before considering whether the
test has finished or not.
Also, some code cleanup while I'm at it, e.g. avoiding using "onFoo"
for the names of methods, avoiding back-to-back switch statements with
the same values, avoiding `_` argument names, and using `?.` instead
of `if (foo != null) foo.`.
* Revert back the signature of _pipeStandardStreamsToConsole
* Also remove the other additions to this method.
* Reland "Roll engine to version b148e628ec86b3a9a0382e0bcfae73f0390a8232 (#20427)"
This is a re-land with downgraded `package:flutter_gallery_assets`
version.
* Downgrade package:flutter_gallery_assets to 0.1.4
* Change engine.version to 81baff97c29bb08cbf8453a3f9042c5813f84ad3 (which contains an additional fix)
* Change engine.version to e3687f70c7ece72000b32ee1b3c02755ba5361ac (since mac tarballs are corrupted on earlier commit)
Rewrote CupertinoAlertDialog to look nearly identical to an alert dialog in iOS. This includes considerations for blur, translucent white background color, button sizing, gap dividers between buttons, and text scaling layout behavior. (#18381)
With this change you can now create "wrapping" text fields that do not show the new line button:
```dart
new TextField(
maxLines: null,
keyboardType: TextInputType.text,
);
```
In the event that no Dart VM's exist or are connectable, will instead
await for a new Dart VM to show up. Will no longer return null when
calling `getMainIsolatesByPattern`, instead returning either a list of
isolates or timing out.
Reason for revert: The package:flutter_gallery_assets has removed some images which are required for the examples/flutter_gallery, so the gallery build is failing (only discovered after landing, since gallery doesn't seem to get built during github PR presubmit checks)
This CL
* rolls `engine.version` to flutter/engine@b148e628 (which includes dart sdk 2.1.0-dev)
* rolls `goldens.version` to flutter/goldens@6c45fafdf (which includes updates due to skia changes in engine)
* changes `platform.dill` to `platform_strong.dill` in various places due to flutter/engine@a84b210b
* adds explicit `environment: sdk: ">=2.0.0-dev.68 < 3.0.0"` constraints to `pubspec.yaml` and `pubspec.yaml.tmpl` files (since pub defaults to `<2.0.0` if omitted)
* upgrades to newer versions of various 3rd party packages (to ensure transitive dependencies have `<3.0.0` sdk constraint)
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
In certain cases, the test would fail before creating the (lazily created) compiler object, and then we'd
try to call shutdown() on null in those cases.
Fixes#18610
This adds the animation links for illustrations of the Transition widgets, as well as adding a cross-references to the other transition widgets in the "See also" for each of their docs.
Resizing an AndroidView happens asynchronously (as it requires thread
hopping from the ui thread to the platform thread).
While waiting for the resize to complete the framework does exactly when
the embedded view has been resized. This leads to pretty bad jank as the
framework might paint the embedded view with a wrong size.
We're working around this by freezing the texture frame while resizing
until we are sure that the next frame has the new size. This is how it
looks with the workaround:
This is how it looks before and after the workaround:
Before (janky) | After (less janky)
:--------|---------:
![resize_before](https://user-images.githubusercontent.com/1024117/43669639-51bfd0ae-9739-11e8-8cbe-96e36f2460d2.gif) | ![resize_after](https://user-images.githubusercontent.com/1024117/43669647-62e885a6-9739-11e8-8aa4-beb74e979995.gif)
This depends on flutter/engine#5938. Additionaly right now the engine completes
the resize call immediately, a following PR will change it to complete
after a frame with the new size is ready.
This PR adds 2 features to RenderAndroidView and AndroidView:
1. Hit testing behavior
Adds a `PlatformViewHitTestBehavior` which is similar to
`HitTestBehavior` without the `deferToChild` option (as platform views
don't have child render objects) and with a `transparent` option which
prevents it from forwarding any events to the Android view.
2. MotionEvent recomposing logic
FlutterView and the framework `converter.dart` are working together to
transform each Android MotionEvent object into one or more
`PointerEvent` objects.
This PR adds the reverse logic (in _MotionEventDispatcher which is used
by RenderAndroidView) which turns a stream of PointerEvent objects into
MotionEvent objects.
The correctness of the recomposing logic is tested in an integration
test which will land in a separate PR (the unit test PR is pretty big,
trying to keep as many bite-size PRs for reviewer's convenience)
This removes the final traces of Travis and Appveyor from the Flutter tree.
I've updated the documentation and fixed a couple of places where scripts look for Travis, and eliminated the dart tools runningOnTravis function (which was unused anyhow).
There are places in the flutter script that used to look for the environment variable TRAVIS. We actually do want to continue to detect that we're running on Travis there, since in the plugins repo we still use Travis (for the moment). In any case, it's OK, because the CI environment variable is set on all of the CI bots (Cirrus, Travis, and Appveyor).
FastLane doesn't have a setup_cirrus equivalent to setup_travis, but it actually doesn't matter there either, since it doesn't do Travis-specific things, and it also looks for the CI environment variable.
* Enable lint unnecessary_statements. Codebase is compliant.
* Fix mega_gallery generated code to not generate unecessary statements
* Fix lint in mega gallery changes
* Enable unnecessary_statements for users as well as repo.
The following changes are made by this PR:
* Translation bundles now implement MaterialLocalizations directly,
and are public so that they can be directly extended.
* The list of supported languages is now a generated constant.
* The icuShortTimePattern/TimeOfDayFormat values are now pre-parsed.
* Various other changes for consistency with the style guide and the
rest of the codebase, e.g. the class names don't use `_`, the
`path` library is imported as such, more dartdocs, fewer `//
ignore`s, validation using exceptions.
This reduces our technical debt benchmark.
See details in our proposal for this breaking API change and #18057. This PR setup all code paths to allow the change but doesn't change the clip behavior by itself. We'll change `defaultClipBehavior` from `Clip.antiAlias` to `Clip.none` in the following PR to change the clip behavior and update tests.