fixes [MenuItemButton does not constrain its child](https://github.com/flutter/flutter/issues/129439)
fixes [DropdownMenuEntry Text Overflow when width of DropdownMenu is not specified](https://github.com/flutter/flutter/issues/140596)
### Description
- This PR continues the fix from https://github.com/flutter/flutter/pull/141314#issuecomment-1945804640 and adds controlled widths for the `MenuBar` children to fix the unbounded width issue which blocked the PR earlier. (Widgets with non-zero flex value cannot be laid out in a horizontal scroll view which is created by `MenuBar` widget)
- Added tests coverage.
- Added documentation.
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
MenuController menuController = MenuController();
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
DropdownMenu<int>(
expandedInsets: EdgeInsets.zero,
dropdownMenuEntries: <DropdownMenuEntry<int>>[
DropdownMenuEntry<int>(
value: 0,
label:
'This is a long text that is multiplied by 10. ' * 10,
style: const ButtonStyle(
textStyle: MaterialStatePropertyAll(
TextStyle(overflow: TextOverflow.ellipsis),
),
),
),
],
),
SizedBox(
width: 200,
child: MenuItemButton(
onPressed: () {},
leadingIcon: const Icon(Icons.menu),
trailingIcon: const Icon(Icons.arrow_forward_ios),
child: const Text(
'This is a very long text that will wrap to the multiple lines.',
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
),
// MenuBar(
// children: [
// MenuItemButton(
// onPressed: () {
// },
// child: Text('Short Text Menu'),
// ),
// MenuItemButton(
// onPressed: () {},
// child: Text('Very very very very very long text menu'),
// ),
// ],
// ),
],
),
),
),
);
}
}
```
</details>
### Before

### After

This PR is a follow-up of a previous PR of mine:
https://github.com/flutter/flutter/pull/141417. It was unfinished, i.e.
I only implemented it and used it in `examples/hello_world`. No "flutter
create" templates were modified.
This change is theoretically breaking, but in practice, I am pretty sure
nobody uses this. It was not accounced anywhere, the only app using it
is `examples/hello_world`. I did not do that (that=update docs and
templates) because I wanted a solution that is idiomatic in both Gradle
and Kotlin, and only now I found time to do this.
### Without this change
```groovy
defaultConfig {
applicationId = "io.flutter.examples.hello_world"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode()
versionName = flutter.versionName()
}
```
### With this change
```groovy
defaultConfig {
applicationId = "io.flutter.examples.hello_world"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
```
Idiomatic getter - yay! It's consistent between assignment of all four
props.
### Issue
fixes https://github.com/flutter/flutter/issues/146067
## 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.
---------
Co-authored-by: Reid Baker <reidbaker@google.com>
This is part 5 of a broken down version of the #140101 refactor.
This PR adds a README to flutter_goldens with breadcrumbs to other sources of documentation.
This is part 6 of a broken down version of the #140101 refactor.
This change tries to be as minimal as possible to make review as easy as possible. We can further simplify this file in future PRs. This change allows us to re-enable test order randomization for these tests.
Fixes https://github.com/flutter/flutter/issues/144454
For reference, after formatting it looks like:
```
ââ Flutter Fix âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â [!] Your project requires a newer version of the Kotlin Gradle plugin. â
â Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then update the â
â version number of the plugin with id "org.jetbrains.kotlin.android" in the plugins block of â
â /Users/mackall/development/BugTesting/ELIMINATEME/blah/android/settings.gradle. â
â â
â Alternatively (if your project was created before Flutter 3.19), update â
â /Users/mackall/development/BugTesting/ELIMINATEME/blah/android/build.gradle â
â ext.kotlin_version = '<latest-version>' â
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
```
* Updated the Material Design tokens to v2.3.5
* Linear and circular progress indicator token sets are deprecated in v0.207. The `md.com.progress-indicator` token set was created and should be used instead.
* tokens is now using [semantic versioning](https://semver.org/) ï¼Thanks @guidezpl for reminding:) )
* ~Fixes #128877. The default text style is updated to `bodyLarge` now:)~ Added TODOs for the label text style of `PopupMenuButton`. Will create a separate PR because this change breaks Google testing.
In order for text fields to work correctly in multi-view on the web, we need to have the `viewId` information sent to the engine (`TextInput.setClient`). And while the text field is active, if it somehow moves to a new `View`, we need to inform the engine about such change (`TextInput.updateConfig`).
Engine PR: https://github.com/flutter/engine/pull/51099
Fixes https://github.com/flutter/flutter/issues/137344
This PR makes the static API of the `BackgroundIsolateBinaryMessenger` consistent between its web and IO implementations.
This way, multi-platform applications will compile for the web when using the `ensureInitialized` method (even though it'll throw at runtime, like the `instance` getter, because isolates are not supported on the web).
### Issues
* Fixes: https://github.com/flutter/flutter/issues/145260
*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].*
Added a Fix to search bar that allows it be unfocused when tapped anywhere outside the search bar.
I have attached below the app flow after implementing the fix.
https://github.com/flutter/flutter/assets/54017876/70915c47-9b77-4a43-a128-8706107f921f
Issue that gets resolved by this fix: #145096
*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
In service of https://github.com/flutter/flutter/issues/143348
This PR makes hot reloads reflect changes to transformer configurations under the `assets` section in pubspec.yaml.
This PR is optimized for ease of implementation, and should not be merged as-is. If it is merged as-is, seriously consider creating a tech debt issue and assigning it to someone to make sure it gets resolved.
This PR expands the `HtmlElementView` widget DartDocs, with the following sections:
* Usage: How to use the widget, two ways:
* The `HtmlElementView.fromTagName` constructor
* The `PlatformViewRegistry` way
* Lifecycle: There's an `onCreated` callback on the widget. When does it get called?
* HTML Lifecycle: How to listen to events coming from the DOM.
* Visibility: what is the `isVisible` property for?
Small additional tweaks here and there to mention common pitfalls of using HtmlElementView on the web, and mentions to workarounds, like `package:pointer_interceptor`.
## Issues
* Fixes: https://github.com/flutter/flutter/issues/143922
* Fixes: https://github.com/flutter/flutter/issues/49634
* Related: https://github.com/flutter/website/issues/5063
Fixes https://github.com/flutter/flutter/issues/145618
The local file comparator was being used in post submit for the Linux coverage shard. This corrects it to choose the skipping comparator.
Fixes https://github.com/flutter/flutter/issues/144982
For reference, may have to do with #138442 when we reworked the gesture handling. The adjustments to the comments here were certainly from #138442 not updating them. Confused myself for a minute or two. ð