0 purchases
deept client dio
Deep Translator for Dart #
This is a library for interacting with Deep Translator API. It works on all platforms and exposes a collection of data classes and a extendable client interface.
Notice: This is a unofficial project, maintained by volunteers.
Installation #
dependencies:
deept_client_dio: ^<latest-version>
copied to clipboard
Import:
import 'package:deept_client_dio/deept_client_dio.dart';
copied to clipboard
Usage #
The usage is pretty straightforward:
final deept = DeepTranslatorClientDio.create();
final response = await deept.google.translate('Welcome to the club!');
print(response.translation); // Bem vindo ao clube!
print(response.error); // null
copied to clipboard
Services that are currently available (complete or partially complete):
✅ Google translate.
❌ DeepL.
❌ Microsoft translator.
❌ MyMemory.
❌ Linguee.
❌ Yandex.
❌ Pons.
❌ Papago.
❌ Libre translate.
❌ QCRI.
All services are accessible by deept.<service-name>.<endpoint-name>(...).
Custom Dio instance #
By default, this package uses fresh Dio instance for handling HTTP requests, if you want to provide a custom instance, use dio argument:
final myDioInstance = Dio();
final deept = DeepTranslatorClientDio.create(dio: myDioInstance);
copied to clipboard
Contributing #
TODO.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.