117 Commits

Author SHA1 Message Date
Matthew Cliatt
9375377fa9
Fix handling backspace on macos with text selection (#49760)
Fixes #46150 by catching both the delete and backspace keys, rather than just the delete key.
2020-01-30 09:36:41 -08:00
Dan Field
8b2993337a
revert #48985 (#49572) 2020-01-27 14:36:02 -08:00
Hans Muller
bc5c46438a Migrate TextTheme to 2018 APIs (#48547) 2020-01-24 19:03:01 -08:00
Anthony
b67d5ec6e9 [a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#48985) 2020-01-17 15:13:01 -08:00
Greg Spencer
f013b25b9c
Add TargetPlatform.macOS tests to the widgets library. (#48997) 2020-01-17 10:51:38 -08:00
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Alexandre Ardhuin
1fc43d9330
add key to constructors of public widgets (#47884)
* add key to constructors of public widgets

* fix a test

* fix a test
2020-01-06 17:41:54 +01:00
chunhtai
57a93419b4
EditableText should not update textinput style when the textinput is … (#47904) 2020-01-02 16:19:52 -08:00
Dan Field
4ad8271bf5 Reland text state (#47464) 2019-12-19 13:43:02 -08:00
Lau Ching Jun
d51956a9ea
Revert "Call setEditingState when text changes. (#47177)" (#47397)
This reverts commit d4b49ce9fc47885b1f634aad6b124a48917a81dc.
2019-12-18 18:03:24 -08:00
Lau Ching Jun
bc67d22449
Revert "iOS UITextInput autocorrection prompt (#45354)" (#47373)
This reverts commit 0f8c0da0a9ded2a9b7aa3bd01fcc29db80bbab0a.
2019-12-18 13:56:44 -08:00
LongCatIsLooong
0f8c0da0a9
iOS UITextInput autocorrection prompt (#45354) 2019-12-17 16:22:28 -08:00
Dan Field
d4b49ce9fc
Call setEditingState when text changes. (#47177) 2019-12-17 14:03:04 -08:00
Alexandre Ardhuin
dfbd585668 implicit-casts:false in flutter/test (#46245) 2019-12-16 15:03:02 -08:00
Justin McCandless
c06bf6503a
iOS smart quote/dash configuration (#44923)
smartDashesType and smartQuotesType params for text fields to control iOS's smart punctuation feature.
2019-12-13 17:42:35 -05:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Greg Spencer
a60bf8e23a
Spell check of Flutter docs (#45200)
No code changes, just comments: I spell-checked all the comments in the repo.
2019-11-22 08:43:55 -08:00
Alexandre Ardhuin
fcb40a05bb
make some BuildContext methods generics (#44189)
* make BuildContext.{ancestorStateOfType,ancestorRenderObjectOfType,rootAncestorStateOfType} generic

* make BuildContext.inheritFromWidgetOfExactType generic

* make BuildContext.ancestorInheritedElementForWidgetOfExactType generic

* make BuildContext.ancestorWidgetOfExactType generic

* fix snippet

* bump scoped_model on temp version

* update names

* Revert "bump scoped_model on temp version"

This reverts commit d1fcbba028cdb07f44738d1652391692d1ea5ec0.

* address review comments

* fix ci

* address review comments

* repeat the deprecation notice

* fix uppercase

* use of recommanded deprecation syntax

* address review comment
2019-11-22 17:35:20 +01:00
Greg Spencer
21158d8337
Add command key bindings to macOS text editing and fix selection. (#44130)
This adds support for the command key for text selection/editing on macOS. I had ported the text editing code (in #42879), but forgot to add support for the command key itself. This also adds a test that tests the text editing on multiple platforms instead of just testing Android.

There appears to still be a bug (filed #44135) where we're losing key events sometimes on macOS, leaving some keys "stuck" on, but this PR at least allows the right key combinations to be used.
2019-11-18 14:06:37 -08:00
Nurhan Turgut
97cf355b9d
Adding handling of TextInputClient.onConnectionClosed messages handli… (#43466)
* Adding handling of TextInputClient.onConnectionClosed messages handling to Framework

* Adding more test cases for closing connection to editable_text_test

* fixing analyze error.

* Fixing analyze error in the test file

* Fixing comments on the new method

* Adding more closing connection examples.

* Indentation change

* Remove auto-add white space

* Changing the oncloseconnection behaviour to stop editing. Updating the tests

* Addressing PR comments. Added explicit log for method channnels to the tests. Added comments to the interfaces.

* add more documentation
2019-11-04 13:35:18 -08:00
Gary Qian
f9b8d688cf
Reorder show and setEditingState calls to the IMM (#43865) 2019-10-31 13:28:48 -07:00
Justin McCandless
6e888dac24
Add enableSuggestions flag to TextField and TextFormField (#42550)
This flag controls Android's keyboard suggestions on/off
2019-10-28 15:31:52 -07:00
Justin McCandless
109f25588d
No multiline password fields (#42470)
Use assertions to prevent multiline password fields from being created
2019-10-28 10:59:26 -07:00
Greg Spencer
a7aa66164e
Re-implement hardware keyboard text selection. (#42879)
This re-implements keyboard text selection so that it will work on platforms other than Android (e.g. macOS, Linux, etc.).

Also, fixed a number of bugs in editing selection via a hardware keyboard (unable to select backwards, incorrect conversion to ASCII when cutting to clipboard, lack of support for CTRL-SHIFT-ARROW word selection, etc.).

Did not address the keyboard locale issues that remain, or add platform specific switches for the bindings. All that will need some more design work before implementing them.

Related Issues
Fixes #31951
2019-10-17 15:11:44 -07:00
Alexandre Ardhuin
f0553ba58e
Missing trailing commas (#41473)
* add missing trailing commas

* add more missing trailing commas

* add more and more missing trailing commas
2019-09-30 18:48:23 +02:00
Nurhan Turgut
ae529d8be0
Fixing the editable_text unit tests by clearing the log. Add a modification for also testing cached size. (#41300) 2019-09-25 13:14:59 -07:00
Nurhan Turgut
f6e77a9ee5
Fixing a text editing bug happening when text field changes. (#41108)
* Carrying last size and transform information to TextInputConnection. Doing this we are making sure that the size/transform information from the previous connection will be removed, when connection changes.

* remove unused lastsize and lasttransform values

* Adding unit tests. Adressing comments.
2019-09-24 09:25:39 -07:00
Alexandre Ardhuin
e9965f5636
add missing trailing commas in packages/flutter (#41076) 2019-09-24 08:05:41 +02:00
chunhtai
6c457e124b
Material textselection context menu cannot disable select all (#40713) 2019-09-18 12:19:37 -07:00
Mouad Debbar
a2957c571e
Upstream changes necessary for text editing in flutter web (#39344) 2019-08-30 10:00:03 -07:00
Gary Qian
fb5b157098
Clamp scrollOffset to prevent textfield bouncing (#38573) 2019-08-19 12:45:52 -07:00
Justin McCandless
62674cee3d
Interactive size const (#36964)
(Breaking Change) Move some hardcoded pixel values to reusable constants.
2019-08-08 13:29:27 -07:00
chunhtai
eddcc6bb25
reland Enable selection by default for password text field and expose api to turn on and off context menu options (#37324) 2019-08-01 14:19:04 -07:00
Justin McCandless
d82bca2a31
Fix selection menu not showing after clear (#37042)
This allows the text selection menu to be shown after deleting all text in a text field.
2019-07-31 08:01:15 -07:00
Michael Goderbauer
9a01ed2a55
Revert "reland Enable selection by default for password text field and expose api to turn on and off context menu options (#34676) (#37183)" (#37295)
This reverts commit 7eb09a842e406f15dccb5ac1fac2ec7f511708fb.
2019-07-31 15:34:22 +02:00
chunhtai
7eb09a842e
reland Enable selection by default for password text field and expose api to turn on and off context menu options (#34676) (#37183)
This reverts commit 48c7090f3c2faa20499d2ae8ccca563138d0c215.
2019-07-30 14:19:10 -07:00
Justin McCandless
b2497822e8
Android visible password input type support (#36695)
Android devices can now use the VisibleText input keyboard type.
2019-07-29 15:15:57 -07:00
chunhtai
48c7090f3c
Revert "Enable selection by default for password text field and expose api to turn on and off context menu options (#34676)" (#37055)
This reverts commit 0d0af31598f5ee0552529bfd3fdc35be1d8fe176.
2019-07-26 18:25:52 -07:00
chunhtai
0d0af31598
Enable selection by default for password text field and expose api to turn on and off context menu options (#34676) 2019-07-26 10:03:30 -07:00
Mouad Debbar
9c9b71a0fb
Add multi-line flag to semantics (#36297) 2019-07-18 10:36:22 -07:00
Justin McCandless
ff53fbe194
Text selection menu show/hide cases (#35219)
Show and hide the text selection menu at the correct time with various gestures in the text field.
2019-07-10 14:08:14 -07:00
chunhtai
f143fd6a4f
fix Selection handles position is off (#34665) 2019-07-03 10:50:10 -07:00
LongCatIsLooong
2602119194
Cupertino text edit tooltip rework (#34095) 2019-06-18 18:29:10 -07:00
Jonah Williams
9d724d4c44
Compatibility pass on flutter/widgets tests for JavaScript compilation. (8) (#33377) 2019-06-11 14:51:03 -07:00
Gary Qian
c2eaf8359d
Reland "Text inline widgets, TextSpan rework (#30069)" with improved backwards compatibility (#34051) 2019-06-07 15:47:23 -07:00
Gary Qian
4e5cf5efb0
Revert "Reland "Text inline widgets, TextSpan rework" (#33946)" (#34002)
This reverts commit 14414f350ac040f9626f1aa0b3071f42cc9136a6.
2019-06-06 18:25:36 -07:00
Gary Qian
14414f350a
Reland "Text inline widgets, TextSpan rework" (#33946) 2019-06-05 18:14:17 -07:00
Gary Qian
2db7918eb5
Revert "Text inline widgets, TextSpan rework (#33794)" (#33928)
This reverts commit 86862c1e625b97966594b772c88527a5302dd6cc.
2019-06-05 11:35:46 -07:00
Gary Qian
86862c1e62
Text inline widgets, TextSpan rework (#33794)
* Merge in changes for inline widgets

* Make analyzer happy, fix tests

* Fix analyzer

* Add missing doc

* Docs on RichText

* Fix analyzer some more

* Remove whitespace at end of line

* Update goldens

* Text fixes

* Analyzer
2019-06-04 16:27:53 -07:00
chunhtai
730025fa17
fix issue 14014 read only text field (#32059) 2019-06-03 14:00:43 -07:00