Skip to content

Spellcheck for EditableText on iOS/Android #34688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LongCatIsLooong opened this issue Jun 19, 2019 · 33 comments
Closed

Spellcheck for EditableText on iOS/Android #34688

LongCatIsLooong opened this issue Jun 19, 2019 · 33 comments
Assignees
Labels
a: text input Entering text in a text field or keyboard related problems c: new feature Nothing broken; request for a new capability engine flutter/engine repository. See also e: labels. framework flutter/packages/flutter repository. See also f: labels. P1 High-priority issues at the top of the work list platform-android Android applications specifically platform-ios iOS applications specifically

Comments

@LongCatIsLooong
Copy link
Contributor

Related Issue: #12920 autocorrection
Related UIKit documentation: https://developer.apple.com/documentation/uikit/uitextinputtraits/1624461-spellcheckingtype

  • Red underline to mark misspelled words
  • Spellcheck on typing & double-tap selection & caret moving, etc.
  • When a word is marked misspelled, show correction candidate list bubble on:
    • Single tap
    • Moving the caret to the end of the word by pressing backspace.
@LongCatIsLooong LongCatIsLooong added a: text input Entering text in a text field or keyboard related problems platform-ios iOS applications specifically labels Jun 19, 2019
@LongCatIsLooong LongCatIsLooong added the c: new feature Nothing broken; request for a new capability label Jun 19, 2019
@HansMuller
Copy link
Contributor

Android also supports a spell checking service: https://developer.android.com/guide/topics/text/spell-checker-framework

@iapicca iapicca added framework flutter/packages/flutter repository. See also f: labels. platform-android Android applications specifically labels Jan 16, 2020
@jmagman jmagman added platform-android Android applications specifically platform-ios iOS applications specifically and removed platform-android Android applications specifically platform-ios iOS applications specifically labels Mar 5, 2020
@ajviera
Copy link

ajviera commented Jul 24, 2020

Any news on this issue? It would be ideal to be able to have this so that the applications are more similar to the native ones.

@dnfield dnfield changed the title Spellcheck for EditableText on iOS Spellcheck for EditableText on iOS/Android Sep 2, 2020
@dnfield dnfield added platform-android Android applications specifically would be a good package Separate Flutter package should be made for this labels Sep 2, 2020
@dnfield
Copy link
Contributor

dnfield commented Sep 2, 2020

Would anything prevent this from being a plugin?

@LongCatIsLooong
Copy link
Contributor Author

LongCatIsLooong commented Sep 2, 2020

~If we want to use the stock spell checker on iOS (probably not going to be easy) we would have to make changes to the ios text plugin I think, as there doesn't seem to be a standalone spell checking api on iOS, it's most likely a feature we get from implementing UITextInput. ~

Edit: there is UITextChecker

@dnfield
Copy link
Contributor

dnfield commented Sep 2, 2020

Ahh, I see.

Yeah, this sounds like something that belongs in the TextInputPlugin in the engine.

It actually doesn't sound like it'd be too terrible to implement - on iOS for example we should be able to just use an attributed string instead of a plain NSString, and then send annotations back to the framework as spelling corrections come in. I realize there's some async issues to tangle with there though :)

@dnfield dnfield added engine flutter/engine repository. See also e: labels. and removed would be a good package Separate Flutter package should be made for this labels Sep 2, 2020
@kf6gpe kf6gpe added the P3 Issues that are less important to the Flutter project label Dec 9, 2020
@SeanBlagsvedt
Copy link

This is a fundamental issue to any user of a flutter app. Literally my users are telling me they don't want to use my flutter-based messaging app dara.network because they end up sending out misspellings to those they are attempting to impress. It's literally hurting their social credibility. Please, please, please fix this.

@kevmoo
Copy link
Contributor

kevmoo commented Sep 20, 2021

Bumping to P3 – per @jenle-g – this feels like a big hole VS native platforms and the web.

@kevmoo kevmoo added P1 High-priority issues at the top of the work list and removed P3 Issues that are less important to the Flutter project labels Sep 20, 2021
@GauravCalidig
Copy link

+1

@blasten
Copy link

blasten commented Nov 2, 2021

@LongCatIsLooong are you working or planning to work on this issue?

@namvietcetera
Copy link

Any updates for it?

@camsim99
Copy link
Contributor

This is still in progress. Part of Android support was added in #109643 and iOS is on the way #110193. I'll update this issue when full support for both is completed.

@mohamedali170
Copy link

Hi @camsim99,
Any updates?

@camsim99
Copy link
Contributor

camsim99 commented Oct 24, 2022

@mohamedali170 Android and iOS both have partial implementation. Implementation of the red underline and the toolbar with suggestions for Android and iOS is expected around EOY. I'll update this issue when more pieces of the implementation land!

@mohamedali170
Copy link

Well, thanks very much for your efforts @camsim99 . I hope you can finish the remaining implementation in the near future.

@camsim99
Copy link
Contributor

Just wanted to update here that I have merged the remaining implementation on Android into the master branch as of : #114460. Still working on somethings related to testing, though, as well as iOS!

@blopker
Copy link

blopker commented Dec 22, 2022

Nice! Do you have an idea which version this might land in?

@camsim99
Copy link
Contributor

Nice! Do you have an idea which version this might land in?

@blopker This should probably be in the next stable release if not the next beta release. Eventually, you can look for a version number on the merge commit of my latest PR, but it's not tagged now: e0742eb.

@jonbhanson
Copy link

jonbhanson commented Jan 25, 2023

It appears this feature has landed in Flutter 3.7. To use it, add this parameter to your EditableText or TextField:

spellCheckConfiguration: kIsWeb ? null : SpellCheckConfiguration()

(The spell check configuration currently seems to break on web)

@blopker
Copy link

blopker commented Jan 26, 2023

Good progress! Sad news about web though. Hopefully we won't have to wait until another point release for it.

@camsim99
Copy link
Contributor

It appears this feature has landed in Flutter 3.7. To use it, add this parameter to your EditableText or TextField:

spellCheckConfiguration: kIsWeb ? null : SpellCheckConfiguration()

(The spell check configuration currently seems to break on web)

@jonbhanson yes, spell check is partially implemented on both! Thank you for pointing out the crash on web. Filed an issue to follow up on better solutions for crashing in that case #119542

@durbek03

This comment was marked as duplicate.

@leighajarett
Copy link
Contributor

Closing this since it's now complete for iOS and Android as of 3.10

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: text input Entering text in a text field or keyboard related problems c: new feature Nothing broken; request for a new capability engine flutter/engine repository. See also e: labels. framework flutter/packages/flutter repository. See also f: labels. P1 High-priority issues at the top of the work list platform-android Android applications specifically platform-ios iOS applications specifically
Projects
None yet
Development

No branches or pull requests