82495 Commits

Author SHA1 Message Date
Matan Lurey
a16de734bd
Pin customer_testing to the SHA specified in tests.version (#162048)
Closes https://github.com/flutter/flutter/issues/162041.

I also converted the `.sh` and `.bat` files (largely) to Dart, mostly
because I don't know enough Windows XP command prompt in order to make
the change safely. They should still run the same from the CI
bootstrapping, but most of the logic is now Dart code.

Will send a separate PR to update the `flutter/tests` PR template.

/cc @johnmccutchan @Piinks
2025-01-25 22:15:28 +00:00
Matan Lurey
a3f0704f25
Formalize update_engine_version.{sh|ps1}. (#162118)
Towards https://github.com/flutter/flutter/issues/162201.

**NOTE**: This renames the environment variable to
`FLUTTER_PREBUILT_ENGINE_VERSION`.

---

We occasionally break ourselves, our users, and the Dart up (or is it
down? side-ways) stream repos (i.e. HHH) when we change how the
undocumented
[`update_engine_version.sh`](https://github.com/flutter/flutter/blob/master/bin/internal/update_engine_version.sh)
script, and it's Windows counterpart
[`update_engine_version.ps1`](https://github.com/flutter/flutter/blob/master/bin/internal/update_engine_version.ps1)
work, but have no way of knowing until N days/weeks later when someone
tells us.

For example,
<https://flutter-review.googlesource.com/c/recipes/+/62400>.

This is my attempt to encode "this is what you can guarantee by calling
this script".

It _still_ will be an internal only API that we might rev at any time,
but at least we:

1. Can tell the Dart team "this is tested and how it works"
2. If we want to change it, the tests will keep us from changing it
without informing folks it changed

These tests should (in theory) cover both Linux/MacOS and Windows.

/cc @a-siva
2025-01-25 19:53:17 +00:00
Tirth
586a59211d
Rename 'SelectionChangedCause.scribble' to 'SelectionChangedCause.stylusHandwriting' (#161518)
Rename 'SelectionChangedCause.scribble' to
'SelectionChangedCause.stylusHandwriting'

Fixes #159223 

## 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-25 05:50:26 +00:00
Jackson Gardner
fdd7ebc59f
Don't install xcode when doing local_engine web builds on mac. (#162164)
We don't actually need Xcode installed to do web builds on a Mac, since
it uses emscripten. We can specify to skip the install via the property
added here: https://flutter-review.googlesource.com/c/recipes/+/62500
2025-01-25 02:03:09 +00:00
Matan Lurey
9cc132d4c2
Force Impeller backend for android_engine_test, and test both OpenGLES and Vulkan (#162089)
A few changes in this PR (could have been split up, but that would take
an extra 4 hours - 2 days in CI time):

- Removed the old `flutter_driver_android_test` shards and references
- Override `AndroidManifest.xml` per backend, forcing that backend to be
used (no fallbacks) or it fails
- Bumps the Android emulator to 35 due to the use of magic strings, I
think

The check for the Impeller backend actually being used is the honor
system right now, as a bug in `flutter drive`
(https://github.com/flutter/flutter/issues/162087) prevents me from
seeing error output, meaning that it's impossible to be sure a
particular Impeller backend is used (or understand why a crash happens),
so I guess I'll work on that next.

Due to https://github.com/flutter/flutter/issues/162088, we were
accidentally running our Vulkan tests as OpenGLES 🤦🏼 .
2025-01-25 01:55:28 +00:00
Jonah Williams
e057941ee7
[Impeller] when a command pool has many unused buffers, reset with release resources flag. (#162171)
Fixes https://github.com/flutter/flutter/issues/161861

Resetting a command pool is not sufficient to reclaim memory. The pool
must be trimmed. Contrary to what you would expect, it appears that just
resetting the pool, even if the cmd buffers are reclaimed, never frees
any memory.
2025-01-24 23:24:47 +00:00
Mouad Debbar
3755fd1f6e
[web] Remove HTML renderer from framework tests (#162038)
- Cleanup many HTML special cases and skips in framework tests.
- Update some dartdocs that referred to the HTML renderer.

For reviewers: it may help if you set `Hide whitespace` to true in
Github. It will help you skip through all the formatting/indentation
changes.
2025-01-24 21:33:27 +00:00
Jonah Williams
b82e9022a3
[Impeller] Skip clip entity replay that cannot impact current clip. (#162113)
Fixes https://github.com/flutter/flutter/issues/161262

Sometimes we end up with clip replay entities that have clip depth
values substantially below the current depth. I suspect this is due to
either mismatched save/restore or a bug in our code. Update: this isn't
a bug/bug but its definitely a bug. We can have multiple clips per save,
but the restore will remove at most one from the record/replay.


If a clip has a depth value that is less than the current clip depth, it
cannot by definition impact anything that draws after it.
2025-01-24 19:49:40 +00:00
Fichtelcoder
74ade43341
Update Android integration test package for newer AGP (#161856)
Now that Flutter requires AGP 7+, we can use Java 11 as the
compatibility version in the plugin template rather than 1.8, avoiding
warnings with newer toolchains. This was already done for templates, but
the integration test package still produces a warning because it still
uses Java 1.8 which is now bumped to version 11.

Another part of #156111.

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

Co-authored-by: Gray Mackall <34871572+gmackall@users.noreply.github.com>
2025-01-24 18:36:25 +00:00
Loïc Sharma
c1ffaa9d9d
Fix link to hotfix documentation best practices (#162116)
Currently the [cherrypick
process](https://github.com/flutter/flutter/blob/master/docs/releases/Flutter-Cherrypick-Process.md#automatically-create-a-cherry-pick-request)
links to:
https://github.com/flutter/flutter/blob/master/docs/releases/docs/releases/Hotfix-Documentation-Best-Practices.md

This should be:
https://github.com/flutter/flutter/blob/master/docs/releases/Hotfix-Documentation-Best-Practices.md

## 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-24 15:17:48 +00:00
Reid Baker
02e11f95a1
Add integration test for cutout rotation evaluation (#160354)
Test that the position of a cutout as reported by the Android engine
repositions based on screen orientation.

Related to https://github.com/flutter/engine/pull/55992

Part of https://github.com/flutter/flutter/issues/155658

to test run flutter drive integration_test/display_cutout_test.dart 
from dev/integration_tests/display_cutout_rotation

Pr also force upgrades pub dependencies because I was getting presubmit
failure in version solve.

## 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.
2025-01-24 14:50:38 +00:00
Jim Graham
bf7daf22a5
Reland "[Impeller] Migrate unit tests off of Skia geometry classes (#161855)" (#162146)
Reverts flutter/flutter#162046

The root cause of the test failures seen in the original PR have been
fixed.
2025-01-24 12:02:29 +00:00
Bruno Leroux
a2ec056b82
Fix TextField intrinsic width when hint is not visible (#161235)
## Description

This PR changes the TextField intrinsic width computation for non-empty
TextField.

Before:

When a TextField is non-empty, the intrinsic width can't be smaller than
the hint width:


![image](https://github.com/user-attachments/assets/88c42a31-d83e-4eb8-8286-dce5b07ef089)


After:

The width does not depend on the hint when the TextField is non empty.


![image](https://github.com/user-attachments/assets/5b7380f8-4bc8-4d37-974e-0c8f5b08b185)


<details><summary>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 const MaterialApp(
      title: 'Material App',
      home: Scaffold(
        body: Center(
          child: IntrinsicWidth(
            child: TextField(
              decoration: InputDecoration(
                filled: true,
                hintText: 'Moderately long hint text',
              ),
            ),
          ),
        ),
      ),
    );
  }
}

``` 

</details> 

## Related Issue

Fixes [[TextField] The computation of the intrinsic width of a TextField
should include the hint width only when
visible](https://github.com/flutter/flutter/issues/93337)

## Tests

Adds 2 tests.
2025-01-24 09:34:25 +00:00
Jenn Magder
f8b9bdceef
When parsing flavors, handle Xcode build configurations that are not lowercase (#161455)
The flavors/Xcode build config/Xcode scheme matching logic tries to be
permissive with casing. Instead of passing the lower-cased config into
`xcodebuild`, instead pass the real configuration name to get the right
casing.

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

## 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-24 05:18:33 +00:00
Jim Graham
83bac343ba
[Impeller] Fix source offset in PathBuilder::AddPath (#162052)
An error in bookkeeping in `PathBuilder::AddPath` caused crashes in
recent unit tests (see https://github.com/flutter/flutter/pull/162046)
2025-01-24 05:18:25 +00:00
jesswrd
96e74bbb41
Add to Setup Path Example to Engine README (#162115)
Added link to direct to engine setup and a path example.

## 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.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-24 05:14:38 +00:00
auto-submit[bot]
176a7652e1
Reverts "Unskip test. (#162106)" (#162122)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#162106
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: harryterkelsen
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: causing test breakage on web. See:
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20linux_web_engine_tests/270/infra
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: polina-c
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {yjbanov}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
No description provided.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-01-23 23:39:46 +00:00
Mahesh Jamdade
787afad5b4
feat: Add hint (Widget) property to InputDecoration (#161424)
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

Adds a new property to InputDecoration `hintTextWidget`

*Fixes*: #161130

With the introduction of ~hintTextWidget~ hint We should be able to
animate hintText



https://github.com/user-attachments/assets/7955a835-5f60-4451-8ede-b5e5f0457046


https://github.com/user-attachments/assets/55d7f021-cc8f-471e-a1d8-e601262ff640


<details>
<summary>sample code</summary>

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);
  final String title;
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
  String _searchText = 'Popular Picks';
  List<String> wordsToShow = [
    'Popular Picks',
    'Trending',
    'New Arrivals',
    'Best Sellers',
    'Top Rated',
  ];

  int index = 0;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Padding(
          padding: const EdgeInsets.all(8.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              TextField(
                cursorHeight: 16,
                decoration: InputDecoration(
                  maintainHintHeight: true,
                  hintTextWidget: Row(
                    children: [
                      const Text(
                        "Search for ",
                        style: TextStyle(fontSize: 16),
                      ),
                      SlidingText(
                          onCompleted: () {
                            index = (index + 1) % wordsToShow.length;
                            setState(() {
                              _searchText = wordsToShow[index];
                            });
                          },
                          word: _searchText,
                          interval: 1500,
                          isDelay: true),
                    ],
                  ),
                  border: OutlineInputBorder(),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

class SlidingText extends StatefulWidget {
  final String word;
  final int interval;
  final bool isDelay;
  final Function onCompleted;

  const SlidingText({
    required this.word,
    required this.interval,
    required this.isDelay,
    required this.onCompleted,
    Key? key,
  }) : super(key: key);

  @override
  _SlidingTextState createState() => _SlidingTextState();
}

class _SlidingTextState extends State<SlidingText>
    with SingleTickerProviderStateMixin {
  late AnimationController _animController;
  late Animation<Offset> _slideAnimation;
  late Animation<double> _fadeAnimation;

  @override
  void initState() {
    super.initState();

    _animController = AnimationController(
      duration: Duration(milliseconds: widget.interval),
      vsync: this,
    );

    _slideAnimation = Tween<Offset>(
      begin: Offset(0, 0.5),
      end: Offset(0, -0.6),
    ).animate(
      CurvedAnimation(
        parent: _animController,
        curve: Curves.easeInOut,
      ),
    );
    _fadeAnimation = TweenSequence([
      TweenSequenceItem(
        tween: Tween<double>(begin: 0.0, end: 1.0).chain(
          CurveTween(curve: Curves.easeIn),
        ),
        weight: 50, // First half of the animation
      ),
      TweenSequenceItem(
        tween: Tween<double>(begin: 1.0, end: 0.0).chain(
          CurveTween(curve: Curves.easeOut),
        ),
        weight: 50, // Second half of the animation
      ),
    ]).animate(_animController);
    // add interval

    _animController.addStatusListener((status) async {
      if (status == AnimationStatus.completed) {
        await Future.delayed(Duration(milliseconds: 500));
        widget.onCompleted();
      }
    });
    _animController.forward();
  }

  @override
  void didUpdateWidget(covariant SlidingText oldWidget) {
    super.didUpdateWidget(oldWidget);
    if (oldWidget.word != widget.word) {
      _animController.reset();
      _animController.forward();
    }
  }

  @override
  void dispose() {
    _animController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return AnimatedBuilder(
      animation: _animController,
      builder: (context, child) {
        return SlideTransition(
          position: _slideAnimation,
          child: FadeTransition(
            opacity: _fadeAnimation,
            child: Text(
              widget.word,
              style: const TextStyle(fontSize: 16),
            ),
          ),
        );
      },
    );
  }
}

```
</details> 

## 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-23 23:11:53 +00:00
Jackson Gardner
bfe31d607c
Fix skwasm target in wasm_debug_unopt build. (#162100)
Fixes a couple issues in the skwasm build rules:
* `DEMANGLE_SUPPORT` is deprecated in emscripten, so just remove it.
* `sSHARED_MEMORY=1` needs to be added to the cflags so that emscripten
appends the proper feature flags (`-matomics` and `-mbulk-memory`) when
doing the compile so that the flags match the linking step.
2025-01-23 22:05:52 +00:00
Flutter GitHub Bot
8c4ad50389
Marks Linux_android_emu android views to be unflaky (#160493)
<!-- meta-tags: To be used by the automation script only, DO NOT MODIFY.
{
  "name": "Linux_android_emu android views"
}
-->
The test has been passing for [50 consecutive
runs](https://data.corp.google.com/sites/flutter_infra_metrics_datasite/flutter_check_test_flakiness_status_dashboard/?p=BUILDER_NAME:%22Linux_android_emu%20android%20views%22).
This test can be marked as unflaky.

Co-authored-by: Gray Mackall <34871572+gmackall@users.noreply.github.com>
2025-01-23 21:55:50 +00:00
Polina Cherkasova
8d00bd9c9a
Unskip test. (#162106) 2025-01-23 21:10:38 +00:00
Taha Tesser
1c0b3369cb
Add ability to maintain bottom view padding in NavigationBar safe area (#162076)
Fixes [When the on-screen keyboard is open, NavigationBar does not
maintainBottomViewPadding in Edge-to-Edge
mode](https://github.com/flutter/flutter/issues/159526)

### Description 

According to the
[SafeArea.maintainBottomViewPadding](https://api.flutter.dev/flutter/widgets/SafeArea/maintainBottomViewPadding.html)
docs, it is expected that `NavigationBar` will shift when the view
padding changes. This PR provides ability to override the
`maintainBottomViewPadding` property in the under `SafeArea` in the
`NavigationBar`.


### Code Sample

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

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

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);

  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Sample'),
        ),
        body: const Center(
          child: Padding(
            padding: EdgeInsets.all(16.0),
            child: TextField(
              decoration: InputDecoration(border: OutlineInputBorder()),
            ),
          ),
        ),
        bottomNavigationBar: NavigationBar(
          maintainBottomViewPadding: true,
          destinations: const <Widget>[
          NavigationDestination(icon: Icon(Icons.favorite_rounded), label: 'Favorite'),
          NavigationDestination(icon: Icon(Icons.favorite_rounded), label: 'Favorite'),
          NavigationDestination(icon: Icon(Icons.favorite_rounded), label: 'Favorite')
        ]),
        floatingActionButton: FloatingActionButton(
          onPressed: () {},
          child: const Icon(Icons.add),
        ),
      ),
    );
  }
}
```

</details>

### With `maintainBottomViewPadding: false` (Default)



https://github.com/user-attachments/assets/1cea27d4-2d6d-4bca-bb9a-53c0a21fdb4d


### With `maintainBottomViewPadding: true`



https://github.com/user-attachments/assets/b6c7487f-e23c-43db-a365-90bf69fa03dd



## 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].
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-23 21:00:08 +00:00
flutter-pub-roller-bot
c518949703
Roll pub packages (#162095)
This PR was generated by `flutter update-packages --force-upgrade`.
2025-01-23 20:45:08 +00:00
Matan Lurey
8c31ea48c8
Delete an unused (manual) workflow, added missing copyright headers. (#162050)
Just TLC while working on something related.
2025-01-23 19:47:05 +00:00
Bartek Pacia
558b21abf1
Android templates: update default Kotlin from 1.8.22 to 2.1.0, update default Gradle from 8.9 to 8.12 (#160974) 2025-01-23 19:39:32 +00:00
Chris Bracken
1daa75598b
flutter_tools: flutter_tester is a host artifact (#162047)
This resolves the case where a `flutter test` run is invoked on a target
iOS/Android device, as in `flutter test -d iOS-device`.

Previously `CachedLocalEngineArtifacts` was returning `flutter_tester`
from the local target build directory. `flutter_tester` is a host build
artifact and thus should be returned from the local host engine
directory, not the local target build directory.

Some history: A long time ago, desktop artifacts were produced as part
of the host builds; and in fact, they still are, but ideally shouldn't
be. At some point we added target builds for macOS, Windows, and Linux
embedders, but failed to clean the target artifacts out of the host
builds. Similarly, the desktop target builds should ideally not produce
host artifacts, but that's less problematic. The conflation of the two
is likely why the existing code was working until now.

Related issue: https://github.com/flutter/flutter/issues/38935

Closes: https://github.com/flutter/flutter/issues/162045

## 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-23 19:23:54 +00:00
Jason Simmons
3fd4d0a61c
[Impeller] Make glIsTexture mockable for use by the ReactorGLES.NameUntrackedHandle test (#162082)
ReactorGLES.NameUntrackedHandle calls SetDebugLabel, which invokes
glIsTexture. glIsTexture should return a GLboolean. But the mock GLES
resolver was mapping glIsTexture to a no-op function with a void return
type.

This change makes glIsTexture mockable so the test can ensure that it
returns the appropriate result.
2025-01-23 19:00:01 +00:00
Jenn Magder
3850ba32e0
Remove "Mac Designed for iPad" as a discoverable flutter run device (#161459)
It's confusing that the "Mac Designed for iPad" device is discoverabe
for `flutter run`, but if you select it then it complains that's not a
runnable target. It currently only works for `flutter attach`.

Reverts 42317804ee

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

## 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-23 18:51:39 +00:00
Loïc Sharma
136d8e576a
Show error on macOS if missing Local Network permissions (#161846)
### Background

macOS Sequoia requires the user's permission to do multicast operations,
which the Flutter tool does to connect to the Dart VM. If the app does
not have permission to communicate with devices on the local network,
the following happens:

1. Flutter tool starts a [multicast
lookup](bb2d34126c/packages/flutter_tools/lib/src/mdns_discovery.dart (L238-L241))
2. The mDNS client [sends data on the
socket](973e8b59e2/packages/multicast_dns/lib/multicast_dns.dart (L219))
4. macOS blocks the operation. Dart's native socket implementation
throws an `OSError`
5. Dart's `Socket.send` [catches the
`OSError`](da6dc03a15/sdk/lib/_internal/vm/bin/socket_patch.dart (L1511-L1515)),
wraps it in a `SocketException`, and [schedules a
microtask](da6dc03a15/sdk/lib/_internal/vm/bin/socket_patch.dart (L1513))
that [reports the exception through the socket's
stream](95f0052267/sdk/lib/_internal/vm/bin/socket_patch.dart (L3011))
([`Socket` is a
`Stream`](https://api.dart.dev/dart-io/Socket-class.html))
6. The mDNS client [does not listen to the socket stream's
errors](973e8b59e2/packages/multicast_dns/lib/multicast_dns.dart (L155)),
so [the error is sent to the current `Zone`'s uncaught error
handler](95f0052267/sdk/lib/async/stream_impl.dart (L553)).

### Reproduction

To reproduce this error on macOS...

1. Open System Settings > Privacy & Security > Local Network and toggle
off Visual Studio Code
2. Run a Flutter app using a physical device

### Fix

Ideally, we'd make `MDnsClient.lookup` throw an exception for this
scenario. Unfortunately, the `MDnsClient` can have multiple lookup
operations in parallel, and the `SocketException` doesn't give us enough
information to match it back to a pending `MDnsClient` request. See
https://github.com/flutter/packages/pull/8450 as an attempt to solve
this in the `MDnsClient` layer.

Instead, this fix introduces a `Zone` in the tool to catch the socket's
uncaught exception.

Follow-up to https://github.com/flutter/flutter/pull/157638

See: https://github.com/flutter/flutter/issues/150131

## 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-23 18:50:22 +00:00
Justin McCandless
3baa356f52
Autocomplete keyboard navigation (#159455)
I noticed some problems with Autocomplete keyboard navigation:

* Previously, when wrapping from the top to bottom or vice-versa,
scrolling wouldn't happen until after you hit the arrow key a few extra
times. This is due to the way we were doing scrolling and the fact that
those items were not yet built by ListView.builder. I fixed this.

<details>

<summary>Video of scrolling bug</summary>

[Screencast from 2024-11-25
16-21-06.webm](https://github.com/user-attachments/assets/ce01065a-1a03-4f37-b0f6-2d6273852ac4)

</details>

* This wrapping feature itself seemed to not be part of the `<select>`
tag on web ([try it on
MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select)),
which Autocomplete is kind of based on, so I removed it. It now stops at
the top/bottom.
* We were missing a couple of keyboard shortcuts
(https://github.com/flutter/flutter/issues/85233)

Fixes https://github.com/flutter/flutter/issues/85233
2025-01-23 18:48:41 +00:00
Matan Lurey
c1561a41c5
Add windows_host_engine_test to presubmit, remove lint exceptions. (#162032)
Closes https://github.com/flutter/flutter/issues/161990.
Closes https://github.com/flutter/flutter/issues/161406.

I don't have a Windows machine present, so will let CI tell me if it's
good to go.
2025-01-23 16:55:40 +00:00
Matan Lurey
211b46fcb1
Shift mac_clang_tidy to a Linux orchestrator. (#162042)
Towards https://github.com/flutter/flutter/issues/160701.

This adds a `bringup: true` node that duplicates what `Mac
mac_clang_tidy` is doing, to be turned down/up in a follow-up.
2025-01-23 16:32:01 +00:00
Jonah Williams
b46479c6a0
[Impeller] check both linear sampling props for AHBs. (#162043)
According to
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5806 ,
both eSampledImageYcbcrConversionLinearFilter and
eSampledImageFilterLinear properties are required to use a linear
chromaFilter.
2025-01-23 15:48:55 +00:00
Jason Simmons
6a8d77dccd
[Impeller] Implement inherited opacity for ColorFilterContents (#161834)
Inherited opacity should be combined with the alpha of the
ColorFilterContents when drawing objects with filters inside an opacity
layer.
2025-01-23 15:45:55 +00:00
Robert Ancell
b56b5b6a23
Keyboard tidy ups (#162054)
Make async calls use standard GLib async API.
Remove test specific methods.
Smaller cleanups.
2025-01-23 15:45:46 +00:00
Koji Wakamiya
2919003513
fix: Call codec.dispose in tests of engine/src/flutter (#161115)
PR derived from https://github.com/flutter/flutter/pull/159945.

Added `codec.dispose()` for directories under `engine/src/flutter`.

## 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].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-23 15:13:57 +00:00
Koji Wakamiya
d59995bac3
fix: Call codec.dispose in flutter/test (#161127)
PR derived from https://github.com/flutter/flutter/pull/159945.

Added `codec.dispose()` for directories under `flutter/test`.

## 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].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-23 15:13:40 +00:00
Koji Wakamiya
11a15cb525
fix: Call codec.dispose in flutter_test (#161131)
PR derived from https://github.com/flutter/flutter/pull/159945.

Added `codec.dispose()` for directories under `flutter_test`.

## 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].
- [ ] 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].
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-23 15:13:11 +00:00
Koji Wakamiya
29ffb88f71
fix: Call codec.dispose in dev/ (#161112)
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

PR derived from https://github.com/flutter/flutter/pull/159945.

Added `codec.dispose()` for directories under `dev/`.

## 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].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-23 15:07:21 +00:00
Robert Ancell
6e9b863e6d
Replace hacky code creating fake devices (#162056) 2025-01-23 14:48:01 +00:00
Daco Harkes
663d020788
[native assets] Roll dependencies (#162068)
Rolling in https://github.com/dart-lang/native/pull/1933.
2025-01-23 13:27:41 +00:00
Daco Harkes
9ded795e63
[native assets] Roll dependencies (#162017)
This PR rolls in a number of breaking changes for native assets:

* Pub workspaces are now supported, this requires a refactoring to how
the `NativeAssetsBuildRunner` is used. Most notably it requires being
explicit about the `runPackageName`. Flutter does not seem to have that
value, but it does have the `projectUri` which can be used to find the
package name via the package config.
* The API for build hooks has been redesigned. This PR updates the
project template, test project files, and test project strings.

## 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].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-01-23 09:22:36 +00:00
Bruno Leroux
97ca57cf08
Fix DropdownButtonFormField clips text when large text scale is used (#159975)
## Description

This PR fixes `DropdownButtonFormField` text being clipped when using a
large text scale.

Before:


![image](https://github.com/user-attachments/assets/6c4deed2-eb61-4c0a-912e-dba364013038)

After:


![image](https://github.com/user-attachments/assets/1dee5cda-9885-47c1-92a6-afbbc2312266)


This extend the fix from https://github.com/flutter/flutter/pull/107201
which does not work properly with Material 3 (because of
TextStyle.height being set for M3 default text styles).

## Related Issue

Fixes [DropdownButtonFormField clips text when large text scale is used
and useMaterial3 is
true](https://github.com/flutter/flutter/issues/159971)

## Tests

Adds 1 test.
Updates 1 test.
2025-01-23 05:38:20 +00:00
Matan Lurey
9c960ff7da
Add a better error message when flutter drive --target is used incorrectly. (#162023)
Closes https://github.com/flutter/flutter/issues/62626.
2025-01-23 04:39:13 +00:00
Jason Simmons
1083356201
Revert "Move the analyzer_benchmark to Mac arm64 devicelab bots" (#161822)
This reverts commit fe598e7d6f22e176499ede063572aafd9a9ef2b9.

This benchmark can be moved back to the Linux devicelab machines now
that https://dart-review.googlesource.com/c/sdk/+/403924 has landed.

Fixes https://github.com/flutter/flutter/issues/161620
2025-01-23 02:42:32 +00:00
Jonah Williams
948e31d19f
[Impeller] adjust coverage origin when rounding out SaveLayer bounds. (#161838)
Fixes https://github.com/flutter/flutter/issues/161374

When we round out the texture size for a saveLayer, also round out the
coverage so that the drawing origin is correct. Otherwise we may
actually cut off the top left edge of rendering.

---------

Co-authored-by: gaaclarke <30870216+gaaclarke@users.noreply.github.com>
2025-01-23 00:44:54 +00:00
Gray Mackall
64c808b7c8
Add a README with instructions for editing and running tests for the FGP (#161830)
Add a readme with some info.

## 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].
- [ ] 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.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
Co-authored-by: Reid Baker <hamilton.reid.baker@gmail.com>
2025-01-23 00:41:08 +00:00
auto-submit[bot]
c75d799dc6
Reverts "[Impeller] Migrate unit tests off of Skia geometry classes (#161855)" (#162046)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#161855
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: harryterkelsen
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: causing test failures on `linux_unopt` shard


https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20Production%20Engine%20Drone/1044163/infra
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: flar
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {jonahwilliams}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Handles the impeller unittests line in
https://github.com/flutter/flutter/issues/161456

This PR is focused on the unit tests in Impeller. There are still some
uses in other non-test areas which will be handled in a separate PR.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-01-23 00:04:48 +00:00
Siva
b2f515f45e
Roll Dart to Version 3.8.0-24.0.dev (#162035)
https://dart.googlesource.com/sdk.git/+log/c390aae86c09552b8a2852e87078f477ad09841b..3fc177bfd7016bcfa2781f43f1aa04d4cbc1351f


[3fc177b](https://dart.googlesource.com/sdk.git/+/3fc177bfd7016bcfa2781f43f1aa04d4cbc1351f)
[Version
3.8.0-24.0.dev](https://dart.googlesource.com/sdk.git/+/3fc177bfd7016bcfa2781f43f1aa04d4cbc1351f)
by Dart CI · 30 minutes ago
[dev](https://dart.googlesource.com/sdk.git/+/refs/heads/dev)
[3.8.0-24.0.dev](https://dart.googlesource.com/sdk.git/+/refs/tags/3.8.0-24.0.dev)

[bb0cabb](https://dart.googlesource.com/sdk.git/+/bb0cabbc1a99c148b47dbc2e37aa410d293d84a5)
[[element model] migrate
`subtype_test`](https://dart.googlesource.com/sdk.git/+/bb0cabbc1a99c148b47dbc2e37aa410d293d84a5)
by pq · 2 hours ago
[lkgr](https://dart.googlesource.com/sdk.git/+/refs/heads/lkgr)

[26f2206](https://dart.googlesource.com/sdk.git/+/26f220614cf363293934610146cd1529a550a0e6)
[[fix] fix `unnecessary_ignore` eol ignore
corrections](https://dart.googlesource.com/sdk.git/+/26f220614cf363293934610146cd1529a550a0e6)
by pq · 3 hours ago

[d9c7559](https://dart.googlesource.com/sdk.git/+/d9c75594637be616b01880fefa7a48f7b5379547)
[Version
3.8.0-23.0.dev](https://dart.googlesource.com/sdk.git/+/d9c75594637be616b01880fefa7a48f7b5379547)
by Dart CI · 5 hours ago
[3.8.0-23.0.dev](https://dart.googlesource.com/sdk.git/+/refs/tags/3.8.0-23.0.dev)

[fca0324](https://dart.googlesource.com/sdk.git/+/fca032461a1f13b0313cc72e8c1a78bc421a5c5e)
[[VM/Runtime] Turn on isolate group metrics gathering in product
mode](https://dart.googlesource.com/sdk.git/+/fca032461a1f13b0313cc72e8c1a78bc421a5c5e)
by asiva · 5 hours ago

[ae92595](https://dart.googlesource.com/sdk.git/+/ae92595e134493870d4d709f19cf1b9176ef4563)
[[cfe] MethodEncodingStrategy and
PropertyEncodingStrategy](https://dart.googlesource.com/sdk.git/+/ae92595e134493870d4d709f19cf1b9176ef4563)
by Johnni Winther · 6 hours ago

[b22c5c2](https://dart.googlesource.com/sdk.git/+/b22c5c214717008101a4796a76b2abf9a4144b8f)
[Version
3.8.0-22.0.dev](https://dart.googlesource.com/sdk.git/+/b22c5c214717008101a4796a76b2abf9a4144b8f)
by Dart CI · 9 hours ago
[3.8.0-22.0.dev](https://dart.googlesource.com/sdk.git/+/refs/tags/3.8.0-22.0.dev)

[ca540d8](https://dart.googlesource.com/sdk.git/+/ca540d8620d078962767b439951a8ea4681f7bcd)
[[CFE] Fix presubmit compile-and-lint when all changed files are
filtered
away](https://dart.googlesource.com/sdk.git/+/ca540d8620d078962767b439951a8ea4681f7bcd)
by Jens Johansen · 11 hours ago

[9233056](https://dart.googlesource.com/sdk.git/+/9233056319e96d0bfb242cebeddc9204f00f5f11)
[[dart2wasm] Move _Utf8Decoder.convertGeneral to JSCM
patch](https://dart.googlesource.com/sdk.git/+/9233056319e96d0bfb242cebeddc9204f00f5f11)
by Ömer Sinan Ağacan · 12 hours ago

[cc5612e](https://dart.googlesource.com/sdk.git/+/cc5612e322674fe96edf65bf7a693a1253022ca7)
[Fix: False Positive
"include_file_not_found"](https://dart.googlesource.com/sdk.git/+/cc5612e322674fe96edf65bf7a693a1253022ca7)
by Rohit · 16 hours ago
[base](https://dart.googlesource.com/sdk.git/+/refs/heads/base)

[5e95423](https://dart.googlesource.com/sdk.git/+/5e95423ddb6f8129ee4031492f713e6e3be71655)
[Version
3.8.0-21.0.dev](https://dart.googlesource.com/sdk.git/+/5e95423ddb6f8129ee4031492f713e6e3be71655)
by Dart CI · 17 hours ago
[3.8.0-21.0.dev](https://dart.googlesource.com/sdk.git/+/refs/tags/3.8.0-21.0.dev)

[5ec1002](https://dart.googlesource.com/sdk.git/+/5ec1002eff41778ee46a91048f3b131106992215)
[[ddc] Port library show/hide hot reload
tests](https://dart.googlesource.com/sdk.git/+/5ec1002eff41778ee46a91048f3b131106992215)
by Nicholas Shahan · 20 hours ago

[eb3f266](https://dart.googlesource.com/sdk.git/+/eb3f266dc37a303713f1dad358b19c4f27cc0478)
[Version
3.8.0-20.0.dev](https://dart.googlesource.com/sdk.git/+/eb3f266dc37a303713f1dad358b19c4f27cc0478)
by Dart CI · 21 hours ago
[3.8.0-20.0.dev](https://dart.googlesource.com/sdk.git/+/refs/tags/3.8.0-20.0.dev)

[1a48649](https://dart.googlesource.com/sdk.git/+/1a486499bf73ee5b007abbe522b94869a1f36d02)
[[dartdev] Fix ia32 invocation of dart2js from 'compile js'
command.](https://dart.googlesource.com/sdk.git/+/1a486499bf73ee5b007abbe522b94869a1f36d02)
by asiva · 22 hours ago

[9b7bb9d](https://dart.googlesource.com/sdk.git/+/9b7bb9df90b7bf866fa15f01bf28db0b4a2b303a)
[Fix "the the"
typo](https://dart.googlesource.com/sdk.git/+/9b7bb9df90b7bf866fa15f01bf28db0b4a2b303a)
by Mohamed Abdelaal · 22 hours ago

[e1eade6](https://dart.googlesource.com/sdk.git/+/e1eade612a2e5dea53be0b77d9d970fe1865971b)
[[deps] Roll
dart-lang/native](https://dart.googlesource.com/sdk.git/+/e1eade612a2e5dea53be0b77d9d970fe1865971b)
by Daco Harkes · 23 hours ago

[eba7e49](https://dart.googlesource.com/sdk.git/+/eba7e490316c0199f12663828938e94881a7d123)
[[analyzer] Change VariableElementImpl.type setter to
TypeImpl.](https://dart.googlesource.com/sdk.git/+/eba7e490316c0199f12663828938e94881a7d123)
by Paul Berry · 24 hours ago

[751fe13](https://dart.googlesource.com/sdk.git/+/751fe131e923b55f18e05c003134d9f1c36f2494)
[[analyzer] Use TypeImpl for type annotation
types.](https://dart.googlesource.com/sdk.git/+/751fe131e923b55f18e05c003134d9f1c36f2494)
by Paul Berry · 26 hours ago

[cf09edd](https://dart.googlesource.com/sdk.git/+/cf09edd35e780cdcb38e599327bd9164c87d54a8)
[analyzer_plugin: Bump version to
0.13.0](https://dart.googlesource.com/sdk.git/+/cf09edd35e780cdcb38e599327bd9164c87d54a8)
by Sam Rawlins · 26 hours ago
2025-01-22 22:30:18 +00:00
Nate Wilson
06c3c93d72
const AnimationStyle (#160564)
[**AnimationStyle**](https://main-api.flutter.dev/flutter/animation/AnimationStyle-class.html)
is an
[`@immutable`](https://main-api.flutter.dev/flutter/meta/immutable-constant.html)
class with all `final` fields.

This pull request gives it a `const` constructor.

<br>

related: #160563
2025-01-22 21:52:11 +00:00