Kate Lovett
9e0ad4c63f
Fix paint offset in reverse for 2D ( #128724 )
...
Fixes https://github.com/flutter/flutter/issues/128723
The paint offset was incorrectly being computed when one or both axis was in the reverse direction. Instead of using the paint extent, the child's size should be used.
2023-06-12 23:28:15 +00:00
chunhtai
cc6f86e6e1
Clarifies semantics long press and semantics on tap documentation ( #128599 )
...
fixes https://github.com/flutter/flutter/issues/35112
2023-06-09 19:49:02 +00:00
Greg Spencer
a280346193
Add AppLifecycleListener, with support for application exit handling ( #123274 )
...
## Description
This adds `AppLifecycleListener`, a class for listening to changes in the application lifecycle, and responding to requests to exit the application.
It depends on changes in the Engine that add new lifecycle states: https://github.com/flutter/engine/pull/42418
Here's a diagram for the lifecycle states. I'll add a similar diagram to the documentation for these classes.

## Related Issues
- https://github.com/flutter/flutter/issues/30735
## Tests
- Added tests for new lifecycle value, as well as for the `AppLifecycleListener` itself.
2023-06-08 22:57:19 +00:00
Tae Hyung Kim
f2351f61d4
Sliver Main Axis Group ( #126596 )
...
This widget implements the ability to place slivers one after another in
a single ScrollView in a way that all child slivers are drawn within the
bounds of the group itself (i.e. SliverPersistentHeaders aren't drawn
outside of the scroll extent provided by all of the child slivers). The
design document for SliverMainAxisGroup can be found
[here](https://docs.google.com/document/d/1e2bdLSYV_Dq2h8aHpF8mda67aOmZocPiMyjCcTTZhTg/edit?resourcekey=0-Xj2X2XA3CAFae22Sv3hAiA ).
Fixes https://github.com/flutter/flutter/issues/33137 .
## 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
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
2023-06-08 15:54:09 -07:00
LongCatIsLooong
37f20c268b
Disable blinking cursor when EditableText.showCursor is false ( #127562 )
...
Fixes https://github.com/flutter/flutter/issues/108187
2023-06-08 20:07:23 +00:00
hellohuanlin
9707001c02
[floating_cursor_selection]add more comments on the tricky part ( #127227 )
...
Many parts of the floating cursor selection feature is pretty tricky. Some took me a while to figure out. So I added some comments to explain a bit for future readers.
*List which issues are fixed by this PR. You must list at least one issue.*
https://github.com/flutter/flutter/issues/30476
*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2023-06-08 20:03:49 +00:00
Michael Goderbauer
83af943351
Move RenderObjectElement.updateChildren to Element ( #128458 )
...
This method lived on RenderObjectElement because traditionally, it would be the only one that had to deal with multiple children. The method itself has nothing RenderObjectElement specific, though, and can also be used by any other Element subclass that has multiple children. We are introducing one of those in the near future to handle multiple top-level views.
This is a straight up copy&paste move, no changes have been applied to the code itself.
2023-06-08 19:44:45 +00:00
Zachary Anderson
c8bcff4161
Revert "Redo make inspector weakly referencing the inspected objects." ( #128506 )
...
Reverts flutter/flutter#128471
It looks like one of the tests modified by this PR is still failing: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20framework_tests_widgets/11385/overview
2023-06-08 13:28:04 +00:00
Polina Cherkasova
1bd1b5014c
Redo make inspector weakly referencing the inspected objects. ( #128471 )
2023-06-07 18:16:30 -07:00
fzyzcjy
8a5c22e282
Super tiny MediaQuery doc update ( #127904 )
...
Just now I see some good news: https://www.reddit.com/r/FlutterDev/comments/13vo5a2/the_most_important_flutter_310_feature_that/ (ignore the title though...). It was a performance problem in the old days, so it was great that the problem disappears. However, it seems that the doc is not updated yet, so everyone reading MediaQuery page will still use the old way. Thus I create this super-tiny PR :)
2023-06-07 17:04:03 +00:00
Jackson Gardner
2830f0734d
Revert "Make inspector weakly referencing the inspected objects." ( #128436 )
...
Reverts flutter/flutter#128095
We have a tree closure related to the `widget_inspector_test.dart`. I'd
like to see if reverting this resolves the issue.
2023-06-07 09:38:42 -07:00
Alex Fischer
19f85935ca
Addressed Ambiguity in transform.scale constructor docs ( #128182 )
...
This PR updates the docs for Transform.Scale constructor by clearing up some ambiguity regarding how the scaling factor is affected by the omission of a value given you provide scaleX and scaleY as arguments as opposed to just scale
addresses bug [126822](https://github.com/flutter/flutter/issues/126822 )
- [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.
2023-06-07 03:11:48 +00:00
Polina Cherkasova
a5accb779b
Make inspector weakly referencing the inspected objects. ( #128095 )
2023-06-06 19:33:53 -07:00
Michael Goderbauer
cff67336d0
Add viewId to PointerEvents ( #128287 )
...
Follow-up to https://github.com/flutter/engine/pull/42493 .
2023-06-06 19:16:02 -07:00
Khanh Nguyen
73b1d17953
Update Draggable YouTube video link ( #128078 )
...
The old Draggable video had a mistake in it, we've since uploaded a newer version that's been corrected. Thanks for catching that @gspencergoog!
- [na] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [na] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
- [na] I listed at least one issue that this PR fixes in the description above.
- [na] I added new tests to check the change I am making, or this PR is [test-exempt].
- [na] All existing and new tests are passing.
2023-06-06 22:37:55 +00:00
LongCatIsLooong
8fff6f5d34
Remove more rounding hacks from TextPainter ( #127826 )
...
Add the conditional rounding that I forgot to add in https://github.com/flutter/flutter/pull/127099
2023-06-06 22:17:58 +00:00
Renzo Olivares
0e1056f807
handleSelectWord in MultiSelectableSelectionContainerDelegate should handle rects inside of rects ( #127478 )
...
Fixes #127076
Sometimes a `Selectable`s rect may contain another `Selectable`s rect within it. In the case of `handleSelectWord` when choosing which `Selectable` to dispatch the `SelectionEvent` to, the event would be dispatched to the wrong `Selectable` causing an assertion error to be thrown.
<img width="577" alt="Screenshot 2023-05-24 at 2 46 13 AM" src="https://github.com/flutter/flutter/assets/948037/bb246966-acad-4d81-bd87-758c3ea6ea39 ">
In the picture above the red outline shows the rect of a two-line piece of text. And the blue rect shows the rect of a piece of text that is on the second line of the two-line piece of text, but has been separated into its own rect for some case, for example when `TextSpan`s are separated by a `WidgetSpan`.
We should check if the text layout of the selectable that has been dispatched the SelectionEvent contains the word, if not then return `SelectionResult.next`, and continue to look through the list of selectables.
2023-06-06 21:10:02 +00:00
fzyzcjy
eb2d9de07e
Fix Null check operator used on a null value on TextField with contextMenuBuilder ( #128114 )
...
Close #128113
Fun fact: This is caught by monkey testing I have written (will soon be open sourced as well) that runs on my app!
Without the fix, the test fails as expected:
<details>
```
(base) â flutter git:(feat/text-field-npe) /Volumes/MyExternal/ExternalRefCode/flutter/bin/flutter test test/material/text_field_test.dart --name 'changes from default'
00:06 +0: context menu contextMenuBuilder changes from default to null
âââ¡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
The following _TypeError was thrown building
_OverlayEntryWidget-[LabeledGlobalKey<_OverlayEntryWidgetState>#e3717](state:
_OverlayEntryWidgetState#7666a):
Null check operator used on a null value
When the exception was thrown, this was the stack:
#0 EditableTextState._createSelectionOverlay.<anonymous closure> (package:flutter/src/widgets/editable_text.dart:3331:43)
#1 SelectionOverlay.showToolbar.<anonymous closure> (package:flutter/src/widgets/text_selection.dart:1357:36)
#2 ContextMenuController.show.<anonymous closure> (package:flutter/src/widgets/context_menu_controller.dart:65:54)
#3 _OverlayEntryWidgetState.build (package:flutter/src/widgets/overlay.dart:351:36)
#4 StatefulElement.build (package:flutter/src/widgets/framework.dart:5198:27)
#5 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5086:15)
#6 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#7 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#8 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#9 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#10 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:6093:32)
#11 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6595:17)
#12 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#13 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#14 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#15 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#16 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#17 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#18 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#19 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#20 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#21 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#22 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#23 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#24 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#25 _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#26 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#27 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#28 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#29 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#30 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#31 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#32 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#33 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#34 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#35 _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#36 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#37 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#38 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#39 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#40 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#41 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#42 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#43 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#44 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#45 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#46 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#47 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#48 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#49 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#50 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#51 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#52 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#53 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#54 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#55 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#56 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#57 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#58 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#59 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#60 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#61 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#62 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#63 _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#64 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#65 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#66 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#67 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#68 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#69 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#70 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#71 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#72 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#73 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#74 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#75 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#76 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#77 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#78 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#79 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#80 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#81 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#82 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#83 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#84 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#85 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#86 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#87 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#88 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#89 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#90 StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
#91 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#92 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#93 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#94 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#95 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#96 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#97 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#98 StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
#99 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#100 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#101 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#102 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#103 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#104 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#105 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#106 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#107 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#108 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#109 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#110 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#111 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#112 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#113 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#114 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#115 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#116 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#117 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#118 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#119 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#120 StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
#121 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#122 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#123 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#124 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#125 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#126 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#127 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#128 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#129 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#130 StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
#131 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#132 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#133 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#134 StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
#135 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#136 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#137 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#138 StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
#139 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#140 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#141 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#142 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#143 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#144 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#145 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#146 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#147 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#148 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#149 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#150 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#151 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#152 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#153 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#154 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#155 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#156 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#157 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#158 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#159 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#160 _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#161 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#162 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#163 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#164 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#165 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#166 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#167 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#168 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#169 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#170 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#171 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#172 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#173 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#174 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#175 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#176 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#177 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#178 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#179 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#180 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#181 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#182 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#183 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#184 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#185 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#186 _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#187 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#188 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#189 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#190 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#191 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#192 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#193 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#194 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#195 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#196 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#197 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#198 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#199 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#200 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#201 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#202 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#203 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#204 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#205 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#206 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#207 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#208 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#209 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#210 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#211 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#212 _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#213 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#214 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#215 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#216 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#217 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#218 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#219 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#220 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#221 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#222 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#223 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#224 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#225 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#226 StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
#227 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#228 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#229 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#230 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#231 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#232 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#233 _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#234 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#235 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#236 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#237 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#238 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#239 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#240 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#241 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#242 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#243 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#244 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#245 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#246 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#247 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#248 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#249 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#250 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#251 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#252 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#253 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#254 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#255 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#256 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#257 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#258 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#259 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#260 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#261 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#262 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#263 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#264 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#265 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#266 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#267 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#268 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#269 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#270 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#271 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#272 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#273 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#274 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#275 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#276 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#277 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#278 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#279 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#280 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#281 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#282 _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#283 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#284 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#285 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#286 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#287 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#288 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#289 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#290 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#291 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#292 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#293 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#294 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#295 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#296 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#297 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#298 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#299 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#300 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#301 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#302 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#303 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#304 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#305 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#306 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#307 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
#308 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#309 StatefulElement.update (package:flutter/src/widgets/framework.dart:5274:5)
#310 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#311 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#312 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#313 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#314 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#315 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#316 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#317 StatelessElement.update (package:flutter/src/widgets/framework.dart:5162:5)
#318 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#319 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1253:16)
#320 RenderObjectToWidgetElement.update (package:flutter/src/widgets/binding.dart:1230:5)
#321 RenderObjectToWidgetElement.performRebuild (package:flutter/src/widgets/binding.dart:1244:7)
#322 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#323 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2780:19)
#324 AutomatedTestWidgetsFlutterBinding.drawFrame (package:flutter_test/src/binding.dart:1396:19)
#325 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:358:5)
#326 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1297:15)
#327 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1227:9)
#328 AutomatedTestWidgetsFlutterBinding.pump.<anonymous closure> (package:flutter_test/src/binding.dart:1246:9)
#331 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:68:41)
#332 AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:1232:27)
#333 WidgetTester._pumpWidget (package:flutter_test/src/widget_tester.dart:587:20)
#334 WidgetTester.pumpWidget.<anonymous closure> (package:flutter_test/src/widget_tester.dart:572:14)
#337 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:68:41)
#338 WidgetTester.pumpWidget (package:flutter_test/src/widget_tester.dart:571:27)
#339 main.<anonymous closure>.<anonymous closure> (file:///Volumes/MyExternal/ExternalRefCode/flutter/packages/flutter/test/material/text_field_test.dart:15687:20)
<asynchronous suspension>
<asynchronous suspension>
(elided 5 frames from dart:async and package:stack_trace)
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
00:06 +0 -1: context menu contextMenuBuilder changes from default to null [E]
Test failed. See exception logs above.
The test description was: contextMenuBuilder changes from default to null
To run this test again: /Volumes/MyExternal/ExternalRefCode/flutter/bin/cache/dart-sdk/bin/dart test /Volumes/MyExternal/ExternalRefCode/flutter/packages/flutter/test/material/text_field_test.dart -p vm --plain-name 'context menu contextMenuBuilder changes from default to null'
00:06 +0 -1: Some tests failed.
(base) â flutter git:(feat/text-field-npe)
```
</details>
2023-06-06 19:37:57 +00:00
Kate Lovett
a3ddead1a4
Remove scrollbar deprecations isAlwaysShown and hoverThickness ( #127351 )
...
The deprecated `[RawScrollbar/Scrollbar/CupertinoScrollbar/ScrollbarThemeData].isAlwaysShown` has expired and is removed in thi PR.
Also, `Scrollbar.hoverThickness` is also removed after having expired.
The replacement for `isAlwaysShown` is `thumbVisibility`. This deprecation was introduced in #96957 . The name change came from new behaviors like a track that is conditionally visible. Since the original API only referred to the thumb, the name was changed to reflect this intention. This change is supported by dart fix. â
The replacement for `hoverThickness` is `ScrollbarThemeData.thickness`, which is a MaterialStateProperty that allows for the thickness to respond to multiple states including hover. This deprecation was introduced in #97173 . This change is not supported by dart fix. ð
Part of https://github.com/flutter/flutter/issues/127042
2023-06-05 21:15:32 +00:00
Kate Lovett
9a263466ae
Fix update drag error that made NestedScrollView un-scrollable ( #127718 )
...
#### (plus some more docs)
Fixes https://github.com/flutter/flutter/issues/76760
Fixes https://github.com/flutter/flutter/issues/82391
Fixes https://github.com/flutter/flutter/issues/45619
Fixes #117316
Fixes #110956
Fixes #127282
Fixes #32563
Fixes #46089
Fixes #79077
Part of fixing #62833
This fixes (a bunch of) issues that have been reported differently over the years, but all have the same root cause. Sometimes the NestedScrollView would incorrectly calculate whether or not there is enough content to allow scrolling. This would only apply to drag scrolling (not mouse wheel scrolling for example). This did not relate to how the extent of the NestedScrollView is computed, but just the logic that enabled the actual drag gestures. This fixes that. :)
2023-06-05 21:14:22 +00:00
fzyzcjy
de368fca94
Tiny remove unnecessary method in text_selection.dart ( #127480 )
...
I come across this when migrating my codebase. There is indeed a linter rule for it: unnecessary_overrides (see screenshot below for an example). I can help enabling the rule (as well as other rules, and/or dart formatter, etc) for Flutter codebase if needed.

2023-06-02 20:19:12 +00:00
Kate Lovett
acf5a259e4
Add error message when sliver overlap absorber is missing ( #128075 )
...
Adds an error message where we previously would crash without any help.
Came across this while working on https://github.com/flutter/flutter/pull/127718
Fixes https://github.com/flutter/flutter/issues/128074
2023-06-01 22:29:08 +00:00
Vasiliy Ditsyak
114f05cef6
Add fallback font to IconData class ( #127269 )
...
This PR adds an ability to specify `fallbackFont` for `Icon` class via `IconData` props.
Read detailed description here https://github.com/flutter/flutter/issues/126670
2023-06-01 15:43:18 +00:00
chunhtai
2f521a2143
Increases the eyeballed value of auto scroll velocity scalar ( #127410 )
...
A previous pr fixed an bug in the autoscalar's speed calculation. The calculation would produce much lower speed after the fix. This pr raised the default scalar value for reorderable list.
fixes https://github.com/flutter/flutter/issues/121603
2023-05-30 17:28:19 +00:00
LongCatIsLooong
b5df180a6f
Move shared inline widget logic to RenderInlineWidgetContainerDefaults ( #127308 )
...
- Added `InlineWidgetContainerDefaults` for deduping inline widget code
- Added a helper function `WidgetSpan.extractFromInlineSpan` for extracting `WidgetSpan`s and automatically applying text scaling (at widget level)
- Removed `TextPainter.inlinePlaceholderScales`. I'm going to deprecate the `scale` argument in `TextPainter.addPlaceholder` next, as scaling is now done at the widget level.
- Added runtime check and comments to make sure nobody is extending `PlaceholderSpan` directly (unfortunately we can't remove `PlaceholderSpan` without moving RenderEditable and RenderParagraph to the widgets library).
2023-05-26 23:47:33 +00:00
Kate Lovett
0f1a95d19e
TwoDimensional scrolling foundation ( #125437 )
...
From the 2D scrolling proposal: [flutter.dev/go/2D-Foundation](https://flutter.dev/go/2D-Foundation ) â
updated 4/25
Fixes https://github.com/flutter/flutter/issues/125505
Follow up issues:
- https://github.com/flutter/flutter/issues/126297
- https://github.com/flutter/flutter/issues/126298
- https://github.com/flutter/flutter/issues/126299
- https://github.com/flutter/flutter/issues/122348
This adds a mostly abstract foundation for 2D scrolling in Flutter.
With these base classes, developers will be able to construct widgets that scroll in both dimensions and can lazily load their children for the best performance. This implementation is meant to be flexible in order to support different kinds of 2D compositions, from tables to scatter plots.
The upcoming TableView, TreeView, etc widgets (coming soon in flutter/packages) are built on top of this foundation.
2023-05-26 22:22:21 +00:00
fzyzcjy
c1558f6979
Fix TextField error in production environment because it wrongly uses ancestor render boxes ( #126324 )
...
Fixes a crash in a reparented TextField due to frame render phase timing
2023-05-26 10:49:37 -07:00
Jonathan Green
28605398ec
Interactive viewer doesn't appear to respect the trackpadScrollCausesScale parameter ( #127114 )
...
Fix a bug when using InteractiveViewer.trackpadScrollCausesScale
2023-05-26 10:45:56 -07:00
Taha Tesser
c05a05e6fc
Add ScrollNotificationObserver sample ( #127023 )
...
fixes https://github.com/flutter/flutter/issues/126702
### Preview
https://github.com/flutter/flutter/assets/48603081/4c529a0d-b8a5-4950-9095-429f1c5eccbb
2023-05-25 15:58:52 +00:00
Mouad Debbar
2d142c5ba2
[web] ui.platformViewRegistry => ui_web.platformViewRegistry ( #127493 )
...
Now that `platformViewRegistry` is [exposed](https://github.com/flutter/engine/pull/41877 ) through `dart:ui_web`, we can do some cleanup here.
Part of https://github.com/flutter/flutter/issues/126831
2023-05-24 23:31:28 +00:00
Bruno Leroux
2b105ac6dd
Fix ScrollPosition overscroll precision error ( #127321 )
...
## Description
This PR fixes a precision error in ~~`ClampingScrollPhysics`~~ `ScrollPosition` that leads to `StretchingOverscrollIndicator` stretching its content unexpectedly in some devices (see https://github.com/flutter/flutter/issues/126561 where this is visible in `TabBarView` and the test added in this PR where it reproduces with a `PageView`).
~~This PR also contains a change to `nested_scroll_view.dart` because the first change (the one in `ClampingScrollPhysics`) breaks the precision error test added by https://github.com/flutter/flutter/pull/87801.~~
## Related Issue
Fixes https://github.com/flutter/flutter/issues/126561
## Tests
Adds 1 test.
2023-05-24 22:34:06 +00:00
Justin McCandless
4341ed4229
Fix the breaking of multi-code-unit characters in obscure mode ( #123366 )
...
This PR changes the character boundary behavior of obscured fields to be based on code points instead of code units.
So it used to be possible to traverse and delete obscured text inside of code points (and breaking a code point like that would cause a crash):

But now moving the cursor and deleting is based on code points:

### Native behavior
Native iOS deletes part of the emoji, native Mac deletes the whole emoji. See https://github.com/flutter/flutter/issues/122381#issuecomment-1482042620 . So it's unclear what the desired behavior should actually be.
### Resources
Fixes https://github.com/flutter/flutter/issues/122381
I thought this might not fix the case where a broken emoji is directly pasted into the field, but it seems to work by trying this: �âð©âð¦âð¦
CC @LongCatIsLooong
2023-05-23 18:21:10 +00:00
Daniel Iglesia
a6d62ca8de
Support keeping a bottom sheet with a DraggableScrollableSheet from closing on drag/fling to min extent ( #127339 )
2023-05-22 16:14:35 -07:00
Kate Lovett
e8b7889dfd
Remove deprecated OverscrollIndicatorNotification.disallowGlow ( #127050 )
...
The deprecated OverscrollIndicatorNotification.disallowGlow has expired and is removed in the PR. The replacement is OverscrollIndicatorNotification.disallowIndicator. This deprecation was introduced in https://github.com/flutter/flutter/pull/87839 when the StretchingOverscrollIndicator was added. The name change made it clearer since there is now more than one overscroll indicator.
This change is supported by dart fix. â
Part of https://github.com/flutter/flutter/issues/127042
2023-05-19 19:40:51 +00:00
chunhtai
ea5cfe09fd
Properly cleans up routes ( #126453 )
...
fixes https://github.com/flutter/flutter/issues/126100
2023-05-19 00:32:26 +00:00
Michael Goderbauer
5ae6438157
Revert "Handle null return from WillPopCallback" ( #127112 )
...
Reverts flutter/flutter#127039
Google3 has been fixed, so this work around is no longe necessary.
2023-05-18 17:47:54 +00:00
Sam Rawlins
7a32504531
Ignore unused_element_parameter ( #126926 )
...
When the analyzer detects an unused parameter, it reports `unused_element` which can be ignored with an inline ignore like `// ignore: unused_element`. The analyzer will start reporting instead, `unused_element_parameter`. There are ignores in flutter/flutter that need to be updated to the new code. In order to incrementally migrate, they can be changed to `// ignore: unused_element, unused_element_parameter`.
After flutter/flutter is using a new enough analyzer, we can then change those to `// ignore: unused_element_parameter`.
Work towards https://github.com/flutter/flutter/issues/126924
2023-05-17 21:16:24 +00:00
Michael Goderbauer
acbfb40f05
Handle null return from WillPopCallback ( #127039 )
...
Partial revert of https://github.com/flutter/flutter/pull/126647 to work around issue in google3.
See b/283046390
2023-05-17 17:50:36 +00:00
JellyO1
561169ec67
Expose callback that allows focus traversal customization ( #120235 )
...
This PR exposes a requestFocusCallback on `FocusTraversalPolicy` and it's inheritors.
Fixes #83175 .
2023-05-17 16:43:50 +00:00
Ian Hickson
027bb84444
Make SlottedMultiChildRenderObjectWidgetMixin a concrete class ( #126108 )
...
This is a proof of concept for renaming SlottedMultiChildRenderObjectWidgetMixin to SlottedMultiChildRenderObjectWidget and making it a concrete class.
I also made SlottedContainerRenderObjectMixin generic instead of being specialized to RenderBox.
I don't think this is something we can easily automigrate, but we may not need to, I don't know how common this is...
2023-05-16 22:28:54 +00:00
Ian Hickson
5235a0f092
Add ScrollMetrics.extentTotal for completeness ( #126607 )
...
When implementing scrollbars, I found that it would be useful and idiomatic to be able to do `m.extentInside / m.extentTotal` to get the scrollbar thumb size.
2023-05-16 22:24:03 +00:00
Michael Goderbauer
5e1ba701ed
enable no_literal_bool_comparisons lint ( #126647 )
2023-05-16 16:14:23 +00:00
Kate Lovett
27caa7fed9
Add ScrollController.onAttach & onDetach, samples/docs on listening/getting scrolling info ( #124823 )
...
This PR does a couple of things!
https://user-images.githubusercontent.com/16964204/231897483-416287f9-50ce-468d-a714-2a4bc0f2e011.mov

Fixes #20819
Fixes #41910
Fixes #121419
### Adds ScrollController.onAttach and ScrollController.onDetach
This resolves a long held pain point for developers. When using a scroll controller, there is not scroll position until the scrollable widget is built, and almost all methods of notification are only triggered when scrolling happens. Adding these two methods will help developers gain access to the scroll position when it is created. A common workaround for this was using a post frame callback to access controller.position after the first frame, but this is ripe for issues such as having multiple positions attached to the controller, or the scrollable no longer existing after that post frame callback. I think this can also be helpful for folks to debug cases when the scroll controller has multiple positions attached.
In particular, this also resolves this commented case: https://github.com/flutter/flutter/issues/20819#issuecomment-417784218
The isScrollingNotifier is hard for developers to access.
### Docs & samples
I was surprised we did not have samples on scroll notification or scroll controller, so I overhauled it and added a lot of docs on all the different ways to access scrolling information, when it is available and how they differ.
2023-05-15 21:01:06 +00:00
Kate Lovett
76a9f68325
Add more to error message of RestorationScope.of ( #126444 )
...
Fixes https://github.com/flutter/flutter/issues/126443
2023-05-15 19:17:11 +00:00
Tomasz Gucio
99c7e9f088
Add spaces after flow control statements ( #126320 )
2023-05-15 11:07:30 +02:00
Justin McCandless
6ffcc9e55a
Hide the context menu on tap down ( #126295 )
...
Desktop text selection toolbar no longer flashes before closing.
2023-05-12 10:04:27 -07:00
Michael Goderbauer
dc3d6603f2
Make dpr available during Scrollable disposal ( #126535 )
...
Fixes https://github.com/flutter/flutter/issues/126454 .
In certain situations (see linked bug) the Scrollable needs access to the DPR of the View it is drawn into during disposal. Since inherited widget lookups are not allowed during disposal, we cannot look up the DPR dynamically in these situations. Instead, we have to cache the DPR when lookups are still allowed.
2023-05-11 15:31:23 +00:00
Michael Goderbauer
42d9a2b3fa
Sync lints ( #126316 )
...
Sync lints with https://github.com/dart-lang/linter/blob/master/example/all.yaml and enable `implicit_reopen` and `type_literal_in_constant_pattern` (which have no violations). Also contains some clean-up work towards enabling `matching_super_parameters`, which is not quite ready yet due to its handling of "private" arguments.
2023-05-11 13:27:51 +00:00
Bruno Leroux
a800edfff9
Update FocusNode documentation ( #126331 )
...
## Description
This PR adds some details in FocusNode documentation to explain more precisely when listeners are notified.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/126149
## Tests
Documentation only.
2023-05-09 15:50:51 +00:00
fzyzcjy
431dfc8326
Tiny cleanup for Navigator code (without introducing dependency) ( #125628 )
...
Close https://github.com/flutter/flutter/issues/125724
> The `navigator.dart` has ~10 repeats of things like:
>
> ```dart
> final _RouteEntry? currentRouteEntry = _navigator!._history.cast<_RouteEntry?>().lastWhere(
> (_RouteEntry? e) => e != null && _RouteEntry.isPresentPredicate(e),
> orElse: () => null,
> );
> ```
>
> while it can be greatly simplified as:
>
> ```dart
> final _RouteEntry? currentRouteEntry = _navigator!._history.lastWhereOrNull(_RouteEntry.isPresentPredicate);
> ```
>
> Thus, it seems that we can beautify the code a little bit.
Same as https://github.com/flutter/flutter/pull/125099 , but without external dependency
For more detailed explanation why it does not introduce external dependency: https://github.com/flutter/flutter/pull/125099#discussion_r1174230502
2023-05-08 19:03:06 +00:00