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