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

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.

GitHub

View Github