deept_client 0.2.0 copy "deept_client: ^0.2.0" to clipboard
deept_client: ^0.2.0 copied to clipboard

Deep Translator API typed interface signatures and class/data models. Written in pure Dart with no HTTP dependencies.

example/deept_client_example.dart

import 'dart:io';

import 'package:deept_client/deept_client.dart';

class MyCustomGoogleService implements GoogleService {
  /// A cool custom service implementation...

  @override
  void noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
}

class MyCustomDeepTranslatorClient extends DeepTranslatorClient {
  @override
  MyCustomGoogleService get google => MyCustomGoogleService();

  @override
  Future<void> close({bool force = false}) async {
    stdout.write('Because you can not download RAM.');
  }
}

void main() => _tryRunAndThrowGhostImplementation();

Future<void> _tryRunAndThrowGhostImplementation() async {
  final MyCustomDeepTranslatorClient customClient =
      MyCustomDeepTranslatorClient();
  await customClient.google.translate('Hi!', target: 'pt');
}
0
likes
140
pub points
3%
popularity

Publisher

verified publisheralexrintt.io

Deep Translator API typed interface signatures and class/data models. Written in pure Dart with no HTTP dependencies.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

Funding

Consider supporting this project:

github.com
github.com
donate.alexrintt.io
www.patreon.com

License

MIT (license)

Dependencies

freezed_annotation, json_annotation

More

Packages that depend on deept_client