This is a Flutter-based Translator App designed to translate text and provide speech-to-text functionality. Users can input text, select languages, and receive translations seamlessly. The app uses Cubit for state management, dependency injection for modularization. The app leverages the power of Cubit state management and dependency injection to ensure a clean and maintainable codebase.
- Text Translation: Translate text between various languages.
- Speech-to-Text: Recognize speech input and convert it into text.
- Dynamic Theme: Switch between light and dark themes.
- Animation: Implemented a custom Ripple Effect Animation to visually indicate microphone activation during speech input.
- Start the app and choose your source and target languages. Reverse languages as needed.
- Enter text manually or use the Speech-to-Text feature to input text by voice.
- Press "Translate" to view the translated output.
- Tap the copy icon to save the text to your clipboard.
- Toggle between light and dark themes as desired.
You can download the latest version of the app for both Android and iOS from the Releases section.
Android: Download the .apk file and install it on your Android device. iOS: Download the .ipa file and use tools like AltStore or Xcode to sideload it onto your iOS device.
- Activate Speech-to-Text Tap the mic button to enable speech-to-text functionality. Speak into the mic, and if you are satisfied with the input, press the "OK" button.
2. Edit Text and Select Languages The recognized text will appear in the input field. You can edit the text and select the source and target languages and, if needed, reverse them.
3. Translate and Copy Text Press the "Translate" button to see the translated text in the output field. To copy either the original or translated text, press the copy button.
The app retrieves data from Text Translator through Rapid API. Network requests are managed using Retrofit and Dio for efficient data handling and real-time translations.
The app follows a clean architecture pattern with Cubit for state management and get_it
for dependency injection. This approach ensures:
- Scalability: Easily add new features with minimal changes to the existing code.
- Maintainability: Modularized components simplify debugging and testing.
- Separation of Concerns: Clear boundaries between business logic, UI, and data handling.
The app’s state management is handled using Cubit from the flutter_bloc
package:
- TranslatorCubit: Manages the translation API call, loading, and result display.
- SpeechCubit: Handles speech-to-text functionality.
- ThemeCubit: Controls dynamic theme switching across the app.
- Text Translator API : For providing translator functionality (API-link)
- speech_to_text package : For recognizing speech input. (speech_to_text-link)
- retrofit and dio packages: For network requests. (retrofit-link,dio-link)
- flutter_bloc package : For the Cubit state management. (bloc-link)
- get_it package : For dependency injection. (get_it-link)
- Flutter : For the framework.
Feel free to contribute by opening issues or submitting pull requests.
For questions or feedback, contact aslihanyoldas24@gmail.com