* fire service protocol extension events for frames
* start time in micros
* introduce a profile() function; only send frame events when in profile (or debug) modes
* moved the profile() function to foundation/profile.dart
* refactor to make the change more testable; test the change
* fire service protocol events by listening to onFrameInfo
* remove the frame event stream; add a devicelab test
* remove a todo
* final
The output location of gen_snapshot differs based on the engine's target
platform, and we don't know the target platform when building a
platform-independent FLX in JIT mode.
It was 8.0. It's now arbitrarily 18.0.
Changing this required adjusting some tests. Adjusting the tests
required debugging the tests. Debugging the tests required some tools
to help debugging gesture recognizers and gesture arenas, so I added
some. It also required updating some toString() methods which resulted
in some changes to the tree diagnostics logic.
Also I cleaned up some docs while I was at it.
Mainly, this adds documentation to members that were previously
lacking documentation.
It also adds a big block of documentation about improving performance
of widgets.
This also removes some references to package:collection and adds
global setEquals and listEquals methods in foundation that we can use.
(setEquals in particular should be much faster than the
package:collection equivalent, though both should be faster as they
avoid allocating new objects.) All remaining references now qualify
the import so we know what our remaining dependencies are.
Also lots of code reordering in Flutter driver to make the code
consistent and apply the style guide more thoroughly.
* Optimise AnimatedSize for the tight case.
* Remove `default` from a switch statement over enum (so that analyzer will complain if we add enum values).
* Adopt the Size since we use it after the child may have changed (which would throw normally).
* AnimatedCrossFade.layoutBuilder
* Prefix and Suffix support for TextFields
* Adding Tests
* Removing spurious newline.
* Fixing a small problem with the test
* Code review changes
* Code Review Changes
* Review Changes
* Export the new StrokeJoin enum
* Added example for line styles, and enabled line join styles.
* Reverting inadvertent change to main.dart.
* Updated due to code review of engine code
* Removed example.
* Added arguments to named routes, with test.
* Fixing some formatting
* Fixing Navigator.pop for named routes.
* Fixing comment.
* Simplifying test.
* Fixing new -> const for Text object.
* Tiny text change (also to kick a new Travis build)
* Added a more realistic test case.
* Reverting unintentional iml changes.
* Fixing trailing newline
* Removing some changes that snuck in.
This reverts commit e13e7806e3.
Turns out that with this patch, we aren't actually catching all
errors. For example, `flutter analyze --flutter-repo --watch` didn't
report errors in `dev/devicelab/test/adb_test.dart`.
* a11y: implement new SemanticsAction "showOnScreen" (v2)
This action is triggered when the user swipes (in accessibility mode) to the last visible item of a scrollable list to bring that item fully on screen.
This requires engine rolled to flutter/engine#3856.
I am in the process of adding tests, but I'd like to get early feedback to see if this approach is OK.
* fix null check
* review comments
* review comments
* Add test
* fix analyzer warning
* flutter analyze --watch auto detect if in flutter repo
* move isFlutterLibrary from AnalyzeOnce into AnalyzeBase for use by AnalyzeContinuously
* pass --flutter-repo to analysis server when analyzing the flutter repository
* enhance flutter analyze --watch to summarize public members lacking documentation
On Fuchsia, the system compositor is responsible for drawing shadows
for physical model layers with non-zero elevation.
Also fixed a bug where _needsCompositing was not being cleared prior
to updating it.
* Ensure that a frame is allways scheduled when a RenderObject marks itself as needing a semantics update
Fixes issue 2 described in https://github.com/flutter/flutter/issues/10971
Previously, an object could call `markNeedsSemanticsUpdate` and its wish would never be granted because no frame was scheduled that would actually update the semantics. This caused an issue during scrolling on Android where at the end of the scroll the `RenderIgnorePointer` would stop blocking the semantics of the scrolled view, call `markNeedsSemanticsUpdate`, but then no frame was scheduled to actually put the semantics of the scrolled view back into the semantics tree. That made the scrolled view unusable for a11y users.
At first I was a bit wary to call `requestVisualUpdate` within `markNeedsSemanticsUpdate` because technically the visual is fine, we only need the frame it schedules to update the semantics. However, it seems like we are using `requestVisualUpdate` for exactly that purpose in other places already where we just need an update to the semantics (e.g. 76a50fe0ca/packages/flutter/lib/src/rendering/object.dart (L2408)).
* add tests
In
df8bf384eb
a new functionality of the Dart VM Service Protocol has been introduced.
Clients connected to the Service Protocol are now able to expose
services that other clients (e.g. Observatory) can invoke through the
Service Protocol itself.
With these changes Flutter Tools register them self as a `reloadSources`
(a.k.a. HotReload) capable client.
Observatory is already listening for the clients which expose this
functionality and uses by default the service based version of
`reloadSources` when available, so requesting a HotReload from
Observatory will trigger the full Flutter HotReload.
Related https://github.com/dart-lang/sdk/issues/30023
Related https://github.com/flutter/flutter/pull/11229
Related https://github.com/flutter/flutter/pull/11256
In some cases, we've seen interactions between Instruments and the iOS
simulator that cause hung instruments and DTServiceHub processes. If
enough instances pile up, the host machine eventually becomes
unresponsive.
Until the underlying issue is resolved, manually kill any orphaned
instances (where the parent process has died and PPID is 1) before
launching another instruments run.
Apply a 30 second timeout to Android/iOS device polling.
If there's a device poll already in progress, skip polling for new
devices; wait for the first request to return/timeout.
* Include the process' `stdout` and `stderr` when it returns a
non-zero exit code in `runCheckedAsync()`
* Defensively catch errors in `AndroidDevice.isAppInstalled()`
and return false
* report run target and if it is an emulator
* don't print debug
* rename parameter, remove unused variable
* fix test
* fix comment
* tweak from review, and fix analyzer error
* send custom parameters for the event, not the session
* fix mock
* use the +1 for usage
* Make the drag resistance non-linear
* Let the easing of overscroll have a spring effect too
* Add tests and prevent possible drift by having a slightly smaller resistance when easing the overscroll
* lint
Previously, the snapshot file was recomputed on every build. We now
record checksums for all snapshot inputs (which are catalogued in the
snapshot dependencies file output alongside the snapshot) and only
rebuild if the checksum for any input file (or the previous output file) has
changed.
* AutomaticKeepAlive
A Widget that listens for notifications from widgets that don't want to die.
* Automatically wrap SliverList and SliverGrid children in AutomaticKeepAlive widgets
* Fixes for review comments
Previously, the snapshot file was recomputed on every build. We now
record checksums for all snapshot inputs (which are catalogued in the
snapshot dependencies file output alongside the snapshot) and only
rebuild if the checksum for any input file has changed.
* Only one call to createSnapshot exists, and it's in the same library.
* Eliminate conditional logic around the presence of depfilePath, the
only existing call always passes a non-null depfilePath.
Remove terminating semicolons; they are causing an "code inspection warning" in Android Studio:
```
This inspection reports redundant semicolon (';') token which is not required in Kotlin and may be removed.
```
* Use defaultTargetPlatform instead of Platform.operatingSystem for ImageProvider.
Add convenience helper to make it easier to display a short string for
an enums value.
* Add comment linking to issue.
Previously, xcodeMajorVersion and xcodeMinorVersion returned null unless
xcodeVersionSatisfactory had been called first. We now compute them on
demand, and cache the resultant values.
* Prefix and Suffix support for TextFields
* Adding Tests
* Removing spurious newline.
* Fixing a small problem with the test
* Code review changes
* Code Review Changes
* Review Changes
* Export the new StrokeJoin enum
* Added example for line styles, and enabled line join styles.
* Reverting inadvertent change to main.dart.
* Updated due to code review of engine code
* Removed example.
The main purpose of this PR is to make it so that when you set the
initial route and it's a hierarchical route (e.g. `/a/b/c`), it
implies multiple pushes, one for each step of the route (so in that
case, `/`, `/a`, `/a/b`, and `/a/b/c`, in that order). If any of those
routes don't exist, it falls back to '/'.
As part of doing that, I:
* Changed the default for MaterialApp.initialRoute to honor the
actual initial route.
* Added a MaterialApp.onUnknownRoute for handling bad routes.
* Added a feature to flutter_driver that allows the host test script
and the device test app to communicate.
* Added a test to make sure `flutter drive --route` works.
(Hopefully that will also prove `flutter run --route` works, though
this isn't testing the `flutter` tool's side of that. My main
concern is over whether the engine side works.)
* Fixed `flutter drive` to output the right target file name.
* Changed how the stocks app represents its data, so that we can
show a page for a stock before we know if it exists.
* Made it possible to show a stock page that doesn't exist. It shows
a progress indicator if we're loading the data, or else shows a
message saying it doesn't exist.
* Changed the pathing structure of routes in stocks to work more
sanely.
* Made search in the stocks app actually work (before it only worked
if we happened to accidentally trigger a rebuild). Added a test.
* Replaced some custom code in the stocks app with a BackButton.
* Added a "color" feature to BackButton to support the stocks use case.
* Spaced out the ErrorWidget text a bit more.
* Added `RouteSettings.copyWith`, which I ended up not using.
* Improved the error messages around routing.
While I was in some files I made a few formatting fixes, fixed some
code health issues, and also removed `flaky: true` from some devicelab
tests that have been stable for a while. Also added some documentation
here and there.
* Add hasAGoodToStringDeep and equalsIgnoringHashCodes methods.
Methods simplify testing of toStringDeep calls and other cases where
methods return strings containing hash codes.
This allows us to take advantage of improved command-line tooling (e.g.,
improvements in device listing in Instruments). Now that the engine is
built with Xcode 8 and the framework is tested against Xcode 8, this
reduces the set of configurations we need to support to allow us to
focus on the supported ones: Xcode 8 and Xcode 9.
* Change all instances of '$runtimeType#$hashCode' to use the describeIdentity method.
The describeIdentity method generates a shorter description with a consistent length
consisting of the runtime type and the a 5 hex character long truncated
version of the hash code.
Going forward, Android support libraries are published on maven (instead of bundling them with the SDK). Many plugins depend on these. To avoid requiring plugin users to add the maven repository to their app this change adds the repository to the template for `flutter create`.
This also bumps the support-annotations dependency to 25.4.0 (which also requires the new maven repository).
Introduce CompositedTransformTarget and CompositedTransformFollower
widgets, corresponding render objects, and corresponding layers.
Adjust the way text fields work to use this.
Various changes I needed to debug the issues that came up.
This reverts commit b2909a245a.
This resubmits the following patches:
1. Use Xcode instruments to list devices (#10801)
Eliminates the dependency on idevice_id from libimobiledevice. Instead,
uses Xcode built-in functionality.
2. Make device discovery asynchronous (#10803)
Migrates DeviceDiscovery.devices and all device-specific lookup to be
asynchronous.
* Revert "Make device discovery asynchronous (#10803)"
This reverts commit 972be9c8b4.
* Revert "Use Xcode instruments to list devices (#10801)"
This reverts commit 37bb5f1300.
This is to resolve a failure that looks related to a bad install of Xcode 8.0
on our build bots and should be reinstated when the infra issue is diagnosed
and resolved.
Instruments worked well when this was originally landed, and on the
following commit, but started failing two commits after this originally
landed. Manual invocation of instruments on the build host currently
results in:
```
dyld: Library not loaded: @rpath/InstrumentsAnalysisCore.framework/Versions/A/InstrumentsAnalysisCore
Referenced from: /Applications/Xcode8.0.app/Contents/Developer/usr/bin/instruments
Reason: image not found
Abort trap: 6
```
It appears the /Applications/Xcode8.0.app/Contents/Applications
directory (which contains Instruments) is missing on the host.
Moves all remaining calls to tools that are part of the libimobiledevice
suite of tools to the IMobileDevice class. This allows for better
tracking of this dependency, and easier mocking in tests.
Use a top-level getter in mac.dart rather than a static instance getter
and a top-level getter in ios_workflow.dart. Makes this code consistent
with how we do context lookups elsewhere.
Extract out IMobileDevice class, move class to idevice_id, ideviceinfo
(and eventually other libimobiledevice tools such as iproxy) behind this
interface.
Add tests for the case where libimobiledevice is not installed, the case
where it returns no devices, and the case where it returns device IDs.
Eliminates the need for the device/daemon code to get at the iOS/Android
tooling indirectly via Doctor. In tests, we now inject the workflow
objects (or mocks) directly.
This code is unused in any test. In upcoming changes that migrate to
Xcode instruments based device listing, we'll mock out the instruments
output separately.
* started copying stuff into cupertino page route
* extracted from material page route. Ready for testing
* works with button and gesture
* tests and docs
* review notes
* review notes
* Add SemanticsNode.isSelected flag
* Adds example usage to TabBar
See also https://github.com/flutter/engine/pull/3764
* Review comments
* whitespace fixes
* Fix doc ref and update engine roll
* works using pageview
it’s a bit heavy and scrolls
no documentation or test yet
* docs and tests
* more docs tweak
* revert drive by page view changes
* swap out the indexed stack for a custom thing
* layout everything on the cheap
tests pass
* add more tests
* move back to stack and add docs
* review notes
* build all the tabs once built
* Make dividers one device pixel thick as defined in Material design spec
* Updated divider test to check stroke width
* Clarified dividers with 0 height in the docs
* Updated Divider.height docs according to PR feedback
* Check for initialRoute before Navigator.defaultRouteName
* Default initialRoute to Navigator.defaultRouteName
* Take suggestions from code review
* Add test for old and new routes behavior
* Revert "Add test for old and new routes behavior"
This reverts commit 282fb64b16.
* Retry: without dartfmt, with dartanalyzer
* Rename tests, check the routes are taken
* Fix flutter analyze --flutter-repo warnings
* Add test for initial vs default route
* Update test and fix analyzer warnings
* Add test for initial route only being used initially
* Before tests
* Add the part to trust the cert on the device
* flip the error checks since some are more specific and are more actionable
* add tests
* review