sanni prasad
993f554e4c
Fix for issue 140372 ( #144947 )
...
*Continuing work from the PR https://github.com/flutter/flutter/pull/140373 *
Add the ability to set route settings on PopupMenuButton
Fixes https://github.com/flutter/flutter/issues/140372
Added UTs as requested
2024-03-18 21:35:37 +00:00
LongCatIsLooong
98369bdd50
Introduce methods for computing the baseline location of a RenderBox without affecting the current layout ( #144655 )
...
Extracted from https://github.com/flutter/flutter/pull/138369
Introduces `RenderBox.{compute,get}DryBaseline` for computing the baseline location in `RenderBox.computeDryLayout`.
2024-03-18 21:32:22 +00:00
Pierre-Louis
3109b1118e
Introduce Split curve ( #143130 )
...
`Split` is a curve that progresses according to `beginCurve` until
`split`, then according to `endCurve`.
This curve is used with bottom sheets to allow linear finger dragging
and non-linear enter/exit animations. This PR cleans up a previously
private class I introduced and replaces it with the more customisable
`Split`.
Fixes https://github.com/flutter/flutter/issues/51627
Diagram to be added with
https://github.com/flutter/assets-for-api-docs/pull/239
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-03-16 09:08:00 +01:00
LongCatIsLooong
cc01701781
Use a separate TextPainter for intrinsics calculation in RenderEditable and RenderParagraph ( #144577 )
...
Use a dedicated `TextPainter` for intrinsic size calculation in `RenderEditable` and `RenderParagraph`.
This is an implementation detail so the change should be covered by existing tests. Performance wise this shouldn't be significantly slower since SkParagraph [caches the result of slower operations across different paragraphs](9c62e7b382/modules/skparagraph/src/ParagraphCache.cpp (L254-L272) ). Existing benchmarks should be able to catch potential regressions (??).
The reason for making this change is to make sure that intrinsic size computations don't destroy text layout artifacts, so I can expose the text layout as a stream of immutable `TextLayout` objects, to signify other render objects that text-layout-dependent-cache (such as caches for `getBoxesForRange` which can be relatively slow to compute) should be invalidated and `markNeedsPaint` needs to be called if the painting logic depended on text layout.
Without this change, the intrinsics/dry layout calculations will add additional events to the text layout stream, which violates the "dry"/non-destructive contract.
2024-03-16 01:15:19 +00:00
hangyu
58eb0e8ae6
Update a11y for SliverAppBar ( #144437 )
...
1. Set cacheExtent for sliverAppBar so it's not dropped from the
semantics tree.
2. Update its toolbarOpacity in a11y mode to 1.0. When scrolling in a11y
mode and the focus is back to the sliverAppBar, the content should be
visible.
fixes: https://github.com/flutter/flutter/issues/143437
## Pre-launch Checklist
- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-03-15 10:42:02 -07:00
auto-submit[bot]
bc611f565b
Reverts "Fix TextField helper top padding on M3 ( #145087 )" ( #145168 )
...
Reverts: flutter/flutter#145087
Initiated by: Jasguerrero
Reason for reverting: failing on accessibility checks b/329548765
Original PR Author: bleroux
Reviewed By: {justinmc}
This change reverts the following previous change:
## Description
`InputDecorator` adds a 8.0 gap beetween the container and the helper text.
From the Material 3 specification, this gap should be 4.0.
See https://m3.material.io/components/text-fields/specs#0c5c8d6d-2169-4d42-960c-51f6ee42eb57 .
This PR sets the correct values for M3 without changing the value for M2.
| Before | After | M3 Spec |
|--------|--------|--------|
|  | |  |
If this change is accepted, a future step will be to make this value configurable, probably by `InputDecorationTheme`.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/144984
## Tests
Updates a value used by several existing tests.
2024-03-14 18:00:26 +00:00
LongCatIsLooong
a69567a36f
Asserts if a TextPainter gets disposed more than once ( #145124 )
...
The overflow indicator was sharing the same `TextPainter`.
2024-03-14 16:43:00 +00:00
Matej Knopp
19087442ce
RenderViewport max layout cycles should depend on number of slivers ( #144104 )
...
Fixes https://github.com/flutter/flutter/issues/144102
## 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-13 22:28:43 +01:00
LongCatIsLooong
4f786841f9
Revert "Add FocusNode.focusabilityListenable ( #144280 )" since the feature is no longer needed ( #145102 )
...
This reverts commit 726e5d28c088260b507067a6890a69b6ccb0f103.
*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-13 20:17:07 +00:00
Bruno Leroux
33fbb75a95
Fix TextField helper top padding on M3 ( #145087 )
...
## Description
`InputDecorator` adds a 8.0 gap beetween the container and the helper text.
From the Material 3 specification, this gap should be 4.0.
See https://m3.material.io/components/text-fields/specs#0c5c8d6d-2169-4d42-960c-51f6ee42eb57 .
This PR sets the correct values for M3 without changing the value for M2.
| Before | After | M3 Spec |
|--------|--------|--------|
|  | |  |
If this change is accepted, a future step will be to make this value configurable, probably by `InputDecorationTheme`.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/144984
## Tests
Updates a value used by several existing tests.
2024-03-13 19:56:49 +00:00
Dhikshith
f91614a4b9
Fix Cupertino Context Menu Container to Remove White Corners ( #144883 )
...
Fixes a visual glitch when CupertinoContextMenu is on a non-white background.
2024-03-13 12:38:28 -07:00
Nate
b9e537336f
Turning if chains into shorter switch statements ( #144977 )
...
This pull request is part of the effort to solve issue #144903 .
In the past, my efforts to reduce line length involved refactoring away from switch statements, but unlike [yesterday's PR](https://github.com/flutter/flutter/pull/144905 ), this one is full of switch statements that make things more concise!
2024-03-13 17:16:17 +00:00
Victoria Ashworth
825e901e00
Set cacheExtent for SliverFillRemaining widget ( #143612 )
...
When a Sliver with items is outside of the Viewport, but within the Viewport's `cacheExtent`, the framework should create SemanticNodes for the items even though they are out of view. However, for this to work, the Sliver's geometry must have a `cacheExtent` (how much space the sliver took up of the Viewport's `cacheExtent`) greater than 0, otherwise it is [excluded](f01ce9f4cb/packages/flutter/lib/src/rendering/viewport.dart (L311-L315) ).
`SliverFillRemaining` widgets that fall outside the viewport did not have this set and therefore were being excluded when SemanticNodes were created, even if they were within the Viewport's `cacheExtent`. This PR sets the `cacheExtent` for `SliverFillRemaining` widgets.
In addition, `RenderSliverFillRemainingWithScrollable` would get dropped from the semantic tree because it's child had a size of 0 when outside the remaining paint extent. To fix, we give the child a `maxExtent` of the sliver's `cacheExtent` if it's outside the remaining paint extent but within the viewport's cacheExtent.
Fixes https://github.com/flutter/flutter/issues/142065 .
Definitions:
* `RenderViewport.cacheExtent`:
```dart
/// The viewport has an area before and after the visible area to cache items
/// that are about to become visible when the user scrolls.
///
/// Items that fall in this cache area are laid out even though they are not
/// (yet) visible on screen. The [cacheExtent] describes how many pixels
/// the cache area extends before the leading edge and after the trailing edge
/// of the viewport.
///
/// The total extent, which the viewport will try to cover with children, is
/// [cacheExtent] before the leading edge + extent of the main axis +
/// [cacheExtent] after the trailing edge.
///
/// The cache area is also used to implement implicit accessibility scrolling
/// on iOS: When the accessibility focus moves from an item in the visible
/// viewport to an invisible item in the cache area, the framework will bring
/// that item into view with an (implicit) scroll action.
```
* `SliverGeometry.cacheExtent`:
```dart
/// How many pixels the sliver has consumed in the
/// [SliverConstraints.remainingCacheExtent].
```
* `SliverContraints.remainingCacheExtent`:
```dart
/// Describes how much content the sliver should provide starting from the
/// [cacheOrigin].
///
/// Not all content in the [remainingCacheExtent] will be visible as some
/// of it might fall into the cache area of the viewport.
///
/// Each sliver should start laying out content at the [cacheOrigin] and
/// try to provide as much content as the [remainingCacheExtent] allows.
```
2024-03-13 16:34:25 +00:00
Qun Cheng
1ccad1a2a7
Remove showTrackOnHover from Scrollbar and ScrollbarTheme ( #144180 )
...
This PR is to remove deprecated `Scrollbar.showTrackOnHover` and `ScrollbarThemeData.showTrackOnHover`.
These parameters are made obsolete in https://github.com/flutter/flutter/pull/111706 .
Part of https://github.com/flutter/flutter/issues/143956
2024-03-13 16:31:50 +00:00
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
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
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
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
yim
f733e3a441
Fix multiple calls to Slider's onChanged. ( #143680 )
...
Fixes #143524
2024-03-09 07:50:23 +00: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
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
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
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
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
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
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
d93f24ab93
Revert "_DefaultTabControllerState should dispose all created TabContoller instances. ( #136608 )" ( #144579 )
...
This reverts commit 9fa9fd365c9f1d8053cc75da996407abe1537410.
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
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
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
Bruno Leroux
16d122dbe2
Fix text color for default CupertinoContextMenuAction ( #144542 )
...
## Description
This PR fix the text color for the default action in a CupertiniContextMenu.
Previously the dynamic color was not resolved which leads to text being blacks when theme brightness was dark.
| Before | After |
|--------|--------|
|  |  |
## Related Issue
Fixes https://github.com/flutter/flutter/issues/144492 .
## Tests
Adds 1 test, updates 1.
2024-03-04 21:36:03 +00:00
Nate
1a0dc8f1e1
Add missing parameter to TableBorder.symmetric, and improve class constructors ( #144279 )
...
Originally, my aim was just to refactor (as per usual), but while messing around with the `TableBorder.symmetric` constructor, I realized that `borderRadius` was missing!
This pull request makes a few class constructors more efficient, and it fixes #144277 by adding the missing parameter.
<br>
2024-03-04 20:20:19 +00:00
Qun Cheng
7c50267fa0
Doc fix for DropdownButtonFormField.value ( #144427 )
...
Fixes https://github.com/flutter/flutter/issues/144135
This PR is just a doc fix.
2024-03-04 18:52:20 +00:00
Loïc Sharma
cc740eb503
[Windows] Update keyboard modifiers link ( #144426 )
...
Updates link to the new location. No tests as this only changes a comment.
2024-03-04 17:13:49 +00:00
Taha Tesser
9a838455e2
Fix showDateRangePicker is missing dartpad tag and cleanup ( #144475 )
...
fixes [`showDateRangePicker` interactive sample not loading](https://github.com/flutter/flutter/issues/144474 )
### Description
This fixes `showDateRangePicker` example not loading in Dartpad.
Similar fix was made for `showDatePicker` in https://github.com/flutter/flutter/pull/99401
2024-03-01 15:36:24 +00:00
Taha Tesser
ba719bc588
Fix CalendarDatePicker day selection shape and overlay ( #144317 )
...
fixes [`DatePickerDialog` date entry hover background and ink splash have different radius](https://github.com/flutter/flutter/issues/141350 )
fixes [Ability to customize DatePicker day selection background and overlay shape](https://github.com/flutter/flutter/issues/144220 )
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Builder(builder: (context) {
return FilledButton(
onPressed: () {
showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime.utc(2010),
lastDate: DateTime.utc(2030),
);
},
child: const Text('Show Date picker'),
);
}),
),
),
);
}
}
```
</details>
### Material DatePicker states specs

### Day selection overlay
| Before | After |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/b529d38d-0232-494b-8bf2-55d28420a245 " /> | <img src="https://github.com/flutter/flutter/assets/48603081/c4799559-a7ef-45fd-aed9-aeb386370580 " /> |
### Hover, pressed, highlight preview
| Before | After |
| --------------- | --------------- |
| <video src="https://github.com/flutter/flutter/assets/48603081/8edde82a-7f39-4482-afab-183e1bce5991 " /> | <video src="https://github.com/flutter/flutter/assets/48603081/04e1502e-67a4-4b33-973d-463067d70151 " /> |
### Using `DatePickerThemeData.dayShape` to customize day selection background and overlay shape
| Before | After |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/a0c85f58-a69b-4e14-a45d-41e580ceedce " /> | <img src="https://github.com/flutter/flutter/assets/48603081/db67cee1-d28d-4168-98b8-fd7a9cb70cda " /> |
### Example preview

2024-03-01 12:44:29 +00:00
Taha Tesser
cfabdca9ca
Fix chips use square delete button InkWell shape instead of circular ( #144319 )
...
fixes [Chips delete button hover style is square, not circular](https://github.com/flutter/flutter/issues/141335 )
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: RawChip(
label: const Text('Test'),
onPressed: null,
deleteIcon: const Icon(Icons.clear, size: 18),
onDeleted: () {},
),
),
),
);
}
}
```
</details>
### Preview
| Before | After |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/c5d62c57-97b3-4f94-b83d-df13559ee3a8 " /> | <img src="https://github.com/flutter/flutter/assets/48603081/b76edaab-73e0-4aa9-8ca2-127eedd77814 " /> |
2024-03-01 12:02:07 +00:00
Bruno Leroux
8a312cd01a
Horizontally expand text selection toolbar buttons in overflow menu ( #144391 )
...
## Description
This PR expands the items displayed in the overflow menu of a `TextSelectionToolbar` making buttons clickable in the blank area.
| Before | After |
|--------|--------|
| Each item has its own width | All items expand horizontally |
|  |  |
## Related Issue
Fixes https://github.com/flutter/flutter/issues/144089 .
## Tests
Adds 1 tests.
2024-03-01 06:40:47 +00:00
Michael Goderbauer
52bb198fb2
Remove master from API docs ( #144425 )
2024-03-01 01:06:56 +00:00
hangyu
14b914ab92
Reland [a11y] Fix date picker cannot focus on the edit field ( #144198 )
...
reland https://github.com/flutter/flutter/pull/143117
fixes: https://github.com/flutter/flutter/issues/143116
fixes: https://github.com/flutter/flutter/issues/141992
## Pre-launch Checklist
- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-02-29 15:16:53 -08:00
Qun Cheng
ee6111a7aa
Remove deprecated backgroundColor from ThemeData ( #144079 )
...
This PR is to remove deprecated ThemeData.backgroundColor.
These parameters are made obsolete in https://github.com/flutter/flutter/pull/110162 .
Part of https://github.com/flutter/flutter/issues/143956
2024-02-29 23:07:23 +00:00
Qun Cheng
1349c591cc
Remove toggleableActiveColor from ThemeData ( #144178 )
...
This PR is to remove deprecated ThemeData.toggleableActiveColor.
These parameters are made obsolete in https://github.com/flutter/flutter/pull/97972 .
Part of https://github.com/flutter/flutter/pull/111080
2024-02-29 20:58:11 +00:00
LongCatIsLooong
726e5d28c0
Add FocusNode.focusabilityListenable ( #144280 )
...
This is for https://github.com/flutter/flutter/issues/127803 : a text field should unregister from the scribble scope, when it becomes unfocusable.
When a `FocusNode` has listeners and its `_canRequestFocus` flag is set to true, it adds `+1` to `_focusabilityListeningDescendantCount` of all ancestors until it reaches the first ancestor with `descendantsAreFocusable = false`. When the a `FocusNode`'s `descendantsAreFocusable` changes, all listeners that contributed to its `_focusabilityListeningDescendantCount` will be notified.
2024-02-29 20:40:46 +00:00
Bruno Leroux
e92bca3ff5
[flutter_tools] Update external link in Android manifest template ( #144302 )
...
## Description
This PR simplifies one external link in a commented section of the Android manifest template.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/144249
## Tests
Documentation only PR.
2024-02-29 06:47:19 +00:00
Justin McCandless
ac66b295c7
Docs on the interaction between Shortcuts and text input ( #144328 )
...
I was talking with @tvolkert about the complex behavior of Shortcuts when a text field is focused. I created [this dartpad](https://dartpad.dev/?id=0b5c08fa85637422baa84927b7f1ee5f ) to illustrate the problem, which shows a key being stolen from a text field by Shortcuts, and how to prevent that using DoNothingAndStopPropagationIntent.
This PR adds a section in the docs explaining how all of this works and how to override this "stealing" problem.
2024-02-29 01:09:18 +00:00
LongCatIsLooong
dddbd047d1
Reland "Cache FocusNode.enclosingScope, clean up descendantsAreFocusable ( #144207 )" ( #144330 )
...
The [internal test failure](https://github.com/flutter/flutter/pull/144207#issuecomment-1968236339 ) was caused by `Focus.withExternalFocusNode` modifying the external node's attributes. The extra changes are in this commit: e53d98b06c
CL with (almost) passing TGP: cl/611157582
2024-02-29 00:48:01 +00:00
Tong Mu
e316022227
ReportTiming callback should record the sendFrameToEngine when it was scheduled ( #144212 )
...
Fixes https://github.com/flutter/flutter/issues/144261
2024-02-29 00:47:55 +00:00
Justin McCandless
e6a6a473f7
Mention SelectionArea in SelectableText docs ( #143784 )
...
Most users should be using SelectionArea over SelectableText, so this makes that more clear/discoverable in the docs.
2024-02-28 14:36:08 -08:00
Qun Cheng
0d8eafb006
Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" ( #144273 )
2024-02-28 13:55:50 -08:00
Tomasz Gucio
88f75712d7
Remove irrelevant comment in TextPainter ( #144308 )
...
This PR removes an irrelevant comment in `TextPainter` for `_computePaintOffsetFraction`. Also some typos are corrected and missing spaces/newlines added.
test-exempt: no functional change
2024-02-28 21:47:06 +00:00