How aazmii/translator works
Go Translator is a Flutter app for translating text with on-device ML Kit models. Its principal workflow is entering text and receiving a translation; separate capabilities manage offline language models, bookmarks, speech input, text-to-speech, and local settings. The tree shows feature-first presentation, domain, and data layers, but the supplied source excerpts contain no application code. Accordingly, edges beyond the README’s documented capabilities are dashed and unverified rather than inferred as confirmed calls.
Main entry points: home.view.dart Translator screen · app.dart App shell · translate_text.dart Translate text · translation.repo.impl.dart Translation repository
Components 25
App shell
- App shell
lib/src/app.dart - Route setup
lib/src/config/router/view/router.dart
Translation
- Translator screen
lib/src/modules/home/presentation/home.view/home.view.dart - Translate text
lib/src/modules/home/domain/usecases/translate_text.dart - Translation repository
lib/src/modules/home/data/repository/translation.repo.impl.dart - Translation service
lib/src/modules/home/data/datasources/translation_service_data_source.dart - On-device ML Kit
- Speech input
lib/src/modules/home/presentation/home.view/components/speech.listening/speech.listening.dialog.dart - Text-to-speech
lib/src/modules/home/presentation/home.view/helpers/tts.helper.dart
Offline languages
- Offline languages screen
lib/src/modules/languages/presentation/view/offline.languages.view.dart - Language actions
lib/src/modules/languages/presentation/providers/offline.languages.provider.dart - Language management
lib/src/modules/languages/domain/usecases/download_language.dart - Language repository
lib/src/modules/languages/data/repositories/offline_language_repository_impl.dart - Language model source
lib/src/modules/languages/data/datasources/language_model_data_source.dart
Bookmarks
- Bookmarks screen
lib/src/modules/bookmarks/presentation/view/bookmarks.view.dart - Bookmark actions
lib/src/modules/bookmarks/presentation/providers/bookmarks.controller.dart - Bookmark operations
lib/src/modules/bookmarks/domain/usecases/save.bookmark.usecase.dart - Bookmark repository
lib/src/modules/bookmarks/data/repositories/bookmarks.repository.impl.dart - Local bookmarks
lib/src/modules/bookmarks/data/datasource/bookmarks.local.datasource.impl.dart
Settings
- Settings screen
lib/src/modules/setting/presentation/view/setting_view.dart - Settings actions
lib/src/modules/setting/presentation/providers/settings_provider.dart - Settings operations
lib/src/modules/setting/domain/usecases/get_settings.dart - Settings repository
lib/src/modules/setting/data/repositories/setting.repository.dart - Local settings
lib/src/modules/setting/data/datasources/settings_local_data_source.dart
Other components
- App user
Connections 24
- App user → App shell: opens app
- App shell → Route setup: sets routes
- App user → Translator screen: enters text
- Translator screen → Translate text: requests translation
- Translate text → Translation repository: delegates to
- Translation repository → Translation service: uses service
- Translation service → On-device ML Kit: runs on-device
README.md - App user → Speech input: provides speech
README.md - Translator screen → Text-to-speech: speaks text
README.md - App user → Offline languages screen: manages models
README.md - Offline languages screen → Language actions: dispatches actions
- Language actions → Language management: requests operation
- Language management → Language repository: delegates to
- Language repository → Language model source: uses source
- App user → Bookmarks screen: manages bookmarks
README.md - Bookmarks screen → Bookmark actions: dispatches actions
- Bookmark actions → Bookmark operations: requests operation
- Bookmark operations → Bookmark repository: delegates to
- Bookmark repository → Local bookmarks: uses local store
- App user → Settings screen: changes settings
README.md - Settings screen → Settings actions: dispatches actions
- Settings actions → Settings operations: requests operation
- Settings operations → Settings repository: delegates to
- Settings repository → Local settings: uses local store