- 25 Jan, 2024 1 commit
-
-
Renzo Olivares authored
Fixes #129590 * Consider `AxisDirection` when calculating scroll offset used in determining TextSelection during a drag/long press drag. Previously it seems that we were assuming the direction was always vertical https://github.com/flutter/flutter/blob/30cc83198544582b858e48c7bb9d761ecdb3d944/packages/flutter/lib/src/widgets/text_selection.dart#L2842-L2844 . * SelectableText now considers RenderEditable offset changes and Scrollable offset changes when calculating the TextSelection during a long press drag.
-
- 23 Jan, 2024 1 commit
-
-
Ian Hickson authored
-
- 19 Jan, 2024 1 commit
-
-
Ian Hickson authored
Turns out all implementations of this method made this call, so it seems like it should belong in the superclass.
-
- 16 Jan, 2024 1 commit
-
-
Anis Alibegić authored
I continued [my mission](https://github.com/flutter/flutter/pull/141431) to find as many typos as I could. This time it's a smaller set than before. There is no need for issues since it's a typo fix.
-
- 03 Jan, 2024 1 commit
-
-
yim authored
This PR changes the regular cursor to a floating cursor when a long press occurs. This is a new feature. Fixes #89228
-
- 02 Jan, 2024 1 commit
-
-
Polina Cherkasova authored
Contributes to https://github.com/flutter/flutter/issues/140622
-
- 07 Dec, 2023 1 commit
-
-
Kostia Sokolovskyi authored
-
- 09 Nov, 2023 1 commit
-
-
Renzo Olivares authored
This changes fixes text selection gestures on the search field when using `SearchAnchor`. Before this change text selection gestures did not work due to an `IgnorePointer` in the widget tree. This change: * Removes the `IgnorePointer` so the underlying `TextField` can receive pointer events. * Introduces `TextField.onTapAlwaysCalled` and `TextSelectionGestureDetector.onUserTapAlwaysCalled`, so a user provided on tap callback can be called on consecutive taps. This is so that the user provided on tap callback for `SearchAnchor/SearchBar` that was previously only handled by `InkWell` will still work if a tap occurs in the `TextField`s hit box. The `TextField`s default behavior is maintained outside of the context of `SearchAnchor/SearchBar`. Fixes https://github.com/flutter/flutter/issues/128332 and #134965
-
- 22 Oct, 2023 1 commit
-
-
Todd Volkert authored
Before this change, long-running post-frame callbacks wouldn't show up in the timeline at all. This adds a timeline event for post-frame callbacks, with a debug flag that will add timeline events for each individual callback. #testexempt -- we have no way to test calls to the timeline.
-
- 06 Oct, 2023 1 commit
-
-
fzyzcjy authored
-
- 20 Sep, 2023 1 commit
-
-
Greg Spencer authored
## Description This removes all of the comments that are of the form "so-and-so (must not be null|can ?not be null|must be non-null)" from the cases where those values are defines as non-nullable values. This PR removes them from the widgets library. This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some. In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow. This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases. I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these). ## Related PRs - https://github.com/flutter/flutter/pull/134984 - https://github.com/flutter/flutter/pull/134991 - https://github.com/flutter/flutter/pull/134993 - https://github.com/flutter/flutter/pull/134994 ## Tests - Documentation only change.
-
- 12 Sep, 2023 1 commit
-
-
Kate Lovett authored
Part of https://github.com/flutter/flutter/issues/133171 This was deprecated in https://github.com/flutter/flutter/pull/100381 Th replacement is to use `SelectionOverlay.fadeDuration` instead. This migration is supported by dart fix. â
-
- 17 Aug, 2023 1 commit
-
-
Ian Hickson authored
-
- 16 Aug, 2023 2 commits
-
-
Renzo Olivares authored
This PR makes sure we do not select beyond the text boundary at the tapped position unless, we tap at the end of the text which in that case we should select the previous text boundary. ```dart // if x is a boundary defined by `textBoundary`, most textBoundaries (except // LineBreaker) guarantees `x == textBoundary.getLeadingTextBoundaryAt(x)`. // Use x - 1 here to make sure we don't get stuck at the fixed point x. final int start = textBoundary.getLeadingTextBoundaryAt(extent.offset - 1) ?? 0; ``` This was originally carried over from https://github.com/flutter/flutter/blob/f468f3366c26a5092eb964a230ce7892fda8f2f8/packages/flutter/lib/src/widgets/editable_text.dart#L4167-L4179 which used this `x - 1` to be able to move to the previous word boundary when navigating with a keyboard. When selecting by tapping/clicking we do not want to move past the text boundary at the tapped position so this adjustment is not needed. Fixes #132126
-
Polina Cherkasova authored
Contributes to https://github.com/flutter/flutter/issues/130467 Filed issue: https://github.com/flutter/flutter/issues/132620
-
- 15 Aug, 2023 1 commit
-
-
Ian Hickson authored
Further follow-up for https://github.com/flutter/flutter/issues/122421.
-
- 19 Jul, 2023 1 commit
-
-
Tomasz Gucio authored
-
- 06 Jul, 2023 2 commits
- 21 Jun, 2023 1 commit
-
-
Renzo Olivares authored
This change updates `SelectableRegion`s right-click gesture to match native platform behavior. Before: Right-click gesture selects word at position and opens context menu (All Platforms) After: - Linux, toggles context menu on/off, and collapses selection when click was not on an active selection (uncollapsed). - Windows, Android, Fuchsia, shows context menu at right-clicked position (unless the click is at an active selection). - macOS, toggles the context menu if right click was at the same position as the previous / or selects word at position and opens context menu. - iOS, selects word at position and opens context menu. This change also prevents the `copy` menu button from being shown when there is a collapsed selection (nothing to copy). Fixes #117561
-
- 20 Jun, 2023 1 commit
-
-
Justin McCandless authored
Fixes a bug when tapping near certain TextFields.
-
- 08 Jun, 2023 1 commit
-
-
Greg Spencer authored
## 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. ![Application Lifecycle Diagram](https://github.com/flutter/flutter/assets/8867023/f6937002-cb93-4ab9-a221-25de2c45cf0e) ## Related Issues - https://github.com/flutter/flutter/issues/30735 ## Tests - Added tests for new lifecycle value, as well as for the `AppLifecycleListener` itself.
-
- 02 Jun, 2023 1 commit
-
-
fzyzcjy authored
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. ![image](https://github.com/flutter/flutter/assets/5236035/3fe8fa32-cde2-45a9-901a-a383e8457fa1)
-
- 15 May, 2023 1 commit
-
-
Tomasz Gucio authored
-
- 12 May, 2023 1 commit
-
-
Justin McCandless authored
Desktop text selection toolbar no longer flashes before closing.
-
- 24 Apr, 2023 2 commits
-
-
Renzo Olivares authored
Before this change on a quick touch drag the cursor, where the touch is not on the previous collapsed selection, the cursor would move to the tapped position. After this change on a quick touch drag the cursor does not move unless the touch is on the previously collapsed selection. This is inline with native behavior. Before|After|Native --|--|-- <video src="https://user-images.githubusercontent.com/948037/233224775-f33b42b5-5638-416c-9278-39ecd964e3bb.mov" />|<video src="https://user-images.githubusercontent.com/948037/233224760-2d1af657-8d99-45fc-8499-9567f17d533e.mov" />|<video src="https://user-images.githubusercontent.com/948037/233224790-f5997cfa-7370-4891-8952-11ef8057a729.mov" />
-
Justin McCandless authored
The spell check menu now appears directly below the misspelled word on Android.
-
- 21 Apr, 2023 2 commits
-
-
chunhtai authored
fixes https://github.com/flutter/flutter/issues/99360
-
Justin McCandless authored
iOS now hides the selection handles and shows red selection when tapping a misspelled word, like native.
-
- 20 Apr, 2023 2 commits
-
-
Renzo Olivares authored
#125151 introduced the magnifier on touch drag gestures, but when showing the magnifier the toolbar is implicitly hidden, this change makes the toolbar re-appear on drag end for double tap + drag.
-
Renzo Olivares authored
This change shows the magnifier on touch drag gestures for Android and iOS and hides it when the drag ends. Fixes #118268
-
- 13 Apr, 2023 1 commit
-
-
Justin McCandless authored
Explain how to do the two-step migration to the context menus feature.
-
- 08 Apr, 2023 1 commit
-
-
Greg Spencer authored
Prepare for adding values to AppLifecycleState
-
- 06 Apr, 2023 2 commits
-
-
Justin McCandless authored
Make sure the removal of deprecated APIs TextSelectionControls.buildToolbar and TextSelectionHandleControls happen in two separate steps. Will make a tricky migration situation a little easier for affected users.
-
Loune Lam authored
Remove mouse tap text drag selection throttling to improve responsiveness
-
- 05 Apr, 2023 1 commit
-
-
Renzo Olivares authored
TapAndDragGestureRecognizer should declare victory immediately when drag is detected
-
- 31 Mar, 2023 1 commit
-
-
Camille Simon authored
[iOS] Add spell check suggestions toolbar on tap
-
- 29 Mar, 2023 1 commit
-
-
Renzo Olivares authored
Match iOS Longpress behavior with native
-
- 27 Mar, 2023 1 commit
-
-
Renzo Olivares authored
Add TextField triple tap/click gestures
-
- 22 Mar, 2023 1 commit
-
-
Michael Goderbauer authored
Remove 1745 decorative breaks
-