hyakunin_isshu 1.2.0 copy "hyakunin_isshu: ^1.2.0" to clipboard
hyakunin_isshu: ^1.2.0 copied to clipboard

This library has been developed to make it easy to use Japanese Hyakunin Isshu in Dart and Flutter applications.

example/example.dart

// Copyright (c) 2022, Kato Shinya. All rights reserved.
// Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:hyakunin_isshu/hyakunin_isshu.dart';

void main() async {
  final response = await HyakuninIsshu.instance.cards();
  print(response);

  if (response.status.isNotOk) {
    // Do something when http status is not OK (200).
    return;
  }

  if (response.box.isEmpty) {
    // Also you can check status by box.
    return;
  }

  //! The resources of the Hyakunin Isshu are stored in GitHub repository,
  //! so it will always succeed unless GitHub's server goes down!

  for (final card in response.box.cards) {
    print(card);
  }
}
2
likes
130
pub points
0%
popularity

Publisher

unverified uploader

This library has been developed to make it easy to use Japanese Hyakunin Isshu in Dart and Flutter applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

collection, http, json_response

More

Packages that depend on hyakunin_isshu