Commit graph

22900 commits

Author SHA1 Message Date
xubaolin c83237f37c
[New feature]Introduce iOS multi-touch drag behavior (#141355)
Fixes #38926

This patch implements the iOS behavior pointed out by @dkwingsmt at #38926 , which is also consistent with the performance of my settings application on the iPhone.

### iOS behavior (horizontal or vertical drag)

## Algorithm
When dragging: delta(combined) = max(i of n that are positive) delta(i) - max(i of n that are negative) delta(i)
It means that, if two fingers are moving +50 and +10 respectively, it will move +50; if they're moving at +50 and -10 respectively, it will move +40.

~~TODO~~
~~Write some test cases~~
2024-03-13 07:10:48 +00:00
Jackson Gardner 3c30e3cb20
Flutter Web Bootstrapping Improvements (#144434)
This makes several changes to flutter web app bootstrapping.
* The build now produces a `flutter_bootstrap.js` file.
  * By default, this file does the basic streamlined startup of a flutter app with the service worker settings and no user configuration.
  * The user can also put a `flutter_bootstrap.js` file in the `web` subdirectory in the project directory which can have whatever custom bootstrapping logic they'd like to write instead. This file is also templated, and can use any of the tokens  that can be used with the `index.html` (with the exception of `{{flutter_bootstrap_js}}`, see below).
* Introduced a few new templating tokens for `index.html`:
  * `{{flutter_js}}` => inlines the entirety of `flutter.js`
  * `{{flutter_service_worker_version}}` => replaced directly by the service worker version. This can be used instead of the script that sets the `serviceWorkerVersion` local variable that we used to have by default.
  * `{{flutter_bootstrap_js}}` => inlines the entirety of `flutter_bootstrap.js` (this token obviously doesn't apply to `flutter_bootstrap.js` itself).
* Changed `IndexHtml` to be called `WebTemplate` instead, since it is used for more than just the index.html now.
* We now emit warnings at build time for certain deprecated flows:
  * Warn on the old service worker version pattern (i.e.`(const|var) serviceWorkerVersion = null`) and recommends using `{{flutter_service_worker_version}}` token instead
  * Warn on use of `FlutterLoader.loadEntrypoint` and recommend using `FlutterLoader.load` instead
  * Warn on manual loading of `flutter_service_worker.js`.
* The default `index.html` on `flutter create` now uses an async script tag with `flutter_bootstrap.js`.
2024-03-12 22:41:26 +00:00
Kate Lovett eb74e5a497
Update gold validator to check for regression in flutter-gold check (#145008)
There were some recent change in flutter/cocoon. Check that the bot warns and holds up the PR as expected.
2024-03-12 20:20:51 +00:00
Gray Mackall d5896d5ede
Manually roll pub packages (#145005)
Manual takeover of https://github.com/flutter/flutter/pull/145003, to include some gradle lockfile changes.
2024-03-12 19:53:57 +00:00
Michael Goderbauer 77651bc496
Reland "Fail tests on exceptions raised after test completed (#144706)" (#144980)
Reverts flutter/flutter#144970

No changes in this PR compared to the original. The test failure was fixed by adding missing awaits in https://github.com/flutter/flutter/pull/144978.

Fixes https://github.com/flutter/flutter/issues/144353.
2024-03-12 18:17:10 +00:00
Michael Goderbauer e277549751
add missing awaits (#144978)
This was uncovered as part of https://github.com/flutter/flutter/pull/144706.
2024-03-12 16:51:51 +00:00
Nate 61812ca3eb
Add platform check to FocusManager app lifecycle listener (#144718)
This PR implements a temporary fix for the mobile device keyboard bug reported in [this comment](https://github.com/flutter/flutter/pull/142930#issuecomment-1981750069).

CC @gspencergoog
2024-03-12 15:43:06 +00:00
godofredoc 1ca88730a0
Update integration tests regexes. (#144847)
Some tests are assuming the flutter sdk code is being checked out to flutter and checking the code to a different repository makes them fail.

Bug: https://github.com/flutter/flutter/issues/144487
2024-03-12 01:31:25 +00:00
auto-submit[bot] 49f45d2095
Reverts "Fail tests on exceptions raised after test completed (#144706)" (#144970)
Reverts: flutter/flutter#144706
Initiated by: gspencergoog
Reason for reverting: This has broken the tree because some tests are still failing post completion. This particular one looks like it might have to do with a gold image not existing.
Original PR Author: goderbauer

Reviewed By: {Piinks}

This change reverts the following previous change:
A test was failing silently because of this (see https://github.com/flutter/flutter/issues/144353 and fixed in https://github.com/flutter/flutter/pull/144709). The failure went undetected for months. Ideally, this should have been a regular non-silent failure. This change makes that so. `package:test` can properly handle reported exceptions outside of test cases. With this change, the test fails as follows:

```
00:03 +82: Smoke test material/color_scheme/dynamic_content_color.0.dart
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test (but after the test had completed):
setState() called after dispose(): _DynamicColorExampleState#1cd37(lifecycle state: defunct, not
mounted)
This error happens if you call setState() on a State object for a widget that no longer appears in
the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error
can occur when code calls setState() from a timer or an animation callback.
The preferred solution is to cancel the timer or stop listening to the animation in the dispose()
callback. Another solution is to check the "mounted" property of this object before calling
setState() to ensure the object is still in the tree.
This error might indicate a memory leak if setState() is being called because another object is
retaining a reference to this State object after it has been removed from the tree. To avoid memory
leaks, consider breaking the reference to this object during dispose().

When the exception was thrown, this was the stack:
#0      State.setState.<anonymous closure> (package:flutter/src/widgets/framework.dart:1167:9)
#1      State.setState (package:flutter/src/widgets/framework.dart:1202:6)
#2      _DynamicColorExampleState._updateImage (package:flutter_api_samples/material/color_scheme/dynamic_content_color.0.dart:191:5)
<asynchronous suspension>
════════════════════════════════════════════════════════════════════════════════════════════════════
00:03 +81 -1: Smoke test material/context_menu/context_menu_controller.0.dart
00:03 +81 -1: Smoke test material/color_scheme/dynamic_content_color.0.dart [E]
  Test failed. See exception logs above.
  The test description was: Smoke test material/color_scheme/dynamic_content_color.0.dart
  
  This test failed after it had already completed.
  Make sure to use a matching library which informs the test runner
  of pending async work.
```
2024-03-11 23:31:18 +00:00
Polina Cherkasova e66811ae04
Make TabController communicating creation in constructor. (#144912)
Contributes to https://github.com/flutter/flutter/issues/144910
2024-03-11 23:13:47 +00:00
Michael Goderbauer 91cccc8e6b
Fail tests on exceptions raised after test completed (#144706)
A test was failing silently because of this (see
https://github.com/flutter/flutter/issues/144353 and fixed in
https://github.com/flutter/flutter/pull/144709). The failure went
undetected for months. Ideally, this should have been a regular
non-silent failure. This change makes that so. `package:test` can
properly handle reported exceptions outside of test cases. With this
change, the test fails as follows:

```
00:03 +82: Smoke test material/color_scheme/dynamic_content_color.0.dart
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test (but after the test had completed):
setState() called after dispose(): _DynamicColorExampleState#1cd37(lifecycle state: defunct, not
mounted)
This error happens if you call setState() on a State object for a widget that no longer appears in
the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error
can occur when code calls setState() from a timer or an animation callback.
The preferred solution is to cancel the timer or stop listening to the animation in the dispose()
callback. Another solution is to check the "mounted" property of this object before calling
setState() to ensure the object is still in the tree.
This error might indicate a memory leak if setState() is being called because another object is
retaining a reference to this State object after it has been removed from the tree. To avoid memory
leaks, consider breaking the reference to this object during dispose().

When the exception was thrown, this was the stack:
#0      State.setState.<anonymous closure> (package:flutter/src/widgets/framework.dart:1167:9)
#1      State.setState (package:flutter/src/widgets/framework.dart:1202:6)
#2      _DynamicColorExampleState._updateImage (package:flutter_api_samples/material/color_scheme/dynamic_content_color.0.dart:191:5)
<asynchronous suspension>
════════════════════════════════════════════════════════════════════════════════════════════════════
00:03 +81 -1: Smoke test material/context_menu/context_menu_controller.0.dart
00:03 +81 -1: Smoke test material/color_scheme/dynamic_content_color.0.dart [E]
  Test failed. See exception logs above.
  The test description was: Smoke test material/color_scheme/dynamic_content_color.0.dart
  
  This test failed after it had already completed.
  Make sure to use a matching library which informs the test runner
  of pending async work.
```
2024-03-11 16:05:24 -07:00
Nate 26e379e0fc
Refactoring if chains into switch statements (#144905)
Based on issue #144903, this PR aims to bring the codebase more in line with the [Flutter repo style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-using-if-chains-or--or--with-enum-values):

> #### Avoid using `if` chains or `?:` or `==` with enum values

<br>

This change unfortunately increases the total line length, but it also improves readability.
2024-03-11 23:04:57 +00:00
auto-submit[bot] 187ec75eb5
Reverts "Expose build mode in environment of asset transformer processes (#144752)" (#144957)
Reverts: flutter/flutter#144752
Initiated by: andrewkolos
Reason for reverting: compilation issue has turned the tree red
Original PR Author: andrewkolos

Reviewed By: {christopherfujino}

This change reverts the following previous change:
In service of https://github.com/flutter/flutter/issues/143348

When invoking a package to transform an asset, we set `FLUTTER_BUILD_MODE` to the CLI name of the build mode being used. Inspired by https://github.com/flutter/flutter/issues/101077#issuecomment-1890379501:

> Do transformers know whether they get executed in debug or release mode? I kinda imagine that being useful. Ex: There's a transformer that optimizes the file size of images. Depending on the amount and size of the images, that could take a significant amount of time. Therefore, I might want to only execute it in release builds.

Note for the reviewer: the interesting part of this change can be found in the commit [set environment variable to build mode when running asset transformer…](579912d470). The rest of the change is updating call sites with a new argument.
2024-03-11 21:00:17 +00:00
Andrew Kolos 83fad74535
Expose build mode in environment of asset transformer processes (#144752)
In service of https://github.com/flutter/flutter/issues/143348

When invoking a package to transform an asset, we set `FLUTTER_BUILD_MODE` to the CLI name of the build mode being used. Inspired by https://github.com/flutter/flutter/issues/101077#issuecomment-1890379501:

> Do transformers know whether they get executed in debug or release mode? I kinda imagine that being useful. Ex: There's a transformer that optimizes the file size of images. Depending on the amount and size of the images, that could take a significant amount of time. Therefore, I might want to only execute it in release builds.

Note for the reviewer: the interesting part of this change can be found in the commit [set environment variable to build mode when running asset transformer…](579912d470). The rest of the change is updating call sites with a new argument.
2024-03-11 20:39:31 +00:00
victorgalo b9afa60fdd
Skip test temporarily until headingLevel is added in engine (issue 41… (#135077)
The purpose of this PR is to temporarily skip one integration test that is blocking the changes indicated below:

(This change adds a new property in Semantics widget that would take an integer corresponding to the heading levels defined by the ARIA heading role. This is necessary in order to get proper accessibility and usability in a website for users who rely on screen readers and other assistive technologies.)

Issue fixed by this PR:
https://github.com/flutter/flutter/issues/97894

Engine part:
https://github.com/flutter/engine/pull/41435 

Framework part:
https://github.com/flutter/flutter/pull/125771
2024-03-11 16:31:21 +00:00
Ian Hickson dbcce277f3
Rename isAvailableForEnvironment to isForEnvironment (#143176) (#144858)
This is part 4 of a broken down version of the #140101 refactor.

This PR renames isAvailableForEnvironment to isForEnvironment and replaces a regular expression with a simple function. (The latter will change the behaviour for people with branch names like `mainly_refactors` or `chess_master_experiment` or whatever, but I'm pretty sure the old behaviour was not intended.)

----

This is a reland of https://github.com/flutter/flutter/pull/143176 which was speculatively reverted in https://github.com/flutter/flutter/pull/144855 but turned out not to be the cause of the tree redness.
2024-03-10 06:20:38 +00:00
yim f733e3a441
Fix multiple calls to Slider's onChanged. (#143680)
Fixes #143524
2024-03-09 07:50:23 +00:00
Polina Cherkasova a04fe3169a
Upgrade vm_service. (#144845) 2024-03-08 17:09:07 -08:00
Percival cab4a0fb88
Replace dead links (#144827)
I have found that some Apple-related links are no longer accessible, and they have been replaced
2024-03-09 01:08:06 +00:00
auto-submit[bot] 0432a6941d
Reverts "Rename isAvailableForEnvironment to isForEnvironment (#143176)" (#144855)
Reverts: flutter/flutter#143176
Initiated by: QuncCccccc
Reason for reverting: made tree red.
Original PR Author: Hixie

Reviewed By: {Piinks}

This change reverts the following previous change:
This is part 4 of a broken down version of the #140101 refactor.

This PR renames isAvailableForEnvironment to isForEnvironment and replaces a regular expression with a simple function. (The latter will change the behaviour for people with branch names like `mainly_refactors` or `chess_master_experiment` or whatever, but I'm pretty sure the old behaviour was not intended.)
2024-03-08 23:19:15 +00:00
Ian Hickson 5bd34ef541
Rename isAvailableForEnvironment to isForEnvironment (#143176)
This is part 4 of a broken down version of the #140101 refactor.

This PR renames isAvailableForEnvironment to isForEnvironment and replaces a regular expression with a simple function. (The latter will change the behaviour for people with branch names like `mainly_refactors` or `chess_master_experiment` or whatever, but I'm pretty sure the old behaviour was not intended.)
2024-03-08 20:20:13 +00:00
Mitchell Goodwin 2be5084b26
Fixes the transition builder changing the Cupertino transition on Android. (#134790)
Fixes #124850.

Changes the fallback for the builder on Android. Before the error was from the platform being changed mid Cupertino transition to iOS. If a default builder wasn't set for iOS (which a developer developing only for Android might not), then it defaulted to the Zoom transition. Which changing the transition while on the fly caused issues.
2024-03-08 19:00:16 +00:00
Jackson Gardner 074114b85a
Copy over source maps from dart2js target when they are enabled. (#144832)
This fixes https://github.com/flutter/flutter/issues/143703

We need to make sure that when source maps are enabled for the dart2js target, it advertises the sourcemap file as one of its outputs so that the web release bundle can copy it over.
2024-03-08 18:56:18 +00:00
Martin Kustermann 7c89ec8bbc
Remove toString() overrides in dart:ui/package:flutter in profile/release mode on wasm/vm targets (#144763)
The flutter engine & framework can opt out of this optimization for
individual classes / class hierarchies via:

  * `@pragma(flutter:keep-to-string)`
  * `@pragma(flutter:keep-to-string-in-subtypes)`

Or by using the convenience constant `@keepToString` from `dart:ui`.

=> This aligns the build process more with g3 (which already does this)

Closes https://github.com/flutter/flutter/issues/52759
2024-03-08 09:55:02 +01:00
Loïc de Porcaro dde616dbe1
Update documentation of AlertDialog's default TextStyle for Material 3 (#144697)
## Update `AlertDialog` Documentation for Material 3 Defaults

This pull request updates the documentation for `AlertDialog` to accurately reflect the default text styles (`titleTextStyle` and `contentTextStyle`) when using Material 3.
Previously, the documentation suggested default styles (`TextTheme.titleLarge` for titles and `TextTheme.titleMedium` for content) that do not align with Material 3 implementation, which uses `TextTheme.headlineSmall` and `TextTheme.bodyMedium` respectively.

Fixes #144489
2024-03-08 00:21:35 +00:00
Andrew Kolos 06ac042271
Enable asset transformation for flutter run -d <browser> and flutter test (#144734)
Partial implementation of https://github.com/flutter/flutter/issues/143348.

The title says it all. Feel free to experiment with the feature using this project: https://github.com/andrewkolos/asset_transformers_test.
2024-03-07 23:38:40 +00:00
August dc6f94a878
refactor: Remove throwOnPluginPubspecError flag for plugin validation (#144214)
Part of #137040 and #80374

The flag `throwOnPluginPubspecError` never actually was enabled during production in #79669, but only in some dart plugin tests. And in the tests the case of the error when enabling the flag was not explicitly tested. The only thing tested was, that it is not thrown when disabled.

As explained [here](https://github.com/flutter/flutter/pull/142035#discussion_r1484237904) the only case, where this error could be thrown is, when a dart implementation and a native inline implementation are provided simultaneously. But throwing an exception there is a wrong behavior, as both can coexist in a plugin package, thus in the pubspec file.

Disabling the flag means, that the error is not thrown and not shown to the user. This is the case in production (contrary to the dart plugin tests), which acts like these plugin cases of implementations are just skipped. And this is what actually should be done.

In conclusion, I think the case of coexisting dart and native implementation in pubspec was just overlooked and therefore this error validation was introduced, which is not necessary or even valid.

For more discussion, see: https://discord.com/channels/608014603317936148/608022056616853515/1200194937791205436

  - This is tricky: I already added a test in #142035, which finally complies with the other tests, by removing the flag. So I think it falls in the category of "remove dead code".
  - Theoretically this is a breaking change, as removing / altering some tests. But the flag actually was never valid or used, so IDK. But this may not does fall in the category of "contributed tests".
2024-03-07 23:04:08 +00:00
Faisal Ansari 874804e511
Fixed -> DropdownMenu throws exception when it is in any scrollable l… (#140566)
Fixed -> DropdownMenu throws exception when it is in any scrollable list view and scrolls quickly #139871
2024-03-07 20:46:03 +00:00
Christopher Fujino 2dd06d10c9
[flutter_tools] add custom tool analysis to analyze.dart, lint Future.catchError (#140122)
Ensure tool code does not use Future.catchError or Future.onError, because it is not statically safe: https://github.com/dart-lang/sdk/issues/51248.

This was proposed upstream in dart-lang/linter in https://github.com/dart-lang/linter/issues/4071 and https://github.com/dart-lang/linter/pull/4068, but not accepted.
2024-03-07 18:10:07 +00:00
Bruno Leroux 471a82856d
[flutter_test] Use defaultTargetPlatform for key events simulation (#143579)
## Description

This PRs changes the default value for the `platform` parameter used to simulate key events.

With this PR, the default value is "web" on web, otherwise it is the operating system name retrieved from `defaultTargetPlatform`.

Previously, for methods in `WidgetController`, it defaulted to “web” on web, and “android” everywhere else. And for methods in `KeyEventSimulator` it defaulted to “web” on web, and the operating system that the test was running on everywhere else. Because the operating system was based on `Platform.operatingSystem`, it usually differed from the target platform the test was running on.

AFAIK, the `platform` parameter is only meaningful for simulating `RawKeyEvent`. Once `RawKeyboard` will be fully removed, the `platform` parameter won’t be needed. 
@gspencergoog  In the meantime, do you think it is worth merging this fix?

## Related Issue

Fixes to https://github.com/flutter/flutter/issues/133955

## Tests

Adds one test.
2024-03-07 16:08:20 +00:00
Matej Knopp de72832079
Fix frameworks added to bundle multiple times instead of lipo (#144688)
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

*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.*

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2024-03-07 15:09:15 +00:00
Bruno Leroux 8ade81fb20
[flutter_test] Change KeyEventSimulator default transit mode (#143847)
## Description

This PRs changes the default value transit mode for key event simulation.

The default transit mode for key event simulation is currently `KeyDataTransitMode.rawKeyData` while on the framework side `KeyDataTransitMode.keyDataThenRawKeyData` is the preferred transit mode.

`KeyDataTransitMode.keyDataThenRawKeyData` is more accurate and can help detect issues.

For instance the following test will fail with `KeyDataTransitMode.rawKeyData` because raw keyboard logic for modifier keys is less accurate:

```dart
  testWidgets('Press control left once', (WidgetTester tester) async {
    debugKeyEventSimulatorTransitModeOverride = KeyDataTransitMode.keyDataThenRawKeyData;

    final List<KeyEvent> events = <KeyEvent>[];
    final FocusNode focusNode = FocusNode();
    addTearDown(focusNode.dispose);

    await tester.pumpWidget(
      Focus(
        focusNode: focusNode,
        autofocus: true,
        onKeyEvent: (_, KeyEvent event) {
          events.add(event);
          return KeyEventResult.handled;
        },
        child: Container(),
      ),
    );

    await simulateKeyDownEvent(LogicalKeyboardKey.controlLeft);

    // This will fail when transit mode is KeyDataTransitMode.rawKeyData
    // because a down event for controlRight is synthesized.
    expect(events.length, 1);

    debugKeyEventSimulatorTransitModeOverride = null;
  });
```

And the following this test is ok with `KeyDataTransitMode.rawKeyData` but rightly fails with `KeyDataTransitMode.keyDataThenRawKeyData`:

```dart
  testWidgets('Simulates consecutive key down events', (WidgetTester tester) async {
    debugKeyEventSimulatorTransitModeOverride = KeyDataTransitMode.rawKeyData;

    // Simulating several key down events without key up in between is tolerated
    // when transit mode is KeyDataTransitMode.rawKeyData, it will trigger an
    // assert on KeyDataTransitMode.keyDataThenRawKeyData.
    await simulateKeyDownEvent(LogicalKeyboardKey.arrowDown);
    await simulateKeyDownEvent(LogicalKeyboardKey.arrowDown);

    debugKeyEventSimulatorTransitModeOverride = null;
  });
```

## Related Issue

Related to https://github.com/flutter/flutter/issues/143845

## Tests

Adds two tests.
2024-03-07 07:19:26 +00:00
Valentin Vignal 96dd1984ec
Fix memory leak in editable_gesture_test.dart (#144691) 2024-03-06 17:51:54 -08:00
Martin Kustermann aba7bc3f42
Use wasm-compatible conditional import in timeline.dart, avoid emitting timeline events in SchedulerBinding (#144682) 2024-03-06 23:08:24 +01:00
Qun Cheng f38c5ad441
Remove deprecated errorColor from ThemeData (#144078)
This PR is to remove deprecated `ThemeData.errorColor`.

These parameters are made obsolete in https://github.com/flutter/flutter/pull/110162.
Part of https://github.com/flutter/flutter/issues/143956
2024-03-06 20:41:04 +00:00
Andrew Kolos cc33f44e41
make DevFSContent descendants immutable (#144664)
`DevFSBytesContent` (and it's descendant `DevFSStringContent`) have setters that change the underlying content. These are unused outside of tests, so this PR removes them. Amongst other things, this could help me refactor https://github.com/flutter/flutter/pull/144660 into something that has fewer pitfalls.

This is purely a refactoring.
2024-03-06 20:21:41 +00:00
Jonah Williams 2ebd7f0d55
[Impeller] measure GPU memory usage. (#144575)
Framework side to https://github.com/flutter/engine/pull/51187

Part of https://github.com/flutter/flutter/issues/144617
2024-03-06 20:17:31 +00:00
Gray Mackall 9973771cc3
Update android templates to use target sdk 34 (#144641)
We should always target the newest, and 34 is the newest. This isn't a requirement yet (like it is for 33+) but presumably it will be made required in the nearish future.
2024-03-06 19:15:07 +00:00
Greg Price 6b9d3ea4fc
Fill in SliverConstraints fields missing from ==, hashCode, toString (#143661)
I was doing some debugging on a RenderSliver subclass, and found
that SliverConstraints.toString was missing the precedingScrollExtent
field.

Add that, and add both that field and userScrollDirection to the
`==` and hashCode implementations, which had been skipping them,
so that all three methods now handle all the class's fields.
2024-03-06 03:23:18 +00:00
Victoria Ashworth 7e05bc4b30
Fix embedding FlutterMacOS.framework for macOS add2app via cocoapods (#144248)
Fixes https://github.com/flutter/flutter/issues/144244.
2024-03-05 21:59:49 +00:00
Andrew Kolos ff3b6dc02c
Enable asset transformation feature in hot reload workflow (excluding Web) (#144161)
Partial implementation of https://github.com/flutter/flutter/issues/143348

This enables asset transformation during hot reload (except for web, because that has its own implementation of `DevFS` 🙃). Asset transformers will be reapplied after changing any asset and performing a hot reload during `flutter run`.
2024-03-05 21:54:06 +00:00
Tirth 311c0064d8
Adds missing style to PopupMenuButton (#143392)
Adds missing `style` to `PopupMenuButton`.

Fixes: #114709
2024-03-05 19:42:30 +00:00
Michael Goderbauer 2aa1efcf0a
Add regression test for TabBar crash (#144627)
This is a regression test for https://github.com/flutter/flutter/issues/144087 and https://github.com/flutter/flutter/issues/138588.

To be submitted after https://github.com/flutter/flutter/pull/144579.
2024-03-05 19:24:05 +00:00
Andrew Kolos 4e6de2be33
remove unused firstBuildTime parameter in DevFS::update (#144576)
The title says it all. This parameter is unused and serves no apparent purpose.
2024-03-05 19:14:48 +00:00
Michael Goderbauer d93f24ab93
Revert "_DefaultTabControllerState should dispose all created TabContoller instances. (#136608)" (#144579)
This reverts commit 9fa9fd365c.

Fixes https://github.com/flutter/flutter/issues/144087.
Fixes https://github.com/flutter/flutter/issues/138588.

This crash has been reported previously from a customer in google3 in https://github.com/flutter/flutter/issues/138588, but we weren't able to track it down. Thankfully, a repro was now provided in https://github.com/flutter/flutter/issues/144087#issuecomment-1968257383 which traced the crash down to a change made in #136608. This PR reverts that change to fix that crash for now. I will post a new PR shortly that will add a test to cover the use case that caused the crash with #136608 to make sure we don't re-introduce the crash in the future.
2024-03-05 18:41:56 +00:00
Matej Knopp df2b360453
Do not shorten native assets framework names (#144568)
Previously the name was shortened to 15 characters, which doesn't seem
to be necessary.
[CFBundleName](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundlename)
documentation mentions 15 character length, but that does not seem to be
relevant to framework bundles.

Flutter plugins already have framework bundles with names longer than 15
characters and it is not causing any issues.

## 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] 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-03-05 14:58:15 +01:00
Bruno Leroux 67e6cad0cb
Restorable CupertinoTextFormFieldRow (#144541)
## Description

This PR makes `CupertinoTextFormFieldRow` restorable.
The implementation is based on https://github.com/flutter/flutter/pull/78835 which made `FormField` and `TextFormField` restorable.

## Related Issue

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

## Tests

Adds 4 tests.
2024-03-05 10:31:04 +00:00
Jonah Williams 89b5f3a717
Disable super flakey impeller test. (#144573)
Until we figure out why this is unstable on Impeller swiftshader, disable it.
2024-03-05 00:16:21 +00:00
Jenn Magder 9b442b2749
Print warning and exit when iOS device is unpaired (#144551)
Explicitly handle the case where the iOS device is not paired.  On `flutter run` show an error and bail instead of trying and failing to launch on the device.

On this PR:
```
$ flutter run -d 00008110-0009588C2651401E
'iPhone' is not paired. Open Xcode and trust this computer when prompted.
$
```

Fixes https://github.com/flutter/flutter/issues/144447
Closes https://github.com/flutter/flutter/pull/144095
2024-03-04 23:01:11 +00:00
LongCatIsLooong de0ccf39c6
Remove unnecessary (and the only) RenderObject.markParentNeedsLayout override (#144466)
Nobody calls it except for `markNeedsLayout`, and the render object is a guaranteed relayout boundary.
2024-03-04 21:58:17 +00:00