-
Notifications
You must be signed in to change notification settings - Fork 862
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
Feat: Spellchecker for Flutter Quill #2118
Conversation
Note: i'll move |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
You can use the local development mode, which will use packages from your local machine. The CI will force push the publishing, and then we only need to increase the minimum version of You will find a dart script in the dart ./scripts/enable_local_dev.dart |
@CatHood0 Thanks for the useful contribution! I wanted to test it in my app but was not able to make it work. Is there any setup required to make it work and highlight the misspelled words? Thanks |
@FelixMittermeier Can you show the code that are you using? Remenber always set the instance of
I accidentally do this, and several words now are not showed as incorrect now. But it should still work you write random text |
@CatHood0 Thanks for your answer. I missed the part to call:
first. By the way, in your first message you wrote: Also I noticed it's unfortunately not ready for production yet. For example if the text contains special characters ("Umlaute" in German) like ä, ö, ü etc. then the spell checker somehow completely removes them. My string input was for example:
|
@FelixMittermeier this is an issue from the Spell checker package. I'll fix it. Thanks for show the characters that are being ignored! |
@FelixMittermeier please, take a look newly about the PR since i change some parts to be make more sense with the next version that moves this spell checker to extension and solve your issue. |
Description
For many versions I have been wondering how we could add spell-checking to the project or when it would even be implemented. However, now here is a feature that surely more than one of the thousands who use the package have wanted for their project, but that, unfortunately, had not been easy to implement.
Thanks to the simple_spell_checker package, getting which words are not spelled correctly from those that are was never so easy and fast.
Now, in order to activate this Feature we would have to take into account the existence of the
SpellcheckerService
class which allows us to create any custom implementation for our editor to directly use without any cover-ups.By default
DefaultSpellcheckerService
is the one that the editor uses, which as we can see, has no function because it directly returns a null value.And now, if we want to activate this new functionality that we added, we would have to use
SimpleSpellCheckerService
which contains the implementation that we need to be able to activate spell-checking as if we were in Word or LibreOffice (obviously I'm exaggerating)In order to make our instance valid, we can use:
And voilá, we will have at our disposal a powerful tool that will be useful for those who write novels, notes, or any type of document that requires correct spelling and grammar.
Note
It should be noted that the
dispose()
method ofSpellcheckerService
is not just for show. This method, at least forSimpleSpellCheckerService
, is responsible for closing the spell-checker itself once we no longer use it. This is important to note becauseSimpleSpellChecker
is used within our custom service, and it contains severalStreamControllers
that need to be closed to avoid memory issues.A little preview of this Feat:
there's some issue with some words, but this is an error from simple_spell_checker since i delete case sensitive (i'll fix it later)
clideo_editor_c7df3d3218b0457db07845b1d3efdefe.mp4