SpellChecker is a privacy-first, open-source Flutter spelling utility and deterministic writing assistant. It checks text locally, highlights spelling issues inside the editor, ranks correction suggestions, supports thirteen explicit offline language packs, keeps personal vocabulary and writing-rule choices local, offers keyboard-first review, applies source-range-safe corrections, and exposes reusable Dart APIs.
Current package: 3.2.0+25
Built-in languages: English (US) en-US, English (UK) en-GB, Hindi hi-IN, Spanish es-ES, French fr-FR, German de-DE, Portuguese (Brazil) pt-BR, Italian it-IT, Bengali bn-IN, Marathi mr-IN, Tamil ta-IN, Telugu te-IN, Russian ru-RU
Built-in writing rules: 10
Runtime dependencies: Flutter SDK and shared_preferences
Committed targets: Android, iOS, Linux, macOS, Windows, Web
Cross-platform validation: release-mode builds for all six targets
- Local by design. The bundled application does not send editor text to a remote spelling/grammar service and does not add accounts, telemetry, cloud writing, or document upload.
- Deterministic corrections. Spelling and writing fixes verify current source ranges before mutation, and batch writing fixes use a deterministic conservative overlap policy.
- Unicode-aware. Tokenization supports Unicode letters/combining marks plus in-word ZWJ/ZWNJ join controls, edit distance works over Unicode scalar values, and source offsets stay compatible with Dart/Flutter UTF-16 text editing.
- Language explicit and offline. Thirteen built-in packs cover English, Hindi, Spanish, French, German, Brazilian Portuguese, Italian, Bengali, Marathi, Tamil, Telugu, and Russian spelling while keeping personal vocabulary separate by language. English writing rules remain limited to the English packs.
- Explainable writing review. Ten built-in local rules cover repeated words, capitalization, spacing, punctuation, trailing whitespace, repeated punctuation, and advisory unmatched delimiters.
- Large-document aware. The bundled UI captures the first 200 spelling issues and first 200 writing findings with explicit limited-result semantics; writing analysis can still report exact totals.
- Reusable. Public Dart barrels expose spelling, language-pack, correction, suggestion-ranking, writing-rule, diagnostics, and transfer-codec APIs.
- Tested. CI runs canonical formatting,
flutter analyze, the complete Flutter test suite, and deterministic benchmark smoke.
The authoritative documentation hub is docs/README.md.
| Need | Start here |
|---|---|
| Install/run the project | Getting started |
| Use the application | User guide |
| See every current capability/limit | Feature reference |
| Understand settings, dictionaries, and transfer formats | Configuration and local data |
| Learn shortcuts | Keyboard shortcuts |
| Get common answers | FAQ |
| Look up terminology | Glossary |
| Copy public API examples | Library examples |
| Integrate the Dart API | Public API |
| Extend languages | Language packs |
| Extend writing analysis | Writing rules |
| Understand internals | Architecture |
| Understand target/build support | Platform support |
| Build/package cross-platform release artifacts | Executable builds and packaging |
| Understand privacy | Privacy |
| Understand accessibility | Accessibility |
| Troubleshoot | Troubleshooting |
| Contribute/develop | Development, Testing, Contributing |
| Maintain documentation | Documentation maintenance |
| Release the project | Releasing |
| Read historical design/audit records | Release history and CHANGELOG |
Prerequisites: Git and Flutter stable with a Dart SDK compatible with >=3.8.0 <4.0.0.
git clone https://github.com/sanskarIN/SpellChecker.git
cd SpellChecker
flutter pub get
flutter run -d chromeThe repository commits official Flutter runners for Android, iOS, Linux, macOS, Windows, and Web. See Platform support and Executable builds and packaging for target toolchains, build artifacts, signing boundaries, and distribution requirements.
- Enter or paste text in the editor.
- Choose one of the thirteen built-in offline spelling language packs.
- Select Check spelling or press
Ctrl+Enter/Command+Enter. - Review underlined issues and ranked suggestions.
- Use
F7/Shift+F7to move between spelling issues. - Open Writing insights or press
Ctrl+Shift+Enter/Command+Shift+Enterfor deterministic local writing review. - Save vocabulary to the selected language's personal dictionary, or use Ignore once for session-only acceptance.
- Use Portable settings for non-document preference transfer and the dictionary manager for separate personal-vocabulary transfer.
- Use Undo correction to reverse the latest correction/batch represented in the bounded in-memory correction history.
Manual typing invalidates the previous spelling snapshot so stale offsets are not reused for corrections.
| ID | Purpose | Automatic fix |
|---|---|---|
repeated-word |
consecutive repeated word | yes |
sentence-capitalization |
lowercase sentence start | yes |
repeated-space |
repeated interior spaces | yes |
punctuation-spacing |
whitespace before common punctuation | yes |
missing-punctuation-space |
missing space after selected punctuation between words | yes |
trailing-whitespace |
trailing spaces/tabs | yes |
repeated-punctuation |
repeated identical punctuation | yes |
unmatched-parenthesis |
unpaired literal parenthesis | advisory |
unmatched-square-bracket |
unpaired literal square bracket | advisory |
unmatched-curly-brace |
unpaired literal curly brace | advisory |
All current built-in writing rules support language code en, so they run for the two registered English packs. The eleven non-English packs provide spelling, suggestions, and personal dictionaries without applying English-specific writing rules. Structural unmatched-delimiter rules deliberately do not guess whether insertion, deletion, movement, or rewriting is the correct correction.
See Writing rules for source ownership, severities, categories, bounded analysis, preferences, safe batch correction, diagnostics, and custom-rule guidance.
| Action | Shortcut |
|---|---|
| Check spelling | Ctrl+Enter / Command+Enter |
| Open Writing insights | Ctrl+Shift+Enter / Command+Shift+Enter |
| Next spelling issue | F7 |
| Previous spelling issue | Shift+F7 |
| Focus Writing insights search | Ctrl+F / Command+F |
| Clear active review query / close Writing insights | Escape |
Inside Writing insights, Escape first clears active transient search/category/automatic-fix filters. When the review query is already empty, Escape closes the dialog.
Core spelling:
import 'package:spellchecker/spell_checker.dart';
final engine = SpellCheckerEngine();
final issues = engine.check('Helo world');
for (final issue in issues) {
print('${issue.word}: ${issue.suggestions}');
}Bounded spelling analysis:
final report = engine.analyze(
text,
suggestionLimit: 5,
maxIssues: 200,
);
print(report.capturedIssueCount);
print(report.truncated);Writing analysis:
import 'package:spellchecker/language.dart';
import 'package:spellchecker/writing.dart';
final analyzer = WritingAnalyzer();
final result = analyzer.analyze(
'hello world!!',
languagePack: SpellLanguageRegistry.englishUs,
maxIssues: 200,
);
for (final issue in result.issues) {
print('${issue.ruleId}: ${issue.message}');
}See Library examples and Public API for complete usage.
These are intentionally different transfer paths.
Personal dictionary export/import carries normalized language-specific vocabulary. Current language-aware exports use dictionary format version 2 and include the language ID; supported legacy forms remain readable.
Portable settings uses format spellchecker-settings, version 1, and carries only:
- selected language;
- suggestion limit;
- explicit per-language writing-rule overrides.
Portable settings deliberately excludes editor text, personal vocabulary, ignored session words, findings, source excerpts, correction history, and transient Writing insights filters/presets.
See Configuration for exact JSON examples and validation rules.
SpellChecker's bundled analysis is local. The application does not require:
- a network spelling or grammar API;
- a generative rewrite model;
- user accounts;
- analytics/telemetry for editor analysis;
- document upload;
- cloud preference or dictionary synchronization.
Durable application preferences use shared_preferences. Editor text, current findings, ignored words, and correction history are not stored as durable preferences by SpellChecker.
Explicit clipboard actions can copy personal-dictionary export JSON, Portable settings JSON, or a metadata-only writing diagnostic summary. They occur only after the user invokes the relevant control.
Read Privacy and Security for the full boundaries.
flowchart LR
UI[Flutter editor UI] --> Engine[SpellCheckerEngine]
UI --> Analyzer[WritingAnalyzer]
UI --> Preferences[Local preferences]
Engine --> Pack[SpellLanguagePack]
Engine --> Ranker[SpellSuggestionRanker]
Analyzer --> Rules[WritingRule registry]
Engine --> SpellIssues[SpellIssue / SpellCheckReport]
Analyzer --> WritingIssues[WritingIssue / WritingAnalysisResult]
SpellIssues --> TextCorrection[TextCorrection]
WritingIssues --> WritingCorrection[WritingCorrection]
Preferences --> SharedPreferences[shared_preferences]
The reusable spelling/language/writing layers do not depend on Flutter widgets. See Architecture for package boundaries and data flow.
Resolve dependencies first:
flutter pub getThen run:
dart format --output=none --set-exit-if-changed lib test tool
flutter analyze
flutter test --reporter expandedCI also runs the deterministic benchmark CLI smoke scenario. Cross-platform CI repeats the gates and then builds Android, iOS (no-codesign), Linux, macOS, Web, and Windows on appropriate GitHub-hosted operating systems. The release workflow mirrors that target coverage and uploads per-platform build artifacts while keeping production signing credentials outside the repository.
See Testing, Performance, Executable builds and packaging, and Releasing.
.github/ CI, release workflow, funding, issue/PR collaboration config
lib/core/ spelling, language, codecs, correction, statistics primitives
lib/data/ bundled language dictionary/frequency data
lib/writing/ deterministic writing-rule subsystem
lib/features/ Flutter editor/application workflow
lib/storage/ local application preference adapters
docs/ evergreen documentation + historical release/audit records
test/ unit, persistence, codec, Unicode, stress, accessibility, widget tests
tool/ deterministic benchmark tooling
android/ committed Android Flutter runner
ios/ committed iOS Flutter runner
linux/ committed Linux Flutter runner
macos/ committed macOS Flutter runner
web/ committed Flutter web host
windows/ committed Windows Flutter runner
The current package version is 3.2.0+25. V3.2 expands the multilingual cross-platform release line to thirteen built-in offline spelling packs on the V3.0 six-target platform foundation, while preserving V3.1.1 namespace/ranking hardening and adding Unicode join-control-safe tokenization. V2.16 remains the completed stabilization line immediately before the V3 platform expansion.
Current behavior belongs in evergreen documentation. Release-specific files under docs/V2_* and dated audit records preserve historical design/validation context and can contain older registry sizes that were correct for those releases.
Use Release history, CHANGELOG, and Post-V2.16 audit when historical context is needed.
Contributions are welcome. Before submitting a change, read:
- CONTRIBUTING.md
- Development guide
- Testing guide
- Executable builds and packaging for platform/build/release-artifact changes
- Documentation maintenance
- Code of Conduct
Public API, writing-rule, language-pack, persistence, platform, privacy, accessibility, and release changes should update the matching evergreen documentation in the same pull request.
For normal help and bug-report preparation, read SUPPORT.md and Troubleshooting. Use minimal synthetic reproductions instead of private documents when possible.
For security vulnerabilities, follow SECURITY.md and prefer private reporting rather than a public issue.
SpellChecker is licensed under the MIT License.
SpellChecker is free and open source. Funding never determines whether a bug, security report, contribution, or feature request can be submitted or reviewed.
If you want to support continued development, use Buy Me a Coffee.