deept_client_dio 0.2.0 deept_client_dio: ^0.2.0 copied to clipboard
Deep Translator HTTP client based on Dio. Cross-platform API wrapper written in pure Dart.
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>
Import:
import 'package:deept_client_dio/deept_client_dio.dart';
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
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);
Contributing #
TODO.