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.
This all happened because I was trying to be a little too helpful...
Part of the job of the "create" command is to recreate missing pieces of existing projects, and now that the default has changed, I wanted to make it so that if someone had created a default flutter create project before, that they could run a default flutter create there again, and not have it trashed by using the new default template (application) over the old one (app).
This meant I had to detect what type of project it was. Unfortunately, in the past we didn't write anything in the .metadata file to identify the type of project, and since the goal was regenerating missing files, I can't count on anything existing, so it's just a heuristic match.
This simplifies the heuristics down to just detecting the difference between "app" and "application" projects, and only detect the other types if they're explicitly listed in the .metadata file (I changed the code in my original PR to add the project type to the .metadata file). People used to have to specify the type for those anyhow, so it shouldn't be a surprise to users.
So, the main difference in the new heuristics from my last attempt is that if you have a directory that has some other stuff it (like maybe a "plugin" project), then we'll recreate (pronounced "mess up") the project using the "application" template, but that was true before (except it would use the "app" template).
Fixes#22726
* [frdp] Add optional dart isolate filter.
It's now default to filter out non-flutter isolates when searching
across Dart VM's. This is due to a possible issue wherein an Isolate
for testing might have the same name as the flutter Isolate.
In addition, logging messages have been added in dart_vm.dart for
debugging.
This renames the "module" template to the "application" template, and makes "application" the default. The existing "app" template is now deprecated.
flutter create also now recognizes the type of project in an existing directory, and is able to recreate it without having the template type explicitly specified (although you can still do that). It does this now by first looking in the .metadata file for the new project_type field, and if it doesn't find that, then it looks at the directory structure. Also, the .metadata file is now overwritten even on an existing directory so that 1) the project_type can be added to legacy projects, and 2) the version of Flutter that updated the project last is updated.
I also cleaned up a bunch of things in create_test.dart, added many more tests, and added an example test to the test/ directory in the generated output of the application template.
Fixes#22530Fixes#22344
* added sample code for scaffold widget [#21136]
* Fixed indent and spacing for scaffold sample code
* Update scaffold.dart
Fix one more formatting issue
Previously flutter_tools had used "gradle properties" to find the build types
and flavors supported by the Gradle project. Tasks should work more reliably
across different versions of the Android Gradle plugin.
Fixes https://github.com/flutter/flutter/issues/20781
* Block setting of fs.currentDirectory in tests
This isn't perfect, it only covers tests using testUsingContext, but that is the huge majority of tests.
* Tweak error message.
Introduce an overall material "color scheme" and to make it possible to redefine how a component's visual properties bind to the color scheme and to the existing material Theme.
* 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