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.

hyakunin_isshu_logo

pub package codecov Analyzer Test

1. About #

HyakuninIsshu is an open-sourced Dart library.
With HyakuninIsshu, you can easily use resources of Hyakunin Isshu on your application.

1.1. What Is Hyakunin Isshu? #

Hyakunin Isshu (百人一首) is a classical Japanese anthology of one hundred Japanese waka by one hundred poets. Hyakunin isshu can be translated to "one hundred people, one poem each"; it can also refer to the card game of uta-garuta, which uses a deck composed of cards based on the Hyakunin Isshu.

The most famous and standard version was compiled by Fujiwara no Teika (1162–1241) while he lived in the Ogura district of Kyoto. It is therefore also known as Ogura Hyakunin Isshu (小倉百人一首).

You can check more deitails here!

1.2. Introduction #

1.2.1. Install Library #

With Dart:

 dart pub add hyakunin_isshu

With Flutter:

 flutter pub add hyakunin_isshu

1.2.2. Import It #

import 'package:hyakunin_isshu/hyakunin_isshu.dart';

1.2.3. Use HyakuninIsshu #

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);
  }
}

1.3. License #

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.

1.4. More Information #

HyakuninIsshu was designed and implemented by Kato Shinya.

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