- 24 Oct, 2023 1 commit
-
-
lirantzairi authored
The color of the TextField's cursor in error state is the same as the error text color by default. However we should be allowed to customize it Fixes #135580
-
- 28 Sep, 2023 1 commit
-
-
Taha Tesser authored
fixes [TextField uses bodyLarge instead of titleMedium as the documentation says ](https://github.com/flutter/flutter/issues/135411)
-
- 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 material 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/134992 - https://github.com/flutter/flutter/pull/134993 - https://github.com/flutter/flutter/pull/134994 ## Tests - Documentation only change.
-
- 08 Sep, 2023 1 commit
-
-
Renzo Olivares authored
When passed an `error` widget, `InputDecoration` should activate its error state. Before this change the `errorBorder` would only activate if an `errorText` was provided. This change solves this issue by accounting for a provided `error` widget.
-
- 10 Aug, 2023 1 commit
-
-
Renzo Olivares authored
This change makes sure the style provided through the `TextField`s `style` parameter is resolved for material states before merging it with defaults. Fixes #132212
-
- 08 Aug, 2023 1 commit
-
-
Jesús S Guerrero authored
Reverts flutter/flutter#130164 reverting because it cause internal google testing failures b/294917394
-
- 02 Aug, 2023 1 commit
-
-
Justin McCandless authored
Simplifying the TextField API.
-
- 18 Jul, 2023 1 commit
-
-
fzyzcjy authored
Just fix a space... I do hope we can have the auto formatter enabled in the future!
-
- 13 Jul, 2023 1 commit
-
-
chunhtai authored
related https://github.com/flutter/flutter/issues/128709 engine PR: https://github.com/flutter/engine/pull/43279 The web engine requires a way to unfocus textfield, It comes to nature to me that we should leverage didGain/didLose a11y focus action. I also unifies the action handler of all desktop platforms ## 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]. - [ ] 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
-
- 12 Jul, 2023 1 commit
-
-
Greg Spencer authored
## Description This adds links to examples that were not linked anywhere. ## Related Issues - Fixes #129956 ## Tests - Documentation only change
-
- 09 Jun, 2023 1 commit
-
-
Pierre-Louis authored
## Description This improves defaults generation with logging, stats, and token validation. This PR includes these changes: * introduce `TokenLogger`, with a verbose mode * prints versions and tokens usage to the console * outputs `generated/used_tokens.csv`, a list of all used tokens, for use by Google * find token files in `data` automatically * hide tokens `Map` * tokens can be obtained using existing resolvers (e.g. `color`, `shape`), or directly through `getToken`. * tokens can be checked for existence with `tokenAvailable` * remove version from template, since the tokens are aggregated and multiple versions are possible (as is the case currently), it does not make sense to attribute a single version * improve documentation ## Related Issues - Fixes https://github.com/flutter/flutter/issues/122602 ## Tests - Added tests for `TokenLogger` - Regenerated tokens, no-op except version removal ## Future work A future PR should replace or remove the following invalid tokens usages <img width="578" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b6f9e5a7-523f-4f72-94f9-1b0bf4cc9f00">
-
- 16 May, 2023 1 commit
-
-
Michael Goderbauer authored
-
- 15 May, 2023 1 commit
-
-
Tomasz Gucio authored
-
- 25 Apr, 2023 1 commit
-
-
Justin McCandless authored
When using a Material TextField on iOS, the spell check selection style now defaults to the red iOS-style, not Android's blue.
-
- 20 Apr, 2023 1 commit
-
-
Justin McCandless authored
Even in TextField using the Material library, iOS devices will still show the iOS-style spell check toolbar by default when using spell check.
-
- 18 Apr, 2023 1 commit
-
-
Justin McCandless authored
Tidying up the spell check API.
-
- 31 Mar, 2023 1 commit
-
-
Camille Simon authored
[iOS] Add spell check suggestions toolbar on tap
-
- 29 Mar, 2023 1 commit
-
-
Vinny authored
Modified TextField docs - Replaced 'labelText' to 'hintText' in code snippet
-
- 23 Mar, 2023 1 commit
-
-
Benjamin Quinn authored
Expose toggle to textfield's opacity animation.
-
- 22 Mar, 2023 1 commit
-
-
Michael Goderbauer authored
Remove 1745 decorative breaks
-
- 17 Mar, 2023 1 commit
-
-
Renzo Olivares authored
Co-authored-by: Renzo Olivares <roliv@google.com>
-
- 13 Mar, 2023 1 commit
-
-
Pierre-Louis authored
Update Material tokens to 0.162
-
- 09 Mar, 2023 1 commit
-
-
Hasnen Tai authored
According to Material specs, cursor should be red in error state.
-
- 08 Mar, 2023 1 commit
-
-
Jami Couch authored
Add support for iOS UndoManager
-
- 01 Mar, 2023 1 commit
-
-
takashi kasai authored
moving the left handle automatically scrolls EditableText to the right handle, which doesn't happen on native (#105836) Fixes a scrolling issue when dragging selection handles.
-
- 07 Feb, 2023 1 commit
-
-
Qun Cheng authored
* Update to v0.158 of the token database. * Update checkbox template * Fix DatePickerTheme test --------- Co-authored-by: Qun Cheng <quncheng@google.com>
-
- 31 Jan, 2023 1 commit
-
-
Tanay Neotia authored
* Add support for image insertion on Android * Fix checks * Use proper Dart syntax on snippet * Specify type annotation on list * Fix nits, add some asserts, and improve example code * Add missing import * Fix nullsafety error * Fix nullsafety error * Remove reference to contentCommitMimeTypes in docs * Fix nits * Fix warnings and import * Add test for content commit in editable_text_test.dart * Check that URIs are equal in test * Fix nits and rename functions / classes to be more self-explanatory * Fix failing debugFillProperties tests * Add empty implementation to `insertContent` in TextInputClient * Tweak documentation slightly * Improve docs for contentInsertionMimeTypes and fix assert * Rework contentInsertionMimeType asserts * Add test for onContentInserted example * Switch implementation to a configuration class for more granularity in setting mime types * Fix nits * Improve docs and fix doc tests * Fix more nits (LongCatIsLooong) * Fix failing tests * Make parameters (guaranteed by platform to be non-nullable) non-nullable * Fix analysis issues
-
- 27 Jan, 2023 1 commit
-
-
Qun Cheng authored
* Add canRequestFocus to TextField and requestFocusOnTap to DropdownMenu * Address comments * Address comments --------- Co-authored-by: Qun Cheng <quncheng@google.com>
-
- 24 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
* dart fix --apply * manual fixes
-
- 17 Jan, 2023 1 commit
-
-
Darren Austin 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>
-
- 03 Jan, 2023 1 commit
-
-
Darren Austin authored
* Updated to tokens v0.150. * Updated with a reverted list_tile.dart.
-
- 21 Dec, 2022 2 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>
-
- 20 Dec, 2022 1 commit
-
-
Camille Simon authored
* Add spell check suggestions toolbar * Fix test and move menu * Cleanup * Cleanup and fix bug * More cleanup * Make height dynamic and use localized delete * Begin adding tests * Create var checking for results * Add tests * Fix analyze (sorta) * Add back hideToolbar call for testing * Add back hidetoolbar in ts and delete one in et * Remove unecessary calls to hidToolbar * Fix analyze and docs * Test fix * Fix container issue * Clean up * Fix analyze * Move delegate * Fix typos * Start addressing review * Continue addressing review * Add assert * Some refactoring * Add test for button behavior * Undo test change * Make spell check results public * Rearrange test * Add comment * Address review * Finish addressing review * remove unused imports * Address nits * Address review * Fix formatting * Refactor findsuggestionspanatcursorindex and textselectiontoolbar constraints * Fix analyze:
-
- 09 Dec, 2022 1 commit
-
-
Callum Moffat authored
-
- 07 Dec, 2022 1 commit
-
-
Greg Spencer authored
* Make some minor changes in preparation for updating the Time Picker to M3 * Revert OutlineInputBorder.borderRadius type change * Revert more OutlineInputBorder.borderRadius changes.
-
- 28 Nov, 2022 1 commit
-
-
Darren Austin authored
-
- 15 Nov, 2022 1 commit
-
-
Darren Austin authored
-
- 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.
-