simple_translator 1.0.0
simple_translator: ^1.0.0 copied to clipboard
A simple and lightweight package for translating text using the Google Translate API.
1.0.0 #
- Universal Dart & Flutter Support: Removed unnecessary Flutter SDK dependency from
dependencies, allowing usage in pure Dart VM, CLI, backend (Dart Frog, Serverpod), and Flutter apps. - Dependency Injection: Added support for injecting custom
http.ClientandTokenProviderfor easy offline unit testing and proxies. - Pana & Linter Polish: Fixed all static analysis linter warnings, type annotations, and code formatting.
- Resilient Parsing: Added safe parsing for multi-paragraph JSON responses and null-safety guards.
- New Features:
- Added
translateBatch()for translating multiple texts sequentially. - Added
timeoutparameter totranslate()andString.translate(). - Added
LanguageList.byCode(),LanguageList.byName(), andLanguageList.allhelpers. - Case-insensitive matching for all language names and codes.
- Implemented
operator ==andhashCodeforLanguageandTranslation.
- Added
- Testing: Expanded comprehensive test suite including offline mock tests.
0.0.2 #
- Example code added.
0.0.1 #
- Initial release.