ai_smart_translate 1.1.0
ai_smart_translate: ^1.1.0 copied to clipboard
AI-powered Flutter translation package with automatic fallback across multiple free AI providers (Gemini, Groq, OpenRouter). Supports offline caching, .tr extension, and zero JSON maintenance.
1.1.0 #
- Web support —
WebCacheBackendadded using SharedPreferences (IndexedDB on web) - Linux / Windows / macOS desktop support —
SqfliteCacheBackendnow usessqflite_common_ffion desktop platforms TranslationCacheBackendabstract class exported — implement custom storage backendcacheBackendparameter added toAiSmartTranslate.init()for custom backend injection- No migration required — existing Android/iOS users unaffected, same SQLite DB and schema
ProviderConfigclass added — define provider order and models viaproviderslist ininit()- Custom provider support — plug in any OpenAI-compatible endpoint via
ProviderConfig.custom - Model override —
ProviderConfig.groqandProviderConfig.openRouternow accept amodelparameter - Default fallback order changed: Groq → OpenRouter → Gemini → Google Translate (Gemini moved to 3rd)
- Mistral provider removed
- Improved error logging — Gemini 429 response body now logged for easier debugging
1.0.3 #
dontparameter added totrOf,trContentOf— preserves specified substrings (names, dates, etc.) from being translatedtrWith(dont: [...])method added as context-free alternative to.trgetter with skip supporttrContentWith(dont: [...])method added as context-free alternative to.trContentgetter with skip support
1.0.2 #
- Minor improvement and code fixes
1.0.1 #
- Google Cloud Translate API added as fallback option
- Minor improvement and code fixes
trContent/trContentOf(context)for runtime translation
1.0.0 #
- Initial release
.trString extension with debounced batch queue- AI provider chain: Gemini, Groq, OpenRouter
- Auto fallback on rate-limit (429)
- SQLite offline cache
- TranslationScope widget for automatic UI rebuilds
AiSmartTranslatefacade for easy access