Introduce the Spell checker for simplicity, extensibility and support for Android, iOS, macOS, and Windows
We plan on introducing a breaking change for SpellCheckerService (from flutter_quill) and using the Flutter SpellCheckerService or extending it instead of having our own custom SpellCheckerService which we discovered that it has some issues:
-
Extensibility: The interface should be more generic and less specific to client-side spell-checking service, it should be focused as a source of checking the spelling itself and not specific to Flutter
TextSpanor having some methods such asdispose,setNewLanguageState,updateCustomLanguageIfExist,addCustomLanguage, those methods seem to be helpers for managing a client-side service that is on the app itself, the user may want to use a web API that provides this service (e.g., Grammarly API) or use method channel, it's also not aFuturewhich is expected to be by the user. The service itself should not be responsible for customizing the UI. Take a look atTextFieldto see how it's done in Flutter (See SpellCheckConfiguration). The service will be activated in theQuillEditorConfigurationinstead of having theSpellCheckerServiceProvider. -
Bundle size: We have introduced a package that has supports for too many languages all at once, we initially wanted to separate each language into its package but this would complicate the process and require more effort when using the package since the user needs the core package and a package for each language which is a common solution is used by VS Code and JetBrains IDEs, in general even when using one language (English) it still increase the bundle size quite significantly, which require us to make this feature completely optional, having our own package that integrates with
flutter_quill, the project is currently in the process of changes more frequently than before and there are priorities, we need to fix existing issues before introducing something that leads to more issue reports. Usually, this is a bigger issue on the web. -
Web Support: Currently experiencing issues on some platforms, so we probably want to make it experimental. See (#2196)
-
Not using the native API as default: This will be fixed with platform-specific API using
quill_native_bridge(or at least attempt to). We do plan on supporting it on:Android: Using
android.view.textservice.TextServicesManageriOS: UsingUITextCheckermacOS: UsingNSSpellChecker. Not supported using FlutterDefaultServiceSpellChecker, needs custom implementation. Windows: UsingISpellChecker2Win32 API. Not supported using FlutterDefaultServiceSpellChecker, needs custom implementation.
Not that we currently already have plans to work on other areas of the project so it will take a bit longer before we move to fix this issue, creating this issue since we're having discussions from different threads (#2164, #2142, #2230).
This feature is of utmost importance. Kindly prioritize the implementation of this feature at your earliest convenience
It seems that Windows supports this feature (Win32 Spell Checking API). See ISpellChecker2 in win32 package.
Any update on this?