The hack here is to flush the timeline events so the host that
waits for the 'Rasterized first useful frame' event won't hang.
Previously 'Widgets built first useful frame' didn't cause this
trouble because the GPU thread will naturally add more events later
and cause a fresh. The `Rasterized...` event, however, is likely
to be the last (or nearly the last) event during the app start up.
rmacnak and I will figure out a better way to fix it next week.
We're having this quick hack now to fix our device lab performance
tests so we won't miss the data points.
* Update constructor APIs TooltipTheme, ToggleButtonsTheme, PopupMenuTheme
The constructor signatures for TooltipTheme, ToggleButtonsTheme, PopupMenuTheme have been incompatibly changed. They now require just one theme data parameter.
* painting and semantics
* more comments
* fixing ci
* review fixes
* add assert for id
* rename custom layer factory to layer builder
* review updates
* partial review fixes
* some doc updates
* more doc updates
* only expose getter for id in PlatformViewController
* doc updates/removing all the references
* remove extra
* more doc updates
* some doc updates
* more doc fixes
* review fixes
- Splits on{Enter,Hover,Exit} from Listener to MouseRegion. Deprecated API is kept for compatibility.
- Splits on{Enter,Hover,Exit} from RenderPointerListener to RenderMouseRegion.
Primarily these methods no longer allocate any objects other than their
return values.
Additionally, the math in the methods is reduced compared to the general
case math based on known input conditions.
Modified to no longer generate infinite values in some finite cases.
This relands https://github.com/flutter/flutter/pull/35297
The followings have been done to fix the broken tests:
1. Add `didSendFirstFrameRasterizedEvent` extension and its tests
2. Wait for `didSendFirstFrameRasterizedEvent` instead of
`didSendFirstFrameEvent` during start up tests
3. Mark missed (probably newly added) start up tests as flaky
* Add searchFieldLabel to SearchDelegate in order to show a custom hint label.
* Add support for specifying textInputAction and keyboardType in SearchDelegate
This PR makes ModalBarrier dismiss modal with any button press instead of primary button up, by making it use a private recognizer _AnyTapGestureRecognizer that is similar to TapGestureRecognizer but accepts gestures by any single button.
* Improve showDuration and waitDuration explanation and tests
* Add condition to test to ensure that tooltip does not show before long press duration is over
* Implement TooltipThemeData and TooltipTheme
* Add text style property
* Updated tooltip default colors for light and dark theme to match Material specification
An optimization to the coverage collection speed was added in #30811. This commit further expands on it to parameterize the CoverageCollector with a custom predicate, allowing internal use cases to filter the RPC calls to the Dart VM based on scripts of interest to coverage collection.
* Implement TooltipThemeData and TooltipTheme
* Add tooltip text style property
* Update default tooltip text style and decoration to match Material specification
* Fix debugLabel incorrectly labeling "white" as "black", and vice versa by default
Primarily these methods no longer allocate any objects other than their
return values.
Additionally, the math in the methods is reduced compared to the general
case math based on known input conditions.
`flutter build aar`
This new build command works just like `flutter build apk` or `flutter build appbundle`, but for plugin and module projects.
This PR also refactors how plugins are included in app or module projects. By building the plugins as AARs, the Android Gradle plugin is able to use Jetifier to translate support libraries into AndroidX libraries for all the plugin's native code. Thus, reducing the error rate when using AndroidX in apps.
This change also allows to build modules as AARs, so developers can take these artifacts and distribute them along with the native host app without the need of the Flutter tool. This is a requirement for add to app.
`flutter build aar` generates POM artifacts (XML files) which contain metadata about the native dependencies used by the plugin. This allows Gradle to resolve dependencies at the app level. The result of this new build command is a single build/outputs/repo, the local repository that contains all the generated AARs and POM files.
In a Flutter app project, this local repo is used by the Flutter Gradle plugin to resolve the plugin dependencies. In add to app case, the developer needs to configure the local repo and the dependency manually in `build.gradle`:
repositories {
maven {
url "<path-to-flutter-module>build/host/outputs/repo"
}
}
dependencies {
implementation("<package-name>:flutter_<build-mode>:1.0@aar") {
transitive = true
}
}
`flutter build aar`
This new build command works just like `flutter build apk` or `flutter build appbundle`, but for plugin and module projects.
This PR also refactors how plugins are included in app or module projects. By building the plugins as AARs, the Android Gradle plugin is able to use Jetifier to translate support libraries into AndroidX libraries for all the plugin's native code. Thus, reducing the error rate when using AndroidX in apps.
This change also allows to build modules as AARs, so developers can take these artifacts and distribute them along with the native host app without the need of the Flutter tool. This is a requirement for add to app.
`flutter build aar` generates POM artifacts (XML files) which contain metadata about the native dependencies used by the plugin. This allows Gradle to resolve dependencies at the app level. The result of this new build command is a single build/outputs/repo, the local repository that contains all the generated AARs and POM files.
In a Flutter app project, this local repo is used by the Flutter Gradle plugin to resolve the plugin dependencies. In add to app case, the developer needs to configure the local repo and the dependency manually in `build.gradle`:
repositories {
maven {
url "<path-to-flutter-module>build/host/outputs/repo"
}
}
dependencies {
implementation("<package-name>:flutter_<build-mode>:1.0@aar") {
transitive = true
}
}
Plus:
- Resume the app being run after expression has been evaluated to prevent the test run being forcefully terminated because it didn't end
- Skip non-JSON when waiting for JSON (eg. when running in verbose mode for debugging locally)
- Pass defaultTimeout in waitForJson (otherwise the assert in _timeoutWithMessages fails when it's not provided)
Closes https://github.com/flutter/flutter/issues/26518 (the original reason for skip was fixed in https://github.com/dart-lang/sdk/issues/34224).
When we were running `pub` within `flutter pub`, we were
unconditionally including the `--verbosity=warning` argument.
Then we were conditionally including `--verbose` if we were
running in verbose mode. However, the former argument
supersedes the latter, and we were never able to run `pub`
in verbose mode.
This updates `AsyncSnapshot.data` to act as `AsyncSnapshot.requireData`
used to -- and it removes `AsyncSnapshot.requireData`. Correspondingly,
this adds a `StreamBuilder.withoutInitialData()` constructor, makes the
`initialData` argument to the default `StreamBuilder()` constructor required,
and deprecates the `initialData` argument to the `FutureBuilder()` constructor.
See the breaking change announcement for more info.
https://github.com/flutter/flutter/issues/34545https://groups.google.com/forum/#!topic/flutter-announce/H6Od0QdsdrI
This PR makes ModalBarrier dismiss modal with any button press instead of primary button up, by making it use a private recognizer _AnyTapGestureRecognizer that claims victor and calls onAnyTapDown immediately after it receives any PointerDownEvent.
FocusTraversalPolicy keep the previously visited node to avoid hysteresis. But even if the visited focus has been disposed, FocusTraversalPolicy will still use it to requestFocus, which will cause FocusManger to get an abandoned node to get the focus.
Added support for a semi-transparent white overlay color for `Material` widgets to indicate their elevation in a dart theme. A new `ThemeData.applyElevationOverlayColor` flag was added to control this behavior, which is off by default for backwards compatibility reasons.
## Description
Instead of detaching from the spawned App process on the device immediately, keep the LLDB client connection open (in autopilot mode) until the App quits or the server connection is lost.
This replicates the behavior of Xcode, which also keeps a debugger attached to the App after launching it.
## Tests
This change will be covered by all running benchmarks (which are launched via "flutter run"/"flutter drive"), and probably be covered by all tests as well.
I also tested the workflow locally -- including cases where the App or Flutter CLI is terminated first.
## Breaking Change
I don't believe this should introduce any breaking changes. The LLDB client automatically exits when the app dies or the device is disconnected, so there shouldn't even be any user-visible changes to the behavior of the tool (besides the output of "-v").
Fixes https://github.com/flutter/flutter/issues/36091.
Previously, a sendRequest will be sent even if the peer is closed during
a driver test. That will cause a time out without any error information.
Such issue is unreproducible on my Mac Book Pro, but 100% reproducible
on our new Mac mini (2018).
The closing issue is tracked in https://github.com/flutter/flutter/issues/36268
Additional to this fix, we should also patch the jason_rpc_2 so the peer
will throw exception if sendRequest is attempted while the connection is
closed.
**Test**:
tiles_scroll_perf_iphonexs__timeline_summary failed without this patch.
It will pass after this patch.
I'm not sure how to add a unit test for this. Please let me know if you have
some ideas.
This patch will generate the following warning log on the new Mac Mini
```
flutter: Observatory listening on http://127.0.0.1:50192/cZPDF4sW7MM=/
Installing and launching... 10.2s
00:00 +0: scrolling performance test (setUpAll)
[info ] FlutterDriver: Connecting to Flutter application at http://127.0.0.1:1069/cZPDF4sW7MM=/
[trace] FlutterDriver: Isolate found with number: 3684677742843303
[trace] FlutterDriver: Isolate is paused at start.
[trace] FlutterDriver: Attempting to resume isolate
[trace] FlutterDriver: Waiting for service extension
[info ] FlutterDriver: Connected to Flutter application.
00:00 +0: scrolling performance test complex_layout_scroll_perf
[warning] FlutterDriver: Instance of '_WebSocketImpl' is closed with an unexpected code 1005
[warning] FlutterDriver: Peer connection is closed! Trying to restore the connection...
00:10 +1: scrolling performance test tiles_scroll_perf
[warning] FlutterDriver: Instance of '_WebSocketImpl' is closed with an unexpected code 1005
[warning] FlutterDriver: Peer connection is closed! Trying to restore the connection...
00:20 +2: scrolling performance test (tearDownAll)
00:20 +2: All tests passed!
Stopping application instance.
```
This updates the flutter tool cache to download binary files for ideviceinstaller, ios-deploy, libimobiledevice, and dynamically linked dependencies from Flutter's GCP bucket.
This updates the flutter tool to cache binary files for ideviceinstaller, ios-deploy, libimobiledevice, and dynamically linked dependencies from Flutter's GCP bucket.
This adds an example of how to move to the "next" field when using TextInputAction.next. This is all that is needed to have "next field" functionality in a field. I thought about making it the default when handling the "next" or "previous" actions, but it's better that the developer has control over whether or not they actually move to the next field, and within which scope.
This changes the example for FocusNode to be more correct, listening to the focus node for changes, instead of assuming that it is the only one doing the changing.
* Remove extra classes.
Now that https://github.com/dart-lang/sdk/issues/31543 is fixed, we
can remove extra classes.
* Add snapConfiguration to parameters for _RenderSliverFloatingPersistentHeaderForWidgets and _RenderSliverFloatingPinnedPersistentHeaderForWidgets constructors.
* Add Colors.white38
* Update ThemeData.disabledColor and ButtonThemeData.disabledColor to Colors.white38
* Update pre-existing tests to expect Colors.white38 instead of Colors.white30
* Update API documentation to reflect these changes
When I added reverseDuration to animation controllers in #32730, I also added it to the implicit animations that Flutter has. However, as @efortuna pointed out to me, it doesn't actually do anything there, since all of the intrinsic animations run forwards, not in the reverse direction, and there's no way to reverse them.
So, this PR removes the reverseDuration argument from the implicit animations to avoid confusion.
Fixes#35769
* add sample code for AnimatedContainer
* use stateful_widget_scaffold snippet template
* add sample explanation
* add setState() to example assumptions for analyzer
* update description
* use snippet instead of sample
* change sample to match assets-for-api-docs
* remove constant
* update AnimatedContainer sample description
add indication the example is depicted by the video and animates when
tapped
* fix example formatting
* make sample conform to 80 col limit
* add "implemented below" to illustration description
* formatting for readability
An upcoming change in the Dart SDK changes `Socket` from
implementing `Stream<List<int>>` to implementing `Stream<Uint8List>`.
This forwards-compatible change in flutter_tools prepares for that
Dart SDK change.
https://github.com/dart-lang/sdk/issues/36900
* Manual roll of engine 45b66b7...ffba2f6
git log 45b66b7...ffba2f6 --oneline
ffba2f68d Roll src/third_party/dart b37aa3b036...0abff7b2bb (#9588)
62514cb77 Roll fuchsia/sdk/core/mac-amd64 from n9fZpXVmsbgKZzS8Q2GXxB453q8AbLpfGztsPsq47pMC to BYCwsJf7r7zfd2THSGinFeIHv552AEVchXdc7VZzP0IC (#9587)
9f2721284 Roll src/third_party/skia e4c88bb1f848..1ddee025229a (7 commits) (#9586)
03a31e0ad Roll fuchsia/sdk/core/linux-amd64 from F9oY0d56X3aONxwv5vw9Gco--AHmC8SHuDXdhdWCnnMC to d2VK3FYSEKQ35UdZw5FdbOZUI_xgT0-1h8DnGDUHPVAC (#9583)
* Fix analyzer warning.