Commit graph

22838 commits

Author SHA1 Message Date
hangyu 14b914ab92
Reland [a11y] Fix date picker cannot focus on the edit field (#144198)
reland https://github.com/flutter/flutter/pull/143117 


fixes: https://github.com/flutter/flutter/issues/143116
fixes: https://github.com/flutter/flutter/issues/141992

## 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].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] 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
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-02-29 15:16:53 -08:00
Lau Ching Jun f3ce9d2fcb
Make daemon server work on ipv6-only machines. (#144359)
Retry binding on ipv6 if binding on ipv4 failed.
2024-02-29 23:10:50 +00:00
Qun Cheng ee6111a7aa
Remove deprecated backgroundColor from ThemeData (#144079)
This PR is to remove deprecated ThemeData.backgroundColor.

These parameters are made obsolete in https://github.com/flutter/flutter/pull/110162.
Part of https://github.com/flutter/flutter/issues/143956
2024-02-29 23:07:23 +00:00
Amir Panahandeh 6068891373
Add stateful reordering test for TwoDimensionalViewport (#142375)
Adds a test to validate state is preserved after reordering in `TwoDimensionalViewport` (reference: https://github.com/flutter/flutter/pull/141504#pullrequestreview-1837501775).

- Fixes #130754
2024-02-29 23:03:53 +00:00
Lau Ching Jun cfa011dd9d
Fix a crash in remote device daemon. (#144358)
The daemon server is expecting the client to pass `deviceId` in `device.shutdownDartDevelopmentService` method.

24a792dae1/packages/flutter_tools/lib/src/commands/daemon.dart (L1239)
2024-02-29 22:29:08 +00:00
Qun Cheng 1349c591cc
Remove toggleableActiveColor from ThemeData (#144178)
This PR is to remove deprecated ThemeData.toggleableActiveColor.

These parameters are made obsolete in https://github.com/flutter/flutter/pull/97972.
Part of https://github.com/flutter/flutter/pull/111080
2024-02-29 20:58:11 +00:00
LongCatIsLooong 726e5d28c0
Add FocusNode.focusabilityListenable (#144280)
This is for https://github.com/flutter/flutter/issues/127803: a text field should unregister from the scribble scope, when it becomes unfocusable. 

When a `FocusNode` has listeners and its `_canRequestFocus` flag is set to true, it adds `+1` to `_focusabilityListeningDescendantCount` of all ancestors until it reaches the first ancestor with `descendantsAreFocusable = false`. When the a `FocusNode`'s `descendantsAreFocusable` changes, all listeners that contributed to its `_focusabilityListeningDescendantCount` will be notified.
2024-02-29 20:40:46 +00:00
Bruno Leroux e92bca3ff5
[flutter_tools] Update external link in Android manifest template (#144302)
## Description

This PR simplifies one external link in a commented section of the Android manifest template.

## Related Issue

Fixes https://github.com/flutter/flutter/issues/144249

## Tests

Documentation only PR.
2024-02-29 06:47:19 +00:00
Justin McCandless ac66b295c7
Docs on the interaction between Shortcuts and text input (#144328)
I was talking with @tvolkert about the complex behavior of Shortcuts when a text field is focused.  I created [this dartpad](https://dartpad.dev/?id=0b5c08fa85637422baa84927b7f1ee5f) to illustrate the problem, which shows a key being stolen from a text field by Shortcuts, and how to prevent that using DoNothingAndStopPropagationIntent.

This PR adds a section in the docs explaining how all of this works and how to override this "stealing" problem.
2024-02-29 01:09:18 +00:00
Dan Field 835112de79
Use robolectric/AndroidJUnit4 for integration test tests (#144348)
This allows relanding https://github.com/flutter/engine/pull/51056. The patch introduced a change where a static member is initialized from `View.generateViewId()` instead of conditionally using that API. Without an implementation for that in android.jar, the test will fail. The test in here currently is using a fake implementation that creates errors seen below.

See https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8754827734484522225/+/u/run_plugin_test/stdout#L46564_2 for failure. More detailed failure information is available locally in the `build` folder:

```
Mockito cannot mock this class: class io.flutter.embedding.android.FlutterActivity.

If you're not sure why you're getting this error, please open an issue on GitHub.

Java               : 17
JVM vendor name    : JetBrains s.r.o.
JVM vendor version : 17.0.7+0-17.0.7b1000.6-10550314
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 17.0.7+0-17.0.7b1000.6-10550314
JVM info           : mixed mode
OS name            : Mac OS X
OS version         : 14.3.1

You are seeing this disclaimer because Mockito is configured to create inlined mocks.
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.

Underlying exception : org.mockito.exceptions.base.MockitoException: Cannot instrument class io.flutter.embedding.android.FlutterActivity because it or one of its supertypes could not be initialized
	at app//dev.flutter.plugins.integration_test.FlutterDeviceScreenshotTest.getFlutterView_returnsFlutterViewForFlutterActivity(FlutterDeviceScreenshotTest.java:32)
	at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base@17.0.7/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base@17.0.7/java.lang.reflect.Method.invoke(Unknown Source)
	at app//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at app//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at app//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at app//org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at app//org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at app//org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at app//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at app//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at app//org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at app//org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at app//org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at app//org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at app//org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at app//org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
	at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base@17.0.7/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base@17.0.7/java.lang.reflect.Method.invoke(Unknown Source)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at jdk.proxy1/jdk.proxy1.$Proxy2.processTestClass(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:176)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:133)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: org.mockito.exceptions.base.MockitoException: Cannot instrument class io.flutter.embedding.android.FlutterActivity because it or one of its supertypes could not be initialized
	at app//net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168)
	at app//net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399)
	at app//net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:190)
	at app//net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:410)
	... 44 more
Caused by: java.lang.RuntimeException: Method generateViewId in android.view.View not mocked. See http://g.co/androidstudio/not-mocked for details.
	at android.view.View.generateViewId(View.java)
	at io.flutter.embedding.android.FlutterActivity.&lt;clinit&gt;(FlutterActivity.java:218)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Unknown Source)
	at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.assureInitialization(InlineBytecodeGenerator.java:236)
	at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.triggerRetransformation(InlineBytecodeGenerator.java:261)
	at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.mockClass(InlineBytecodeGenerator.java:218)
	at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.lambda$mockClass$0(TypeCachingBytecodeGenerator.java:47)
	at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168)
	at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399)
	at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:190)
	at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:410)
	at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.mockClass(TypeCachingBytecodeGenerator.java:40)
	at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.createMockType(InlineDelegateByteBuddyMockMaker.java:396)
	at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.doCreateMock(InlineDelegateByteBuddyMockMaker.java:355)
	at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.createMock(InlineDelegateByteBuddyMockMaker.java:334)
	at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMock(InlineByteBuddyMockMaker.java:56)
	at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:99)
	at org.mockito.internal.MockitoCore.mock(MockitoCore.java:88)
	at org.mockito.Mockito.mock(Mockito.java:2087)
	at org.mockito.Mockito.mock(Mockito.java:2002)
	... 44 more
```
2024-02-29 00:57:24 +00:00
LongCatIsLooong dddbd047d1
Reland "Cache FocusNode.enclosingScope, clean up descendantsAreFocusable (#144207)" (#144330)
The [internal test failure](https://github.com/flutter/flutter/pull/144207#issuecomment-1968236339) was caused by `Focus.withExternalFocusNode` modifying the external node's attributes. The extra changes are in this commit:  e53d98b06c

CL with (almost) passing TGP: cl/611157582
2024-02-29 00:48:01 +00:00
Tong Mu e316022227
ReportTiming callback should record the sendFrameToEngine when it was scheduled (#144212)
Fixes https://github.com/flutter/flutter/issues/144261
2024-02-29 00:47:55 +00:00
Justin McCandless e6a6a473f7
Mention SelectionArea in SelectableText docs (#143784)
Most users should be using SelectionArea over SelectableText, so this makes that more clear/discoverable in the docs.
2024-02-28 14:36:08 -08:00
Qun Cheng 0d8eafb006
Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
Tomasz Gucio 88f75712d7
Remove irrelevant comment in TextPainter (#144308)
This PR removes an irrelevant comment in `TextPainter` for `_computePaintOffsetFraction`. Also some typos are corrected and missing spaces/newlines added.

test-exempt: no functional change
2024-02-28 21:47:06 +00:00
Victoria Ashworth 39a13539e0
Reland "Add FlutterMacOS.xcframework artifact (#143244)" (#144275)
Reland https://github.com/flutter/flutter/pull/143244. It was reverted due to https://github.com/flutter/flutter/issues/144251, which is fixed by https://github.com/flutter/engine/pull/51023.
2024-02-28 20:09:54 +00:00
Christopher Fujino f89b4f151e
[flutter_tools] Catch rpc error in render frame with raster stats (#144190)
Fixes https://github.com/flutter/flutter/issues/143010. This is intended to be cherrypicked into the 3.19 and 3.20 releases.

Long-term, we should deprecate this feature: https://github.com/flutter/flutter/issues/144191
2024-02-28 18:54:18 +00:00
Alex Li 47b0ef8127
🛡️ Guard Flutter Android app by disallow task affinity by default (#144018)
Partial resolution for #63559

## 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.
- [ ] 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].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-02-28 10:31:36 -08:00
auto-submit[bot] 450506868d
Reverts "Cache FocusNode.enclosingScope, clean up descendantsAreFocusable (#144207)" (#144292)
Reverts flutter/flutter#144207

Initiated by: CaseyHillers

Reason for reverting: b/327301206 - Breaking a customer test

Original PR Author: LongCatIsLooong

Reviewed By: {gspencergoog}

This change reverts the following previous change:
Original Description:
`FocusNode.canRequestFocus` was doing a double traversal if no ancestor disallows focus. The last for loop only has to reach as far as the enclosing scope.

Also this caches the `FocusNode.enclosingScope` since the getter access happens much more frequently than node reparenting.
2024-02-28 05:06:47 +00:00
Polina Cherkasova 42b02d0a3a
Use const route for notAnnounced. (#144050) 2024-02-27 16:17:59 -08:00
Taha Tesser 551731697e
Add tabs_utils.dart class (#143937)
This a test utility class for `tabs_test.dart` to prepare the class for Material 3 tests updates.

More info in https://github.com/flutter/flutter/issues/139076
2024-02-28 00:17:20 +00:00
Qun Cheng e707f0de69
Remove bottomAppBarColor from ThemeData (#144080)
This PR is to remove deprecated ThemeData.bottomAppBarColor.

These parameters are made obsolete in https://github.com/flutter/flutter/pull/110162.
Part of https://github.com/flutter/flutter/pull/111080
2024-02-28 00:07:51 +00:00
ufolux d0fb2929df
fix: unexpected chinese punctuation (#143678)
*Fixed the issue with abnormal Chinese punctuation marks.*
2024-02-27 23:47:22 +00:00
Elias Yishak d3b60d4649
Clean up lint ignores (#144229)
Fixes:
- https://github.com/dart-lang/tools/issues/234

Bumps the version for package:unified_analytics and removes TODOs and lint ignores
2024-02-27 23:21:03 +00:00
hangyu fdb17ab069
Reland [a11y] Add isEnabled semantics flag to text field (#143601)
Reland #143334
2024-02-27 22:49:13 +00:00
LongCatIsLooong 2c2fed1dfb
Remove deprecated CupertinoContextMenu.previewBuilder (#143990)
It was deprecated in https://github.com/flutter/flutter/pull/110616.

Deprecated in https://github.com/flutter/flutter/pull/110616
2024-02-27 22:49:10 +00:00
auto-submit[bot] 2eee0b5750
Reverts "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2 (#144001)" (#144262)
Reverts flutter/flutter#144001

Initiated by: Piinks

Reason for reverting: Failing goldens at the tip of tree

Original PR Author: QuncCccccc

Reviewed By: {HansMuller}

This change reverts the following previous change:
Original Description:
Reverts flutter/flutter#143973

This is a reland for #138521 with an updated g3fix(cl/605555997). Local test: cl/609608958.
2024-02-27 22:04:18 +00:00
auto-submit[bot] 7f2b238c55
Reverts "Add FlutterMacOS.xcframework artifact (#143244)" (#144253)
Reverts flutter/flutter#143244

Initiated by: vashworth

Reason for reverting: Increased `flutter_framework_uncompressed_bytes` - see https://github.com/flutter/flutter/issues/144251

Original PR Author: vashworth

Reviewed By: {jmagman}

This change reverts the following previous change:
Original Description:
Replace `FlutterMacOS.framework` cached artifact with `FlutterMacOS.xcframework`. Also, update usage of `FlutterMacOS.framework` to use `FlutterMacOS.xcframework`.

Part of https://github.com/flutter/flutter/issues/126016.
2024-02-27 20:47:26 +00:00
Martin Kustermann 616a0260fe
[web] Make flutter web profile builds always keep wasm symbols (#144130)
So far `flutter build web --wasm` was always stripping wasm symbols
except if `--no-strip-wasm` is passed.

=> Ensure that in profile mode we also keep the symbols
2024-02-27 21:21:42 +01:00
Qun Cheng 871d59221c
Reland - Introduce tone-based surfaces and accent color add-ons - Part 2 (#144001)
Reverts flutter/flutter#143973

This is a reland for #138521 with an updated g3fix(cl/605555997). Local test: cl/609608958.
2024-02-27 20:21:14 +00:00
LongCatIsLooong c353cb0123
Cache FocusNode.enclosingScope, clean up descendantsAreFocusable (#144207)
`FocusNode.canRequestFocus` was doing a double traversal if no ancestor disallows focus. The last for loop only has to reach as far as the enclosing scope.

Also this caches the `FocusNode.enclosingScope` since the getter access happens much more frequently than node reparenting.
2024-02-27 19:16:06 +00:00
LongCatIsLooong a23c81333f
Remove strut migration flag from TextPainter (#144242)
Fixes https://github.com/flutter/flutter/issues/142969.

G3fix: cl/610790040
2024-02-27 19:13:58 +00:00
Victoria Ashworth d1d9605974
Remove force Xcode debug workflow (#144185)
Now that all tests are on Xcode 15 and iOS 17, we no longer need to force test Xcode debug workflow.

Related https://github.com/flutter/flutter/issues/144020.
2024-02-27 18:18:07 +00:00
Victoria Ashworth 42252cd4c6
Add FlutterMacOS.xcframework artifact (#143244)
Replace `FlutterMacOS.framework` cached artifact with `FlutterMacOS.xcframework`. Also, update usage of `FlutterMacOS.framework` to use `FlutterMacOS.xcframework`.

Part of https://github.com/flutter/flutter/issues/126016.
2024-02-27 16:47:53 +00:00
Jia Hao c30f998eb5
[flutter_tools] Fix missing stack trace from daemon (#144113)
When the daemon throws an exception, the receiving client is unable to surface stack traces from the daemon.

This is because it is sent with the `trace` key here:

1e8dd1e4d6/packages/flutter_tools/lib/src/daemon.dart (L308)

But the client tries to read it with the `stackTrace` key here:

1e8dd1e4d6/packages/flutter_tools/lib/src/daemon.dart (L343)

Thanks to @mraleph for spotting this!

*List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.*

b/326825892
2024-02-27 08:39:49 +00:00
Polina Cherkasova 523b0c4d84
Move debugShowWidgetInspectorOverride (#144029)
Contributes to https://github.com/dart-lang/leak_tracker/issues/218
2024-02-26 23:55:52 +00:00
Nate 7b5ec588d1
Allow Listenable.merge() to use any iterable (#143675)
This is a very small change that fixes #143664.
2024-02-26 23:52:23 +00:00
Gustl22 b4f925e85a
refactor: Differentiate pubspec and resolution errors for plugins (#142035)
Part of #137040 and #80374

- Differentiate pubspec and resolution errors
- Rename platform to platformKey
- Add TODO for rework logic of flag [throwOnPluginPubspecError]
- Swap for loop: handle by platform and then by plugin
2024-02-26 19:45:18 +00:00
Nate 60d28ad913
Implementing switch expressions in rendering/ (#143812)
This pull request is part of the effort to solve issue #136139.

The previous [`switch` expressions PR](https://github.com/flutter/flutter/pull/143496) was comprised of many simple changes throughout `flutter/lib/src/`, but due to some more in-depth refactoring in `flutter/lib/src/rendering/`, I decided to submit the changes to this directory as a separate pull request.

There was really just one function that I changed significantly; I'll add a comment for explanation.
2024-02-26 17:36:21 +00:00
Victoria Ashworth 45c8881eb2
Update copyDirectory to allow links to not be followed (#144040)
In other words, copy links within a directory as links rather than copying them as files/directories. 

Fixes https://github.com/flutter/flutter/issues/144032.
2024-02-26 16:07:22 +00:00
Taha Tesser 41b1aea281
Fix Scrollbar.thickness property is ignored when the Scrollbar is hovered (#144012)
fixes [`Scrollbar.thickness` property is ignored when the `Scrollbar` is hovered](https://github.com/flutter/flutter/issues/143881)

### 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) {
    final ScrollController scrollController = ScrollController();

    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Material(
        child: ScrollConfiguration(
          behavior: const NoScrollbarBehavior(),
          child: ScrollbarTheme(
            data: ScrollbarThemeData(
              thickness: MaterialStateProperty.all(25.0),
              showTrackOnHover: true,
            ),
            child: Scrollbar(
              thickness: 50.0,
              thumbVisibility: true,
              radius: const Radius.circular(3.0),
              controller: scrollController,
              child: SingleChildScrollView(
                controller: scrollController,
                child: const SizedBox(width: 4000.0, height: 4000.0),
              ),
            ),
          ),
        ),
      ),
    );
  }
}

class NoScrollbarBehavior extends ScrollBehavior {
  const NoScrollbarBehavior();

  @override
  Widget buildScrollbar(
          BuildContext context, Widget child, ScrollableDetails details) =>
      child;
}
```

</details>

### Preview

| Before | After |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/3537d60d-a5b2-488d-aa99-4c36c3721657"  /> | <img src="https://github.com/flutter/flutter/assets/48603081/cfd02095-a327-4b16-8ece-0d1c9e6813ce" /> |
2024-02-26 10:34:27 +00:00
MarkZ ee94fe262b
Adding support for DDC modules when running Flutter Web in debug mode (#141423)
### Context:

DDC modules are abstractions over how libraries are loaded/updated. The entirety of google3 uses the DDC/legacy module system due to its flexibility extensibility over the other two (ES6 and AMD/RequireJS). Unifying DDC's module system saves us from duplicating work and will allow us to have finer grained control over how JS modules are loaded. This is a a prerequisite to features such as hot reload.

### Overview:

This change plumbs a boolean flag through flutter_tools that switches between DDC (new) and AMD (current) modules. This mode is automatically applied when `--extra-front-end-options=--dartdevc-module-format=ddc` is specified alongside `flutter run`. Other important additions include:
* Splitting Flutter artifacts between DDC and AMD modules
* Adding unit tests for the DDC module system
* Additional bootstrapper logic for the DDC module system

We don't expect to see any user-visible behavior or performance differences.

This is dependent on [incoming module system support in DWDS](https://github.com/dart-lang/webdev/pull/2295) and [additional artifacts in the engine](https://github.com/flutter/engine/pull/47783).

This is part of a greater effort to deprecate the AMD module system: https://github.com/dart-lang/sdk/issues/52361
2024-02-24 00:26:04 +00:00
Andrew Kolos 37c8df1690
allow optional direct injection of Config instance into DevFS (#144002)
In service of https://github.com/flutter/flutter/issues/143348

This will make testing of asset transformation hot reload behavior easier (specifically in that we can avoid having to write a test that looks like this: 5d02c27248/packages/flutter_tools/test/general.shard/build_system/targets/assets_test.dart (L167-L249)
2024-02-23 23:39:49 +00:00
Andrew Kolos 4e814a5f3c
Enable asset transformation for flutter build for iOS, Android, Windows, MacOS, Linux, and web (also flutter run without hot reload support) (#143815)
See title. These are are the platforms that use the `CopyAssets` `Target` as part of their build target.

Partial implementation of https://github.com/flutter/flutter/issues/143348.
2024-02-23 22:48:08 +00:00
Tong Mu be2544ab59
Render the warm up frame in a proper rendering process (#143290)
_This PR requires https://github.com/flutter/engine/pull/50570._

This PR uses the new `PlatformDispatcher.scheduleWarmUpFrame` API to render warm up frames.

For why the warm up frame must involve the engine to render, see https://github.com/flutter/flutter/issues/142851.
2024-02-23 21:30:14 +00:00
Jonah Williams 895406c60b
disable debug banner in m3 page test apps. (#143857)
This one flakes but rarely.

Part of https://github.com/flutter/flutter/issues/143616
2024-02-23 20:06:06 +00:00
LongCatIsLooong a0a854a78b
Relands "Changing TextPainter.getOffsetForCaret implementation to remove the logarithmic search (#143281)" (reverted in #143801) (#143954)
The original PR was reverted because the new caret positioning callpath triggered a skparagraph assert. The assert has been removed. Relanding the PR with no changes applied.
2024-02-23 19:20:14 +00:00
Nate c53a18f4e4
Implementing null-aware operators throughout the repository (#143804)
This pull request fixes #143803 by taking advantage of Dart's null-aware operators.

And unlike `switch` expressions ([9 PRs](https://github.com/flutter/flutter/pull/143634) and counting), the Flutter codebase is already fantastic when it comes to null-aware coding. After refactoring the entire repo, all the changes involving `?.` and `??` can fit into a single pull request.
2024-02-23 19:02:22 +00:00
LongCatIsLooong fcd154bd24
Remove deprecated InteractiveViewer.alignPanAxis (#142500) 2024-02-23 04:24:21 +00:00
LongCatIsLooong 59da873ef0
Remove deprecated KeepAliveHandle.release (#143961)
https://github.com/flutter/flutter/issues/143956

I still did not include a dartfix since a dartfix that replaces `release` with `dispose` would change the semantics and may cause a runtime crash instead of a build error.

@Piinks  does setting `bulkApply` to false force the user to apply the fix to every occurrence one by one in their IDE? If so then it seems that would be the way to go for this deprecation?
2024-02-23 03:16:20 +00:00