这是indexloc提供的服务,不要输入任何密码

yandex_dictionary_api 1.0.1 copy "yandex_dictionary_api: ^1.0.1" to clipboard
yandex_dictionary_api: ^1.0.1 copied to clipboard

Package to access the Yandex.Dictionary API over HTTP.

example/lib/main.dart

import 'package:yandex_dictionary_api/yandex_dictionary_api.dart';

Future<void> main() async {
  try {
    final yandexDictionaryKey = YandexDictionaryKey(apiKey: '');
    final yandexDictionaryApi = YandexDictionaryApi(key: yandexDictionaryKey);

    final getLangsResponse = await yandexDictionaryApi.getLangs();
    print(getLangsResponse);

    final lookupRequest = YandexLookupRequest(lang: 'en-tr', text: 'hello');
    final lookupResponse = await yandexDictionaryApi.lookup(lookupRequest);
    print(lookupResponse.def?.first);
  } on YandexDictionaryException catch (error, stackTrace) {
    print(error);
    print(stackTrace);
  }
}
2
likes
160
points
40
downloads

Publisher

verified publishertguzel.dev

Weekly Downloads

Package to access the Yandex.Dictionary API over HTTP.

Repository (GitHub)
View/report issues

Topics

#api #yandex #dictionary

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on yandex_dictionary_api