CatHood0 / simple_spell_checker

A simple and powerful spell checker, allowing developers to detect and highlight spelling errors in text
https://pub.dev/packages/simple_spell_checker
MIT License
2 stars 1 forks source link

Fix: remove public access to languages registration #13

Closed CatHood0 closed 1 month ago

CatHood0 commented 1 month ago

Description

Because we want to keep it as simple as possible, we made the decision that languagesToBeUsed would be renamed to dictionaries and that it would now only be accessible internally.

To solve the problems that this brings, two new static methods were added to SimpleSpellChecker, which would be:

Why was this decision made?

All this is because by leaving this variable in public access, mutating it in an unexpected way outside the package could cause unexpected errors.