Commit Graph

22085 Commits

Author SHA1 Message Date
Greg Price
5b3293c5ae Fix dislocated doc and comment on ThemeData localize cache (#137315)
This comment on _localizedThemeDataCacheSize was a bit garbled from getting split up, and the doc on _localizedThemeDataCache was missing from having been moved elsewhere.

It looks like the dislocation happened in 8b86d238b (#116088), which was otherwise making unrelated changes, including a couple of lines near these.  Likely it was due to an error in resolving merge or rebase conflicts at some point while revising that PR.
2023-10-26 20:57:52 +00:00
Elias Yishak
56ae555992 Unified analytics events for doctor validators (#136647)
Related to tracking issue:
- https://github.com/flutter/flutter/issues/128251

This PR sends analytic events for each of the doctor validators.

This PR below will need to land first in `dart-lang/tools` before this merges.
2023-10-26 18:23:24 +00:00
Bruno Leroux
b2ec34fcb4 Add ProcessTextService (#137145)
## Description

This PR adds `ProcessTextService` on the framework side to communicate with the engine to query and run text processing actions (on the engine side, only Android is supported currently, see https://github.com/flutter/engine/pull/44579).

## Related Issue

Non-UI framework side for https://github.com/flutter/flutter/issues/107603

## Tests

Adds 3 tests.
2023-10-26 11:44:07 +00:00
Mairramer
de4e3d67a0 fix:: trigger onTapOutside only if has focus (#136291)
Adds new feat and fix to https://github.com/flutter/flutter/issues/134341
2023-10-26 00:26:20 +00:00
Michael Goderbauer
1c90ed8b64 Fix structure of pkg:integration_test (#137283)
The private _ libraries should not be advertised as importable. Moving them to the src directory.

I noticed this while browsing our dart docs. This should remove the underscore entries.

![image](https://github.com/flutter/flutter/assets/1227763/41511efe-4eb8-487a-9758-ccde1720e05a)

Replaces https://github.com/flutter/flutter/pull/137197.
2023-10-25 20:24:15 +00:00
Victoria Ashworth
5dd2a4e0aa Ensure Xcode project is setup to start debugger (#136977)
Some users have their Xcode settings set to not debug (see example here https://github.com/flutter/flutter/issues/136197#issuecomment-1766834195). This will cause the [engine check for a debugger](22ce5c6a45/runtime/ptrace_check.cc (L56-L71)) to fail, which will cause an error and cause the app to crash.

This PR parses the scheme file to ensure the scheme is set to start a debugger and warn the user if it's not.

Fixes https://github.com/flutter/flutter/issues/136197.
2023-10-25 17:08:57 +00:00
Taha Tesser
d0fe9f203d Revert "Update OutlinedButton tests for Material 3 (#136809)" (#137242)
This reverts commit d36a843335
(https://github.com/flutter/flutter/pull/136809)

This fails even tho golden files were approved and `golden test` pending
was cleared and green and `autosubmit` successfully merged the PR.


```console
02:42 +4618 ~5: C:/b/s/w/ir/x/w/flutter/packages/flutter/test/material/outlined_button_test.dart: Material3 - OutlinedButton, OutlinedButton.icon defaults
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following SkiaException was thrown while running async test code:
Skia Gold received an unapproved image in post-submit
testing. Golden file images in flutter/flutter are triaged
in pre-submit during code review for the given PR.

Visit https://flutter-gold.skia.org/ to view and approve
the image(s), or revert the associated change. For more
information, visit the wiki:
https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter

Debug information for Gold --------------------------------
stdout: Given image with hash 37275e74c51f98d7abd7f301c5c94ac1 for test
material.outlined_button.ink_sparkle.default
Expectation for test: 531f5fa74908d2e6db2b8fd86a6b8662 (positive)
Expectation for test: 683e368ff51d947a3d63c2a5f4568cf6 (positive)
Expectation for test: 749241ff0fa21595b2c6cb551fd40b68 (positive)
Expectation for test: aaf9ac1328614d6c9f4540308bc86f62 (positive)
Expectation for test: b31a50440c7dd31b10cacd9e7b5c6b86 (positive)
Expectation for test: c0a7c8c625b69ddc695a770f28abd403 (positive)
Expectation for test: f1f66ce931c2ef33ebcb699a637025a6 (positive)
Expectation for test: 2d32e34efc1d7ca4cd12965402fb76ff (positive)
Untriaged or negative image:
https://flutter-gold.skia.org/detail?grouping=name%3Dmaterial.outlined_button.ink_sparkle.default%26source_type%3Dflutter&digest=37275e74c51f98d7abd7f301c5c94ac1


stderr: Test: material.outlined_button.ink_sparkle.default FAIL


result-state.json: No result file found.

When the exception was thrown, this was the stack:
#0      SkiaGoldClient.imgtestAdd (package:flutter_goldens_client/skia_client.dart:243:7)
<asynchronous suspension>
#1      MatchesGoldenFile.matchAsync.<anonymous closure> (package:flutter_test/src/_matchers_io.dart:118:32)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from dart:async)

The exception was caught asynchronously.
════════════════════════════════════════════════════════════════════════════════════════════════════
02:42 +4618 ~5 -1: C:/b/s/w/ir/x/w/flutter/packages/flutter/test/material/menu_anchor_test.dart: Menu functions keyboard directional traversal works
02:42 +4618 ~5 -1: C:/b/s/w/ir/x/w/flutter/packages/flutter/test/material/outlined_button_test.dart: Material3 - OutlinedButton, OutlinedButton.icon defaults [E]
  Test failed. See exception logs above.
  The test description was: Material3 - OutlinedButton, OutlinedButton.icon defaults
  
02:42 +4619 ~5 -1: C:/b/s/w/ir/x/w/flutter/packages/flutter/test/material/menu_anchor_test.dart: Menu functions keyboard directional traversal works
```

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-10-25 14:48:27 +03:00
Taha Tesser
d36a843335 Update OutlinedButton tests for Material 3 (#136809)
Updated unit tests for `CircleOutlinedButton` to have M2 and M3 versions.

More info in #127064

This also gets rid of unnecessary `fromSwatch` usage (part of https://github.com/flutter/flutter/issues/132584 documentation and test cleanup)
2023-10-25 10:06:27 +00:00
fzyzcjy
6df6c897ef Let OverflowBox be shrink-wrappable (#129095)
Close https://github.com/flutter/flutter/issues/129094

I have demonstrated how this PR fixes the problem using tests in #129094. I will further add tests in this PR if the PR looks roughly acceptable :)
2023-10-25 03:51:24 +00:00
Polina Cherkasova
dcbb2de0ad Add dependency on leak_tracker to flutter_test. (#137069)
Contributes to: https://github.com/flutter/flutter/issues/135856

This PR also adds transitive dependency on  web_socket_channel, crypto, typed_data. `web_socket_channel` is needed to request retaining path for not GCed objects from VM Service. Two others are needed to serve web_socket_channel.

The dependency on leak_tracker is pinned:
aea562114c/packages/flutter_tools/lib/src/commands/update_packages.dart (L40)
2023-10-25 02:45:26 +00:00
yim
25c5bf0640 fix SliverReorderableLists item wrong offset (#136828)
This PR fixes the issue of items being created at the wrong position during dragging.

Fixes #135819
2023-10-25 01:11:18 +00:00
Jackson Gardner
4afdfca264 Remove bringup: true from realm_checker and remove the redundant tool test. (#137186)
Now that the realm checker is no longer in bringup, we can remove the tool test that checks for the empty realm file.
2023-10-25 01:09:18 +00:00
Qun Cheng
ebc67643bd Revert "Fix Gradle lockfiles." (#137198)
Reverts flutter/flutter#137190
2023-10-24 17:47:45 -07:00
Polina Cherkasova
ccbe221b3d Fix Gradle lockfiles. (#137190) 2023-10-24 23:19:52 +00:00
Tirth
ad448db6b5 Fix Typos (#137173)
Fix Small Typos.
2023-10-24 22:35:05 +00:00
lirantzairi
7cd6fd43a1 TextField - allow to customize cursor color in error state (#136121)
The color of the TextField's cursor in error state is the same as the error text color by default. However we should be allowed to customize it

Fixes #135580
2023-10-24 20:44:18 +00:00
Chris Bracken
c15ff6820f [macOS] Refactor macOS build/codesize analysis (#137164)
Extracts out _shouldWriteCodeSizeAnalysis and _writeCodeSizeAnalysis from the main buildMacOS function.

No tets changes sine this is a simple restructuring for readability and does not change any tool logic.
2023-10-24 19:19:17 +00:00
cui fliter
c5e71b3e59 fix some typos (#137144)
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

fix some typos

*List which issues are fixed by this PR. You must list at least one issue.*

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2023-10-24 15:27:07 +00:00
auto-submit[bot]
8df62188f0 Reverts "Use coverage.collect's coverableLineCache param to speed up coverage" (#137121)
Reverts flutter/flutter#136851
Initiated by: CaseyHillers
This change reverts the following previous change:
Original Description:
One of the reasons gathering coverage information is expensive is that we have to force compile every function in the libraries we're interested in. Without this, functions that haven't been invoked (so haven't been compiled) won't have any line number information, so the coverage tool doesn't know which lines to add to the list of misses. In flutter's case, the test infra spawns many VMs, and each of these needs to recompile all those libraries.

To fix this, we need a way of skipping force compilation for libraries we've already seen in previous tests, without losing the information about which lines in each library are coverable. So I [added](https://github.com/dart-lang/coverage/pull/466) the `coverableLineCache` to `coverage.collect` in package:coverage v1.7.0. This cache starts out empty, but fills up with lists of all the lines that are coverable for every library as coverage is gathered. package:coverage can then tell the VM not to force compile any libraries in this cache (using `getSourceReport`'s `librariesAlreadyCompiled` param). So the first test suite will still have to compile everything, but subsequent test suites will be much faster.

This speeds up coverage collection significantly, for large test suites:

| Running flutter/packages/flutter tests... | Time | Overhead |
| --- | --- | --- |
| without coverage | 8:53 | - |
| with coverage | 20:25 | 130% |
| with `coverableLineCache` | 12:21 | 40% |

Bug: https://github.com/flutter/flutter/issues/100751
2023-10-24 02:38:27 +00:00
Polina Cherkasova
5d43869c32 Upgrade packages in flutter and flutter_test. (#137106) 2023-10-23 16:20:32 -07:00
Kostia Sokolovskyi
38f318b465 Cover last test/material tests with leak tracking. (#137004) 2023-10-23 14:37:43 -07:00
Ross Llewallyn
57a20ef2a1 CustomPainterSemantics doc typo (#137081)
Just a documentation typo, I think.

#137080
2023-10-23 20:52:29 +00:00
Liam Appelbe
fb297e1d3b Use coverage.collect's coverableLineCache param to speed up coverage (#136851)
One of the reasons gathering coverage information is expensive is that we have to force compile every function in the libraries we're interested in. Without this, functions that haven't been invoked (so haven't been compiled) won't have any line number information, so the coverage tool doesn't know which lines to add to the list of misses. In flutter's case, the test infra spawns many VMs, and each of these needs to recompile all those libraries.

To fix this, we need a way of skipping force compilation for libraries we've already seen in previous tests, without losing the information about which lines in each library are coverable. So I [added](https://github.com/dart-lang/coverage/pull/466) the `coverableLineCache` to `coverage.collect` in package:coverage v1.7.0. This cache starts out empty, but fills up with lists of all the lines that are coverable for every library as coverage is gathered. package:coverage can then tell the VM not to force compile any libraries in this cache (using `getSourceReport`'s `librariesAlreadyCompiled` param). So the first test suite will still have to compile everything, but subsequent test suites will be much faster.

This speeds up coverage collection significantly, for large test suites:

| Running flutter/packages/flutter tests... | Time | Overhead |
| --- | --- | --- |
| without coverage | 8:53 | - |
| with coverage | 20:25 | 130% |
| with `coverableLineCache` | 12:21 | 40% |

Bug: https://github.com/flutter/flutter/issues/100751
2023-10-23 20:16:03 +00:00
LongCatIsLooong
117c7097ca Fix TextStyle terminology (#137000)
cascading -> inheritance
2023-10-23 17:15:10 +00:00
Tirth
2de1af40f3 Add InputDatePickerFormField.focusNode prop (#136673)
Adds `focusNode` prop to `InputDatePickerFormField` widget.

Fixes #105881
2023-10-23 17:15:08 +00:00
Taha Tesser
6c3010e7e1 Add delete button support to FilterChip (#136645)
fixes [`FilterChip` should have `DeletableChipAttributes`/`trailing` to match Material 3 spec.](https://github.com/flutter/flutter/issues/135595)

### Code sample

<details>
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return  MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(useMaterial3: true),
      home: const Example(),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text('FilterChip'),
            const SizedBox(height: 8),
            FilterChip(
              avatar: const Icon(Icons.favorite_rounded),
              label: const Text('FilterChip'),
              selected: true,
              showCheckmark: false,
              onSelected: (bool value) {},
              onDeleted: () {},
              deleteButtonTooltipMessage: 'Delete Me!',
            ),
            const SizedBox(height: 16),
            FilterChip(
              avatar: const Icon(Icons.favorite_rounded),
              label: const Text('FilterChip'),
              onSelected: (bool value) {},
              onDeleted: () {},
            ),
            const SizedBox(height: 48),
            const Text('FilterChip.elevated'),
            const SizedBox(height: 8),
            FilterChip.elevated(
              avatar: const Icon(Icons.favorite_rounded),
              label: const Text('FilterChip'),
              selected: true,
              showCheckmark: false,
              onSelected: (bool value) {},
              onDeleted: () {},
            ),
            const SizedBox(height: 16),
            FilterChip.elevated(
              avatar: const Icon(Icons.favorite_rounded),
              label: const Text('FilterChip'),
              onSelected: (bool value) {},
              onDeleted: () {},
            ),
          ],
        ),
      ),
    );
  }
}
```

</details>

### Before

Not possible to add delete button

### After 
![Screenshot 2023-10-16 at 17 56 51](https://github.com/flutter/flutter/assets/48603081/ad751ef9-c2bc-4184-ae5f-4d1017eff664)
2023-10-23 16:19:25 +00:00
Taha Tesser
5e8b5f4ea2 Update ColorScheme.fromSwatch docs for Material 3 (#136816)
part of [Clarify ColorScheme fromSwatch/fromSeed usage](https://github.com/flutter/flutter/issues/132584)
2023-10-23 15:57:44 +00:00
chunhtai
e8691444a2 Reland "Fixes ability to call nextFocus() on a node to focus its desc… (#136898)
…endant" (#136894)"

This reverts commit c2bd2c1175.

fixes https://github.com/flutter/flutter/issues/134854

This is a straight reland, the internal test is testing a wrong behave. https://critique.corp.google.com/cl/575028981
2023-10-23 15:56:06 +00:00
LongCatIsLooong
af129b61c5 OverlayPortal.overlayChild contributes semantics to OverlayPortal instead of Overlay (#134921)
Fixes https://github.com/flutter/flutter/issues/134456
2023-10-23 15:45:46 +00:00
Todd Volkert
cb9a3f698c Add timeline events for post frame callbacks (#136435)
Before this change, long-running post-frame callbacks wouldn't show up in the timeline at all.  This adds a timeline event for post-frame callbacks, with a debug flag that will add timeline events for each individual callback.

#testexempt -- we have no way to test calls to the timeline.
2023-10-22 20:46:21 +00:00
Binni Goel
2ec771aa9c Test cover painting for memory leaks (#136696) 2023-10-20 21:11:47 -07:00
Harry Terkelsen
464e751a78 Reland "Use Layer.toImage for golden tests on CanvasKit" (#136918)
Relands https://github.com/flutter/flutter/pull/135249

A golden test was failing in post submit in the previous PR
2023-10-20 15:45:26 -07:00
Robert Ancell
849ff0d029 Add missing call to parent method of GApplication::shutdown, implement GApplication::startup (#136836)
Fixes a warning introduced in https://github.com/flutter/flutter/pull/136780 and adds the other related function.
2023-10-20 22:19:57 +00:00
LongCatIsLooong
5f477642c4 RenderEditable WidgetSpan intrinsics (#136979)
Update the `RenderEditable` implementation to match `RenderParagraph`. Fixes https://github.com/flutter/flutter/issues/136596
2023-10-20 21:32:19 +00:00
flutter-pub-roller-bot
d7c82888c3 Roll pub packages (#136924)
This PR was generated by `flutter update-packages --force-upgrade`.
2023-10-20 20:36:29 +00:00
Daco Harkes
0a18aa4667 Default NativeAssets Darwin and IOS target archs if missing (#136948)
Make the `NativeAssets` target consistent with `build_info.dart`'s
documentation on missing `IosArchs` or `DarwinArchs`.

Bug:

* https://github.com/flutter/flutter/issues/136931

Also, updates the doc to reflect that MacOS is by default built for both
x64 and arm64. The PR making universal binaries the default didn't
update the doc comment.

* https://github.com/flutter/flutter/pull/100271

Please note that these defines are handled inconsistently in
`flutter_tools`. In some places they default to what's specified in the
doc-comment. In other places a `MissingDefineException` is thrown. I
believe the code around `build_info.dart` and the `environment` could
benefit from a wrapping so that defaults or missing definitions are
handled consistently in the code base.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-10-20 09:28:52 -07:00
Kate Lovett
548843b9f9 Revert "[Velocity Tracker] Fix: Issue 97761: Flutter Scrolling does not match iOS; inadvertent scrolling when user lifts up finger" (#136905)
Reverts flutter/flutter#132291

We have found this introduced flakiness in many of our tests.

Fixes https://github.com/flutter/flutter/issues/135728
2023-10-19 22:10:14 +00:00
Christopher Fujino
fd1604666e [flutter_tools] move build_preview_test from commands/permeable to integration shard (#136912)
Fixes https://github.com/flutter/flutter/issues/136907 by moving the test to the tools integration shard, which DOES have VS code installed.
2023-10-19 22:03:04 +00:00
Andrew Kolos
25bed918b8 do not include entries from --dart-define-from-file files in the gradle config or environment during build (#136865)
Fixes https://github.com/flutter/flutter/issues/130599 and https://github.com/flutter/flutter/issues/136444
2023-10-19 21:01:51 +00:00
Qun Cheng
40776d01f1 Allow users to customize search algorithm in DropdownMenu (#136848)
Fixes #136735

This PR is to add a searchCallback to allow users to customize the search algorithm. This feature is used to fix b/305662376 which needs an exact match algorithm.
2023-10-19 18:32:50 +00:00
Elliott Brooks
01eef7ca13 Upgrade Flutter deps to pull in latest vm_service and dwds (#136734)
Generated by running `flutter update-packages --force-upgrade`

Updates vm_service to [12.0.0](https://pub.dev/packages/vm_service/versions/12.0.0) and dwds to [22.0.0](https://pub.dev/packages/dwds/versions/22.0.0)

The changes to `packages/flutter_tools/lib/src/isolated/devfs_web.dart` are for the new interface of DWDS introduced in https://github.com/dart-lang/webdev/pull/2243

FYI @bkonyi
2023-10-19 18:29:02 +00:00
Victoria Ashworth
3c3d414e7c [Reland] Skip injecting Bonjour settings when port publication is disabled (#136842)
Reland https://github.com/flutter/flutter/pull/136751 with fixes.
2023-10-19 17:38:52 +00:00
Kostia Sokolovskyi
9fa9fd365c _DefaultTabControllerState should dispose all created TabContoller instances. (#136608) 2023-10-19 10:38:19 -07:00
Greg Spencer
0abb017cfd Reland: "Add code for updating focusedChild when removing grandchildren from scope" (#136899) 2023-10-19 10:22:46 -07:00
auto-submit[bot]
c2bd2c1175 Reverts "Fixes ability to call nextFocus() on a node to focus its descendant" (#136894)
Reverts flutter/flutter#136773
Initiated by: itsjustkevin
This change reverts the following previous change:
Original Description:
fixes https://github.com/flutter/flutter/issues/134854
2023-10-19 14:38:26 +00:00
auto-submit[bot]
cbf50a953b Reverts "Add code for updating focusedChild when removing grandchildren from scope" (#136862)
Reverts flutter/flutter#136771
Initiated by: gspencergoog
This change reverts the following previous change:
Original Description:
## Description

This adds code to make sure that grandchildren are removed from the `focusedChild` of a scope when the child is detached.

## Related Issues
 - Fixes https://github.com/flutter/flutter/issues/136758

## Tests
 - Added regression test.
2023-10-19 03:13:25 +00:00
auto-submit[bot]
c881808ed2 Reverts "Use Layer.toImage for golden tests on CanvasKit" (#136860)
Reverts flutter/flutter#135249
Initiated by: zanderso
This change reverts the following previous change:
Original Description:
Changes golden tests on CanvasKit to use Layer.toImage instead of browser APIs for screenshots. This brings it more in line with other platforms and should also fix some async timing bugs with tests.
2023-10-19 02:20:19 +00:00
Michael Goderbauer
571039f6ee Bump flutter_lints to 3.0 (#136841)
Follow-up to https://github.com/flutter/packages/pull/5177
2023-10-18 23:53:08 +00:00
Greg Spencer
2492242593 Add code for updating focusedChild when removing grandchildren from scope (#136771)
## Description

This adds code to make sure that grandchildren are removed from the `focusedChild` of a scope when the child is detached.

## Related Issues
 - Fixes https://github.com/flutter/flutter/issues/136758

## Tests
 - Added regression test.
2023-10-18 23:44:40 +00:00
Harry Terkelsen
747128ff7a Use Layer.toImage for golden tests on CanvasKit (#135249)
Changes golden tests on CanvasKit to use Layer.toImage instead of
browser APIs for screenshots. This brings it more in line with other
platforms and should also fix some async timing bugs with tests.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-10-18 16:39:27 -07:00