- 08 Aug, 2023 1 commit
-
-
LouiseHsu authored
This PR adds framework support for the Search Web feature in iOS. https://github.com/flutter/flutter/assets/36148254/c159f0d9-8f14-45e7-b295-e065b0826fab The corresponding merged engine PR can be found [here](https://github.com/flutter/engine/pull/43324). This PR addresses https://github.com/flutter/flutter/issues/82907 More details are available in this [design doc](https://docs.google.com/document/d/1QizXwBiO-2REIcEovl5pK06BaLPOWYmNwOE5jactJZA/edit?resourcekey=0-1pb9mJiAq29Gesmt25GAug)
-
- 02 Aug, 2023 1 commit
-
-
LouiseHsu authored
This PR adds framework support for the Look Up feature in iOS. https://github.com/flutter/flutter/assets/36148254/d301df79-4e23-454f-8742-2f8e39c2960c The corresponding merged engine PR can be found [here](https://github.com/flutter/engine/pull/43308). This PR addresses https://github.com/flutter/flutter/issues/82907 More details are available in this [design doc.](flutter.dev/go/add-missing-features-to-selection-controls) This is the same PR as https://github.com/flutter/flutter/pull/130532, this is an attempt to fix the Google Testing issue
-
- 17 Jul, 2023 1 commit
-
-
LongCatIsLooong authored
Deprecate `textScaleFactor` in favor of `textScaler`, in preparation for Android 14 [Non-linear font scaling to 200%](https://developer.android.com/about/versions/14/features#non-linear-font-scaling). The `TextScaler` class can be moved to `dart:ui` in the future, if we decide to use the Android platform API or AndroidX to get the scaling curve instead of hard coding the curve in the framework. I haven't put the Flutter version in the deprecation message so the analyzer checks are failing. Will do so after I finish the migration guide. **Why `TextScaler.textScaleFactor`** The author of a `TextScaler` subclass should provide a fallback `textScaleFactor`. By making `TextScaler` also contain the `textScaleFactor` information it also makes it easier to migrate: if a widget overrides `MediaQueryData.textScaler` in the tree, for unmigrated widgets in the subtree it would also have to override `MediaQueryData.textScaleFactor`, and that makes it difficult to remove `MediaQueryData.textScaleFactor` in the future. ## A full list of affected APIs in this PR Deprecated: The method/getter/setter/argument is annotated with a `@Deprecated()` annotation in this PR, and the caller should replace it with `textScaler` instead. Unless otherwise specified there will be a Flutter fix available to help with migration but it's still recommended to migrate case-by-case. **Replaced**: The method this `textScaleFactor` argument belongs to is rarely called directly by user code and is not overridden by any of the registered custom tests, so the argument is directly replaced by `TextScaler`. **To Be Deprecated**: The method/getter/setter/argument can't be deprecated in this PR because a registered customer test depends on it and a Flutter fix isn't available (or the test was run without applying flutter fixes first). This method/getter/setter/argument will be deprecated in a followup PR once the registered test is migrated. ### `Painting` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `InlineSpan.build({ double textScaleFactor = 1.0 })` argument | **Replaced** | | | `TextStyle.getParagraphStyle({ double TextScaleFactor = 1.0 })` argument | **Replaced** | | | `TextStyle.getTextStyle({ double TextScaleFactor = 1.0 })` argument| Deprecated | Can't replace: https://github.com/superlistapp/super_editor/blob/c47fd38dca4b7f43611690913b551a1773c563d7/super_editor/lib/src/infrastructure/super_textfield/desktop/desktop_textfield.dart#L1903-L1905| | `TextPainter({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `TextPainter.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | | `TextPainter.computeWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | | | `TextPainter.computeMaxIntrinsicWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | | ### `Rendering` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `RenderEditable({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `RenderEditable.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | | `RenderParagraph({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `RenderParagraph.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | ### `Widgets` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `MediaQueryData({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/test/text_scale_factor_test.dart#LL39C21-L39C35 | | `MediaQueryData.textScaleFactor` getter | Deprecated | | | `MediaQueryData.copyWith({ double? TextScaleFactor })` argument | Deprecated | | | `MediaQuery.maybeTextScaleFactorOf(BuildContext context)` static method | Deprecated | No Flutter Fix, not expressible yet | | `MediaQuery.textScaleFactorOf(BuildContext context)` static method | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/_functions_io.dart#L68-L70, No Flutter Fix, not expressible yet | | `RichText({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/builder.dart#L829-L843 | | `RichText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away| | `Text({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/914d120da12fba458c020210727831c31bd71041/packages/rfw/lib/src/flutter/core_widgets.dart#L647 , No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `Text.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `Text.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away | | `EditableText({ double? TextScaleFactor = 1.0 })` constructor argument | Deprecated | No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `EditableText.textScaleFactor` getter | Deprecated | | ### `Material` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `SelectableText({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/builder.dart#L829-L843, No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `SelectableText.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `SelectableText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away | A lot of material widgets (`Slider`, `RangeSlider`, `TimePicker`, and different types of buttons) also change their layout based on `textScaleFactor`. These need to be handled in a case-by-case fashion and will be migrated in follow-up PRs.
-
- 28 Jun, 2023 1 commit
-
-
Hans Muller authored
Updated tests in dev, examples/api, and tests/widgets to ensure that they continue to pass when the default for `ThemeData.useMaterial3` is changed to true. This is the final set of changes required for https://github.com/flutter/flutter/issues/127064.
-
- 15 Jun, 2023 1 commit
-
-
Qun Cheng authored
-
- 29 Mar, 2023 1 commit
-
-
Taha Tesser authored
Fix off-screen selected text throws exception
-
- 09 Mar, 2023 1 commit
-
-
LongCatIsLooong authored
Reland "Update test font (#121306)"
-
- 06 Mar, 2023 2 commits
-
-
LongCatIsLooong authored
This reverts commit 9f69a367.
-
LongCatIsLooong authored
Update test font
-
- 28 Feb, 2023 1 commit
-
-
Michael Goderbauer authored
Fix how tests count open SemanticsHandles
-
- 13 Feb, 2023 1 commit
-
-
Ian Hickson authored
-
- 02 Feb, 2023 1 commit
-
-
Michael Goderbauer authored
* Make Flex,Row,Column const for real * dart fix --apply * fix snippets * fix integration test * add comment
-
- 25 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
* Add MediaQuery to View * unify API * fix test * add test * comment * better doc * Apply suggestions from code review Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com> Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>
-
- 09 Jan, 2023 1 commit
-
-
Lucas.Xu authored
-
- 04 Jan, 2023 1 commit
-
-
Renzo Olivares authored
* Revert "Revert "Add support for double tap and drag for text selection (#109573)" (#117497)" This reverts commit 39fa0117. * Allow TapAndDragGestureRecognizer to accept pointer events from any devices -- the TapGestureRecognizer it replaces was previously doing this Co-authored-by: Renzo Olivares <roliv@google.com>
-
- 21 Dec, 2022 3 commits
-
-
Renzo Olivares authored
This reverts commit cd0f15a7. Co-authored-by: Renzo Olivares <roliv@google.com>
-
Renzo Olivares authored
* Replace PanGestureRecognizer in TextSelection with TapAndDragGestureRecognizer * add tracking of _DragState to new tap_and_drag recognizer and remove some legacy double tap code from text_selection.dart and add logs" * add dragTapCount, a tap count that is persistent for an entire drag and is set to null on drag end vs the regular tap count which is reset on a timer * basic double tap to drag functionality and add a local dragTapCount in text_selection.dart to use with the timer callback * Add offsetFromOrigin and localOffsetFromOrigin to DragUpdateDetails similar to LongPressMoveUpdateDetails, eliminates the need to hold the state of lastDragStartDetails * make a generic baselongpressgesturerecognizer * Revert "make a generic baselongpressgesturerecognizer" This reverts commit aad8f7433bd01e4cd016d527af832c3b1f15fac5. * rename tap_and_drag to selection_recognizers * add mixin for consecutivetap * tap and long press gesture recognizer * Revert "Revert "make a generic baselongpressgesturerecognizer"" This reverts commit 181350c36718f644eada3e45c1b7b5939f90a340. * Revert "Revert "Revert "make a generic baselongpressgesturerecognizer""" This reverts commit 4d69775967858dfd66dd9429e1713da598908a85. * Add support for secondary button clicks on drag gesture recognizer and separate drag end and tap up callback * get test running * rename tapCount to consecutiveTapCount * dispose timer properly * add some comments to tests * Add comments * Make ConsecutiveTapMixin private and move logic to increment tap count into mixin * stop tracking pointer when gesture is rejected and detect drags on touch devices * onCancel for TapAndDrag * have the TapAndDragGestureRecognizer handle tap downs and tap ups on touch and mouse devices * add drag to move cursor for android and iOS, and pointer device kind to DragUpdateDetails * get tests running * refactor TapAndDragGestureRecognizer moving some logic into _check methods * Handle cancel properly on TapAndDragGestureRecognizer, having both onTapCancel and onDragCancel, also fix tests * Fix test mouse drag selects and cannot drag cursor, save _initialPosition based on dragStartBehavior (either on tapDown or dragStart) * determine if drag has a sufficient global distance to accept and fix some cancel behavior, making _checkCancel clearer * give up pointer on drag end * properly stop tracking pointer, fixes test for right click on Apple and non-apple platforms * clean up some comments from last commit * remove drag on touch for now * fix Can select text by dragging with a mouse due to dragStart only being fired on the first PointerMoveEvent, the previous pan gesture recognizer would fire both dragStart and dragUpdate * Revert "fix Can select text by dragging with a mouse due to dragStart only being fired on the first PointerMoveEvent, the previous pan gesture recognizer would fire both dragStart and dragUpdate" This reverts commit 124dc79bc3389672c76d7c014ce04edab297abc6. * correctly use _initialPosition for checkStart and call _checkUpdate after _checkStart if localDelta is not zero * updates * fix double tap chains * Add docs * Address analyzer * more analyzer, only issues left are with print statements * add deadlineTimer to fix conflict with ForcePressGestureRecognizer * Revert "add deadlineTimer to fix conflict with ForcePressGestureRecognizer" This reverts commit 3b29ddfff4cde4845edd481ecefb789fea2a0781. * remove unecessary changes to tests * secondaryButton should not drag * Revert "Revert "add deadlineTimer to fix conflict with ForcePressGestureRecognizer"" This reverts commit 0a008f029f5796acd48c17c1897c0b700d5ef3a7. * updates * Revert "updates" This reverts commit 4803b8443a2b67f0b8d29e9a01f712dfcb0f588c. * Revert "Revert "Revert "add deadlineTimer to fix conflict with ForcePressGestureRecognizer""" This reverts commit 79251a7af88d5dbb1460a960afc77e65dea18bff. * fix shift + tap + drag tests, this was happening because a double tap + drag was being registered and not a single tap, added a duration to pumpAndSettle to fix this * remove TapAndLongPressGestureRecognizer * fix cupertino text field tests related to shift + tap + drag * deadline timer try 2 * more logs * Should reset taps when tap cancel is called, and should wait until gesture is accepted to initiate a drag * should clear _down and _up when gesture is rejected * remove erroneous log * fix selectable text double tap chains test * dont restart timer until tap up * reset consecutiveTapCount on drag end * fix selectableText test * fix material text field tests * reject TapAndDragGestureRecognizer when it is neither a tap nor a drag * remove prints * clean up * shift aware * clean up * fix cupertino test * fix text field focus tests * Add 100ms delay to cupertino test, to prevent a double tap * clean up test comments * add comment to test * uncomment test * remove longpress changes * Fix drag on mobile * remove debug * Fix drag to move cursor on iOS * left over from drag fix * add tests for drag on touch devices * add test for double tap + drag mouse devices * add tests * Fix bug where initialPosition was used before it was set * Address some review comments and fix issue where if double tap was held too long then long press gesture recognizer would take over * remove _isDoubleTap flag since it is no longer needed due to previous commit * Add docs for onTapCancel and onDragCancel * analyzer fixes * Do not test selection handles on macOS, since macOS does not support touch * Add assert for dragStartBehavior * add double tap + drag tests to cupertino * use kDoubleTapTimeout instead of const Duration(milliseconds: 300) for readability * analyzer issues * update docs * update more docs * address comments * more doc updates * fix docs * unused import * fix docs * Add more tests * Add more tests and reject a tap up if we have exceeded the tap tolerance * updates * Address comments * fix test naming * update documentation * move selection_recognizers to selection_gestures * fix analyzer * fix analyzer * keysPressedOnDown instead of isShiftPressed * update docs * update docs * Add drag update throttle to TapAndDragGestureRecognizer * update comments * missed from merge * Replace _ConsecutiveTapMixin with _TapStatusTrackerMixin * updates * correctly cancel tap when when past tap tolerance with new implementation * Should call tap and drag cancel if we are giving up a pointer without succesfully tracking a PointerUpEvent * comments * move pastTapTolerance to tap tracker * move pastTapTolerance to tap tracker * clean up check for nulls and remove use of consecutiveTapCountWhileDragging * move call to super.acceptGesture to top * remove print * clean up * Fix tests where both PanGestureRecognizer and TapAndDragGestureRecognizer lost * clean up * _GestureState -> _DragState * more docs clean up * more clean up * Add onSecondaryTapCancel * Add docs * more docs * Fix broken isPointerAllowed when attempting a right click drag - the _initialButtons is never reset * revert debug flag * make primaryPointer private * Add support for upper count limit in TapAndDragGestureRecognizer, the tap counter should not be allowed to grow infinitely unless that is desired * fix analyzer * Use new TapDrag details objects and callbacks * clean up docs * clean up and add test for upperLimit * Add docs for TapAndDragGestureRecognizer and remove some ambiguity of onStart onUpdate and onEnd parameters * Address review comments * analyzer fixes * Call cancel before rejecting the gesture so we can still access _initialButtons * Recognizer should reject any pointer differing from the original * Revert "Recognizer should reject any pointer differing from the original" This reverts commit afd9807480bd11e119bdd2b7d520631511973bab. * Address reviewer comments * Correct cancel behavior * Fix consecutive tap + drag because _dragStart state was not being set when consecutive tap is greater than one * Add more tests * Add documentation on behavior with TapGestureRecognizer and DragGestureRecognizer * more docs * more docs * remove comments * updates * fix multiple pointer behavior * only handle the primary pointer * Clean up dangerous assumptions in gesture details objects * forgot from rebase * update docs * updates * Clean up some redundant code * remove whitespace * fix tests as a result of #115849 * update test docs * Fix same test from last commit for material variants * More clean up of redundant code and update docs * Clean up didStopTrackingLastPointer and untie TapAndDragGestureRecognizer cancel behavior from TapStatusTrackerMixin.currentUp state * untie pastTapTolerance * updates * Add slopTolerance * update docs * Have secondary tap handled by TapGestureRecognizer * update docs * fix analyzer and address comments * Add more docs * Update cancel behavior tol not call on tap cancel when a drag has been accepted * Change cancel behavior to only cancel if the tap down callback has been sent and merge tapcancel and dragcancel * update docs; * Rename selection_gestures to tap_and_drag_gestures * Address some reviewer comments * make deadline and slopTolerance private * updates * updates * Address review comments * remove _initialButtons * fix docs * trackTrap -> trackTap * fix analyzer * Add test to verify that tap up is called when recognizer accepts before handleEvent is called * implement Diagnosticable for Details objects; * sentTapDown == wonArenaForPrimaryPointer, so the implementation now only uses sentTapDown * Count user tap up immediately and do not wait to win the arena * Do not need to call super from TapAndDragGestureRecognizer.acceptGesture anymore because mixin implementation is gone * Do not start selection drag on Android, iOS, and Fuchshsia touch devices if renderEditable does not have focus, this fixes many scubas * Address reviewer comments * fix test * TapAndDragGestureRecognizer should wait for other recognizer to lose before winning the arena * Address review comments * Dont check for drag if the start was already found * Only check for a drag if it has not already been found" * fix from rebase Co-authored-by: Renzo Olivares <roliv@google.com>
-
Michael Goderbauer authored
-
- 28 Nov, 2022 1 commit
-
-
chunhtai authored
* Fix iOS selectWordEdge doesn't account for affinity * fix test * update
-
- 01 Nov, 2022 1 commit
-
-
Justin McCandless authored
Improves the feel of dragging text selection vertically between lines on mobile.
-
- 28 Oct, 2022 1 commit
-
-
Justin McCandless authored
* Can show context menus anywhere in the app, not just on text. * Unifies all desktop/mobile context menus to go through one class (ContextMenuController). * All context menus are now just plain widgets that can be fully customized. * Existing default context menus can be customized and reused.
-
- 24 Oct, 2022 1 commit
-
-
Renzo Olivares authored
-
- 23 Sep, 2022 1 commit
-
-
Anthony Oleinik authored
-
- 02 Aug, 2022 2 commits
-
-
Anthony Oleinik authored
* added Magnifier for iOS and Android
-
xubaolin authored
-
- 27 Jul, 2022 1 commit
-
-
xubaolin authored
-
- 06 Jul, 2022 1 commit
-
-
Taha Tesser authored
Properly merges the TextSpan.style of SelectableText.rich.
-
- 24 Jun, 2022 1 commit
-
-
Alexandre Ardhuin authored
-
- 02 Jun, 2022 2 commits
-
-
Zachary Anderson authored
This reverts commit 4ec4c249.
-
Markus Aksli authored
-
- 26 May, 2022 1 commit
-
-
Pierre-Louis authored
* Use `curly_braces_in_flow_control_structures` for `widgets` * fix comments * fix comments
-
- 25 May, 2022 1 commit
-
-
Michael Goderbauer authored
-
- 20 May, 2022 1 commit
-
-
Tong Mu authored
-
- 19 May, 2022 1 commit
-
-
Justin McCandless authored
-
- 27 Apr, 2022 1 commit
-
-
Alexandre Ardhuin authored
-
- 15 Apr, 2022 2 commits
-
-
chunhtai authored
-
Justin McCandless authored
-
- 14 Apr, 2022 1 commit
-
- 13 Apr, 2022 1 commit
-
-
chunhtai authored
-
- 24 Mar, 2022 1 commit
-
-
chunhtai authored
-