Full Code of yukino-app/yukino for AI

next b06f52e9f616 cached
211 files
286.0 KB
71.4k tokens
485 symbols
1 requests
Download .txt
Showing preview only (336K chars total). Download the full file or copy to clipboard to get everything.
Repository: yukino-app/yukino
Branch: next
Commit: b06f52e9f616
Files: 211
Total size: 286.0 KB

Directory structure:
gitextract_eju0jcu_/

├── .github/
│   └── workflows/
│       └── code-analysis.yml
├── .gitignore
├── .metadata
├── .phrasey/
│   ├── config.toml
│   ├── hooks/
│   │   ├── dart-sync.js
│   │   └── utils.js
│   └── schema.toml
├── .prettierrc
├── .vscode/
│   └── settings.json
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android/
│   ├── .gitignore
│   ├── app/
│   │   ├── build.gradle
│   │   └── src/
│   │       ├── debug/
│   │       │   └── AndroidManifest.xml
│   │       ├── main/
│   │       │   ├── AndroidManifest.xml
│   │       │   ├── java/
│   │       │   │   └── io/
│   │       │   │       └── flutter/
│   │       │   │           └── app/
│   │       │   │               └── FlutterMultiDexApplication.java
│   │       │   ├── kotlin/
│   │       │   │   └── com/
│   │       │   │       └── example/
│   │       │   │           └── kazahana/
│   │       │   │               └── MainActivity.kt
│   │       │   └── res/
│   │       │       ├── drawable/
│   │       │       │   └── launch_background.xml
│   │       │       ├── drawable-v21/
│   │       │       │   └── launch_background.xml
│   │       │       ├── values/
│   │       │       │   └── styles.xml
│   │       │       └── values-night/
│   │       │           └── styles.xml
│   │       └── profile/
│   │           └── AndroidManifest.xml
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       └── gradle-wrapper.properties
│   ├── gradle.properties
│   └── settings.gradle
├── cli/
│   ├── code_analysis.dart
│   ├── prerequisites.dart
│   ├── run.dart
│   ├── tasks/
│   │   ├── build_runner.dart
│   │   ├── i18n.dart
│   │   ├── icon.dart
│   │   ├── meta.dart
│   │   └── version.dart
│   └── utils/
│       ├── exports.dart
│       ├── logger.dart
│       └── paths.dart
├── i18n/
│   └── en.toml
├── lib/
│   ├── core/
│   │   ├── anilist/
│   │   │   ├── auth.dart
│   │   │   ├── credentials.dart
│   │   │   ├── exports.dart
│   │   │   └── translations.dart
│   │   ├── app/
│   │   │   ├── events.dart
│   │   │   ├── exports.dart
│   │   │   ├── loader.dart
│   │   │   └── meta.dart
│   │   ├── database/
│   │   │   ├── cache/
│   │   │   │   ├── database.dart
│   │   │   │   └── exports.dart
│   │   │   ├── exports.dart
│   │   │   ├── secure/
│   │   │   │   ├── database.dart
│   │   │   │   ├── exports.dart
│   │   │   │   └── schema.dart
│   │   │   └── settings/
│   │   │       ├── database.dart
│   │   │       ├── exports.dart
│   │   │       └── schema.dart
│   │   ├── exports.dart
│   │   ├── internals/
│   │   │   ├── deeplink.dart
│   │   │   ├── exports.dart
│   │   │   └── router/
│   │   │       ├── exports.dart
│   │   │       ├── route.dart
│   │   │       ├── routes/
│   │   │       │   ├── anilist.dart
│   │   │       │   └── exports.dart
│   │   │       └── routes.dart
│   │   ├── packages.dart
│   │   ├── paths.dart
│   │   ├── player/
│   │   │   └── video_player.dart
│   │   ├── state/
│   │   │   ├── exports.dart
│   │   │   ├── states.dart
│   │   │   └── value.dart
│   │   ├── tenka/
│   │   │   ├── exports.dart
│   │   │   ├── manager.dart
│   │   │   └── utils.dart
│   │   ├── themes/
│   │   │   ├── colors.dart
│   │   │   ├── exports.dart
│   │   │   └── fonts.dart
│   │   ├── translator/
│   │   │   ├── exports.dart
│   │   │   └── translator.dart
│   │   └── utils/
│   │       ├── dates.dart
│   │       ├── durations.dart
│   │       ├── exports.dart
│   │       ├── kawaii_faces.dart
│   │       └── provider.dart
│   ├── main.dart
│   └── ui/
│       ├── base.dart
│       ├── components/
│       │   ├── anilist/
│       │   │   ├── exports.dart
│       │   │   ├── media_row.dart
│       │   │   ├── media_slide.dart
│       │   │   └── media_tile.dart
│       │   ├── body_padding.dart
│       │   ├── cross_draggable_scroll_behaviour.dart
│       │   ├── exports.dart
│       │   ├── kawaii_face.dart
│       │   ├── rounded_back_button.dart
│       │   ├── scrollable_row.dart
│       │   ├── slideshow.dart
│       │   ├── stated_builder.dart
│       │   ├── super_imposer.dart
│       │   └── toast.dart
│       ├── exports.dart
│       ├── keys.dart
│       ├── pages/
│       │   ├── _home/
│       │   │   ├── components/
│       │   │   │   ├── appbar.dart
│       │   │   │   ├── body.dart
│       │   │   │   ├── bottombar.dart
│       │   │   │   └── exports.dart
│       │   │   ├── provider.dart
│       │   │   └── view.dart
│       │   ├── _splash/
│       │   │   └── view.dart
│       │   ├── anilist/
│       │   │   ├── components/
│       │   │   │   ├── body/
│       │   │   │   │   ├── exports.dart
│       │   │   │   │   ├── login.dart
│       │   │   │   │   └── profile/
│       │   │   │   │       ├── body.dart
│       │   │   │   │       ├── exports.dart
│       │   │   │   │       ├── hero.dart
│       │   │   │   │       ├── provider.dart
│       │   │   │   │       └── wrapper.dart
│       │   │   │   └── exports.dart
│       │   │   ├── provider.dart
│       │   │   ├── route.dart
│       │   │   └── view.dart
│       │   ├── home/
│       │   │   ├── route.dart
│       │   │   └── view.dart
│       │   ├── modules/
│       │   │   ├── provider.dart
│       │   │   ├── route.dart
│       │   │   └── view.dart
│       │   ├── search/
│       │   │   ├── components/
│       │   │   │   ├── exports.dart
│       │   │   │   ├── results_grid.dart
│       │   │   │   └── search_bar.dart
│       │   │   ├── provider.dart
│       │   │   ├── route.dart
│       │   │   └── view.dart
│       │   ├── settings/
│       │   │   ├── components/
│       │   │   │   ├── appearance.dart
│       │   │   │   ├── exports.dart
│       │   │   │   └── tiles/
│       │   │   │       ├── choice.dart
│       │   │   │       ├── exports.dart
│       │   │   │       └── wrapper.dart
│       │   │   ├── route.dart
│       │   │   └── view.dart
│       │   └── view/
│       │       ├── components/
│       │       │   ├── appbar.dart
│       │       │   ├── body.dart
│       │       │   ├── content/
│       │       │   │   ├── content.dart
│       │       │   │   ├── exports.dart
│       │       │   │   └── provider.dart
│       │       │   ├── exports.dart
│       │       │   ├── hero.dart
│       │       │   └── overview.dart
│       │       ├── provider.dart
│       │       ├── route.dart
│       │       └── view.dart
│       ├── router/
│       │   ├── exports.dart
│       │   ├── navigator.dart
│       │   └── route/
│       │       ├── exports.dart
│       │       ├── info.dart
│       │       ├── page.dart
│       │       └── pages.dart
│       └── utils/
│           ├── animations.dart
│           ├── exports.dart
│           ├── placeholders.dart
│           ├── relative_scale.dart
│           ├── themer.dart
│           └── translations.dart
├── linux/
│   ├── .gitignore
│   ├── CMakeLists.txt
│   ├── flutter/
│   │   ├── CMakeLists.txt
│   │   ├── generated_plugin_registrant.cc
│   │   ├── generated_plugin_registrant.h
│   │   └── generated_plugins.cmake
│   ├── main.cc
│   ├── my_application.cc
│   └── my_application.h
├── package.json
├── packages/
│   ├── anilist/
│   │   ├── .gitignore
│   │   ├── .vscode/
│   │   │   └── settings.json
│   │   ├── README.md
│   │   ├── analysis_options.yaml
│   │   ├── lib/
│   │   │   ├── anilist.dart
│   │   │   ├── endpoints/
│   │   │   │   ├── exports.dart
│   │   │   │   ├── graphql.dart
│   │   │   │   ├── media.dart
│   │   │   │   ├── media_list.dart
│   │   │   │   ├── relation.dart
│   │   │   │   └── user.dart
│   │   │   ├── models/
│   │   │   │   ├── character.dart
│   │   │   │   ├── character_edge.dart
│   │   │   │   ├── character_role.dart
│   │   │   │   ├── exports.dart
│   │   │   │   ├── fuzzy_date.dart
│   │   │   │   ├── media.dart
│   │   │   │   ├── media_format.dart
│   │   │   │   ├── media_list_entry.dart
│   │   │   │   ├── media_list_sort.dart
│   │   │   │   ├── media_list_status.dart
│   │   │   │   ├── media_sort.dart
│   │   │   │   ├── media_status.dart
│   │   │   │   ├── media_type.dart
│   │   │   │   ├── relation_edge.dart
│   │   │   │   ├── relation_type.dart
│   │   │   │   ├── seasons.dart
│   │   │   │   ├── token.dart
│   │   │   │   └── user.dart
│   │   │   └── utils.dart
│   │   ├── pubspec.yaml
│   │   └── tests/
│   │       ├── _utils.dart
│   │       ├── search.dart
│   │       └── trends.dart
│   └── shared/
│       ├── .gitignore
│       ├── .vscode/
│       │   └── settings.json
│       ├── README.md
│       ├── analysis_options.yaml
│       ├── lib/
│       │   └── http.dart
│       └── pubspec.yaml
└── pubspec.yaml

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/code-analysis.yml
================================================
name: Code Analysis

on:
    push:
        branches:
            - main
            - next
        paths:
            - "packages/**"
            - "lib/**"
    pull_request:
        branches:
            - main
            - next
        paths:
            - "packages/**"
            - "lib/**"
    workflow_dispatch:

jobs:
    dart-analyze:
        runs-on: ubuntu-latest

        steps:
            - uses: actions/checkout@v2

            - uses: subosito/flutter-action@v2
              with:
                  channel: master

            - name: 🚧 Do prerequisites
              run: |
                  flutter pub get
                  dart run cli/prerequisites.dart

            - name: 🩺 Code Analysis
              run: dart run cli/code_analysis.dart


================================================
FILE: .gitignore
================================================
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
*.iml
*.ipr
*.iws
.idea/
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
app.*.symbols
app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
node_modules
*.g.dart
assets/translations


================================================
FILE: .metadata
================================================
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
  revision: "476aa717cd342d11e16439b71f4f4c9209c50712"
  channel: "beta"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
  platforms:
    - platform: root
      create_revision: 476aa717cd342d11e16439b71f4f4c9209c50712
      base_revision: 476aa717cd342d11e16439b71f4f4c9209c50712
    - platform: linux
      create_revision: 476aa717cd342d11e16439b71f4f4c9209c50712
      base_revision: 476aa717cd342d11e16439b71f4f4c9209c50712

  # User provided section

  # List of Local paths (relative to this file) that should be
  # ignored by the migrate tool.
  #
  # Files that are not part of the templates will be ignored by default.
  unmanaged_files:
    - 'lib/main.dart'
    - 'ios/Runner.xcodeproj/project.pbxproj'


================================================
FILE: .phrasey/config.toml
================================================
[input]
files = ["../i18n/**.toml"]
format = "toml"
fallback = "../i18n/en.toml"

[schema]
file = "./schema.toml"
format = "toml"

[output]
dir = "../assets/translations"
format = "json"
stringFormat = "python-positional-format-string"

[hooks]
files = ["./hooks/dart-sync.js"]


================================================
FILE: .phrasey/hooks/dart-sync.js
================================================
const p = require("path");
const fs = require("fs-extra");
const { rootDir, appI18nDir } = require("./utils");

/**
 * @type {import("phrasey").PhraseyHooksHandler}
 */
const hook = {
    onTranslationsBuildFinished: async ({ phrasey, state, log }) => {
        if (phrasey.options.source !== "build") {
            log.info("Skipping post-build due to non-build source");
            return;
        }
        await createTranslationDart(phrasey, state, log);
    },
};

module.exports = hook;

/**
 *
 * @param {import("phrasey").Phrasey} phrasey
 * @param {import("phrasey").PhraseyState} state
 * @param {import("phrasey").PhraseyLogger} log
 */
async function createTranslationDart(phrasey, state, log) {
    const translations = state.getTranslations();
    const locales = [...translations.translations.keys()];
    /**
     * @type {string[]}
     */
    const staticKeys = [];
    /**
     * @type {string[]}
     */
    const dynamicKeys = [];

    for (const x of state.getSchema().z.keys) {
        const cname = camel(x.name);
        if (x.parameters && x.parameters.length > 0) {
            const params = x.parameters
                .map((x) => `final String ${x}`)
                .join(", ");
            const callArgs = x.parameters.join(", ");
            dynamicKeys.push(
                `    String ${cname}(${params}) => StringUtils.formatPositional(_key('${x.name}'), <String>[${callArgs}]);`
            );
        } else {
            staticKeys.push(`    String get ${cname} => _key('${x.name}');`);
        }
    }

    const content = `
part of 'translator.dart';

class Translation {
    const Translation(this._json);

    final Map<dynamic, dynamic> _json;

    JsonMap get _localeJson => _json['locale'] as JsonMap;
    String get localeDisplayName => _localeJson['display'];
    String get localeNativeName => _localeJson['native'];
    String get localeCode => _localeJson['code'];
    Locale get locale => Locale(localeDisplayName, localeNativeName, localeCode);

    JsonMap get _keysJson => _json['keys'] as JsonMap;
    String _key(final String name) => _keysJson[name] as String;
${staticKeys.join("\n")}
${dynamicKeys.join("\n")}

    static const List<String> availableLocales = <String>[${locales
        .map((x) => `'${x}'`)
        .join(", ")}];

    static const String unk = '?';
}
    `;
    const path = p.join(appI18nDir, "translation.g.dart");
    await fs.writeFile(path, content);
    log.success(`Generated "${p.relative(rootDir, path)}".`);
}

/**
 *
 * @param {string} text
 * @returns {string}
 */
function camel(text) {
    return text[0].toLowerCase() + text.substring(1);
}


================================================
FILE: .phrasey/hooks/utils.js
================================================
const p = require("path");

const rootDir = p.resolve(__dirname, "../..");
const rootI18nDir = p.join(rootDir, "i18n");
const appI18nDir = p.join(rootDir, "lib/core/translator");

module.exports = {
    rootDir,
    appI18nDir,
    rootI18nDir,
};


================================================
FILE: .phrasey/schema.toml
================================================
[[keys]]
name = "Anime"
description = "Anime"

[[keys]]
name = "Manga"
description = "Manga"

[[keys]]
name = "SearchAnAnimeOrManga"
description = "Search an Anime or Manga"

[[keys]]
name = "MostPopularAnime"
description = "Most Popular Anime"

[[keys]]
name = "TopOngoingAnime"
description = "Top Ongoing Anime"

[[keys]]
name = "MostPopularManga"
description = "Most Popular Manga"

[[keys]]
name = "TopOngoingManga"
description = "Top Ongoing Manga"

[[keys]]
name = "Winter"
description = "Winter"

[[keys]]
name = "Spring"
description = "Spring"

[[keys]]
name = "Summer"
description = "Summer"

[[keys]]
name = "Fall"
description = "Fall"

[[keys]]
name = "NEps"
description = "Episodes"
parameters = ["n"]

[[keys]]
name = "NChs"
description = "Chapters"
parameters = ["n"]

[[keys]]
name = "Episodes"
description = "Episodes"

[[keys]]
name = "Chapters"
description = "Chapters"

[[keys]]
name = "NMins"
description = "Minutes"
parameters = ["n"]

[[keys]]
name = "NHrsOMins"
description = "Hours and minutes"
parameters = ["n", "o"]

[[keys]]
name = "Relations"
description = "Relations"

[[keys]]
name = "Cancelled"
description = "Cancelled"

[[keys]]
name = "Releasing"
description = "Releasing"

[[keys]]
name = "NotYetReleased"
description = "Not yet released"

[[keys]]
name = "Finished"
description = "Finished"

[[keys]]
name = "Hiatus"
description = "Hiatus"

[[keys]]
name = "Nsfw"
description = "NSFW"

[[keys]]
name = "Characters"
description = "Characters"

[[keys]]
name = "Settings"
description = "Settings"

[[keys]]
name = "Appearance"
description = "Appearance"

[[keys]]
name = "DarkMode"
description = "Dark mode"

[[keys]]
name = "AccentColor"
description = "Accent color"

[[keys]]
name = "BackgroundColor"
description = "Background color"

[[keys]]
name = "DisableAnimations"
description = "Disable animations"

[[keys]]
name = "UseSystemTheme"
description = "Use system theme"

[[keys]]
name = "Overview"
description = "Overview"

[[keys]]
name = "Extensions"
description = "Extensions"

[[keys]]
name = "ByX"
description = "By something"
parameters = ["x"]

[[keys]]
name = "AuthenticatedAsX"
description = "Authenticated as someone"
parameters = ["x"]

[[keys]]
name = "Anilist"
description = "Anilist"

[[keys]]
name = "LoginUsingAnilist"
description = "Login using Anilist"

[[keys]]
name = "SomethingWentWrong"
description = "Something went wrong"

[[keys]]
name = "TrackYourProgressUsingAnilist"
description = "Track your progress using AniList"

[[keys]]
name = "Current"
description = "Current"

[[keys]]
name = "Planning"
description = "Planning"

[[keys]]
name = "Completed"
description = "Completed"

[[keys]]
name = "Dropped"
description = "Dropped"

[[keys]]
name = "Paused"
description = "Paused"

[[keys]]
name = "Repeating"
description = "Repeating"

[[keys]]
name = "TotalAnime"
description = "Total anime"

[[keys]]
name = "EpisodesWatched"
description = "Episodes watched"

[[keys]]
name = "MeanScore"
description = "Mean score"

[[keys]]
name = "TimeSpent"
description = "Time spent"

[[keys]]
name = "TotalManga"
description = "Total manga"

[[keys]]
name = "ChaptersRead"
description = "Chapters read"

[[keys]]
name = "VolumesRead"
description = "Volumes read"

[[keys]]
name = "Red"
description = "Red"

[[keys]]
name = "Orange"
description = "Orange"

[[keys]]
name = "Amber"
description = "Amber"

[[keys]]
name = "Yellow"
description = "Yellow"

[[keys]]
name = "Lime"
description = "Lime"

[[keys]]
name = "Green"
description = "Green"

[[keys]]
name = "Emerald"
description = "Emerald"

[[keys]]
name = "Teal"
description = "Teal"

[[keys]]
name = "Cyan"
description = "Cyan"

[[keys]]
name = "Sky"
description = "Sky"

[[keys]]
name = "Blue"
description = "Blue"

[[keys]]
name = "Indigo"
description = "Indigo"

[[keys]]
name = "Violet"
description = "Violet"

[[keys]]
name = "Purple"
description = "Purple"

[[keys]]
name = "Fuchsia"
description = "Fuchsia"

[[keys]]
name = "Pink"
description = "Pink"

[[keys]]
name = "Rose"
description = "Rose"


================================================
FILE: .prettierrc
================================================
{
    "tabWidth": 4,
    "useTabs": false
}


================================================
FILE: .vscode/settings.json
================================================
{
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "[dart]": {
        "editor.defaultFormatter": "Dart-Code.dart-code"
    },
    "[toml]": {
        "editor.defaultFormatter": "tamasfe.even-better-toml"
    }
}


================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    Yukino lets you read manga or stream anime ad-free from multiple sources for free!
    Copyright (C) 2021  Zyrouge

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    Yukino Copyright (C) 2021  Zyrouge
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.


================================================
FILE: README.md
================================================
<p align="center">
    <img src="https://github.com/yukino-org/media/blob/main/images/subbanners/gh-kazahana-banner.png?raw=true">
</p>

# Kazahana

An extension-based Anime and Manga client.

[![Code Analysis](https://github.com/yukino-org/kazahana/actions/workflows/code-analysis.yml/badge.svg)](https://github.com/yukino-org/kazahana/actions/workflows/code-analysis.yml)

## Links

<!-- -   [Website](https://yukino-org.github.io/) -->

-   [Wiki](https://yukino-org.github.io/wiki/)
<!-- -   [Discord](https://yukino-org.github.io/discord/) -->
-   [GitHub](https://github.com/yukino-org/kazahana/)
-   [Patreon](https://patreon.com/yukino_app/)

For any queries, contact me at [yukino-org@hotmail.com](mailto:yukino-org@hotmail.com).

## Branding

### Colors

[![Primary](https://img.shields.io/badge/Primary-%236366F1-white.svg?style=flat&color=6366F1)](https://img.shields.io/badge/Indigo-%236366F1-white.svg?color=6366F1) [![Secondary](https://img.shields.io/badge/Secondary-%2318181b-white.svg?style=flat&color=18181b)](https://img.shields.io/badge/Indigo-%236366F1-white.svg?color=6366F1)

## Technology

-   [Dart](https://dart.dev/) (Language)
-   [Flutter](https://flutter.dev/) (UI Framework)
-   [Pub](https://pub.dev/) (Dependency Manager)
-   [Git](https://git-scm.com/) (Code Manager)

## Code structure

-   [./lib](./lib) - Contains the core application
-   [./cli](./cli) - Contains the command-line tool
-   [./android](./android) - Contains the android project

## Contributing

Ways to contribute to this project:

-   Submitting bugs and feature requests at [issues](https://github.com/yukino-org/kazahana/issues).
-   Opening [pull requests](https://github.com/yukino-org/kazahana/pulls) containing bug fixes, new features, etc.

## License

[GPL-3.0](./LICENSE)


================================================
FILE: analysis_options.yaml
================================================
include: package:devx/analysis_options.yaml

linter:
    rules:
        prefer_relative_imports: false


================================================
FILE: android/.gitignore
================================================
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks


================================================
FILE: android/app/build.gradle
================================================
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion flutter.compileSdkVersion
    ndkVersion flutter.ndkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // ? Application ID
        applicationId "io.github.yukino_org.kazahana"
        minSdkVersion flutter.minSdkVersion
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}


================================================
FILE: android/app/src/debug/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.kazahana">
    <uses-permission android:name="android.permission.INTERNET"/>
</manifest>


================================================
FILE: android/app/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.kazahana">
   <application
        android:label="Kazahana"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="kazahana" />
            </intent-filter>
        </activity>
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>
    <uses-permission android:name="android.permission.INTERNET" />
</manifest>


================================================
FILE: android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java
================================================
// Generated file.
//
// If you wish to remove Flutter's multidex support, delete this entire file.
//
// Modifications to this file should be done in a copy under a different name
// as this file may be regenerated.

package io.flutter.app;

import android.app.Application;
import android.content.Context;
import androidx.annotation.CallSuper;
import androidx.multidex.MultiDex;

/**
 * Extension of {@link android.app.Application}, adding multidex support.
 */
public class FlutterMultiDexApplication extends Application {
  @Override
  @CallSuper
  protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
  }
}


================================================
FILE: android/app/src/main/kotlin/com/example/kazahana/MainActivity.kt
================================================
package com.example.kazahana

import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity() {
}


================================================
FILE: android/app/src/main/res/drawable/launch_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@android:color/white" />

    <!-- You can insert your own image assets here -->
    <!-- <item>
        <bitmap
            android:gravity="center"
            android:src="@mipmap/launch_image" />
    </item> -->
</layer-list>


================================================
FILE: android/app/src/main/res/drawable-v21/launch_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="?android:colorBackground" />

    <!-- You can insert your own image assets here -->
    <!-- <item>
        <bitmap
            android:gravity="center"
            android:src="@mipmap/launch_image" />
    </item> -->
</layer-list>


================================================
FILE: android/app/src/main/res/values/styles.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
    <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
        <!-- Show a splash screen on the activity. Automatically removed when
             the Flutter engine draws its first frame -->
        <item name="android:windowBackground">@drawable/launch_background</item>
    </style>
    <!-- Theme applied to the Android Window as soon as the process has started.
         This theme determines the color of the Android Window while your
         Flutter UI initializes, as well as behind your Flutter UI while its
         running.

         This Theme is only used starting with V2 of Flutter's Android embedding. -->
    <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
        <item name="android:windowBackground">?android:colorBackground</item>
    </style>
</resources>


================================================
FILE: android/app/src/main/res/values-night/styles.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
        <!-- Show a splash screen on the activity. Automatically removed when
             the Flutter engine draws its first frame -->
        <item name="android:windowBackground">@drawable/launch_background</item>
    </style>
    <!-- Theme applied to the Android Window as soon as the process has started.
         This theme determines the color of the Android Window while your
         Flutter UI initializes, as well as behind your Flutter UI while its
         running.

         This Theme is only used starting with V2 of Flutter's Android embedding. -->
    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
        <item name="android:windowBackground">?android:colorBackground</item>
    </style>
</resources>


================================================
FILE: android/app/src/profile/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.kazahana">
    <!-- The INTERNET permission is required for development. Specifically,
         the Flutter tool needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->
    <uses-permission android:name="android.permission.INTERNET"/>
</manifest>


================================================
FILE: android/build.gradle
================================================
buildscript {
    ext.kotlin_version = "1.9.10"

    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
    delete rootProject.buildDir
}


================================================
FILE: android/gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip


================================================
FILE: android/gradle.properties
================================================
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true


================================================
FILE: android/settings.gradle
================================================
include ':app'

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"


================================================
FILE: cli/code_analysis.dart
================================================
import 'dart:io';
import 'utils/exports.dart';

const Logger _logger = Logger('code-analysis');

Future<void> main() async {
  final Stopwatch watch = Stopwatch()..start();
  _logger.info('Checking code format...');
  await checkCodeFormat();
  watch.stop();
  _logger.info('Validated code format in ${watch.elapsedMilliseconds}ms');

  watch.reset();
  _logger.info('Analyzing code...');
  await analyzeCode();
  watch.stop();
  _logger.info('Analyzed code in ${watch.elapsedMilliseconds}ms');
}

Future<void> analyzeCode() async {
  final ProcessResult result =
      await Process.run('flutter', <String>['analyze']);
  if (result.exitCode == 0) return;

  throw Exception(
    'Code analyse failed with exit code ${result.exitCode}\nstdout: ${result.stdout}\nstdout: ${result.stderr}',
  );
}

Future<void> checkCodeFormat() async {
  final ProcessResult result = await Process.run(
    'flutter',
    <String>[
      'format',
      '--output=none',
      '--set-exit-if-changed',
      '.',
    ],
  );
  if (result.exitCode == 0) return;

  final List<String> files = RegExp('Changed (.*)')
      .allMatches(result.stdout.toString())
      .map((final RegExpMatch x) => x.group(1)!)
      .toList();

  final RegExp ignoredFilesRegex = RegExp(r'\.g\.dart$');
  final List<String> filtered =
      files.where(ignoredFilesRegex.hasMatch).toList();

  if (filtered.isNotEmpty) {
    throw Exception('Invalid files: ${filtered.join(' ')}');
  }
}


================================================
FILE: cli/prerequisites.dart
================================================
import 'tasks/build_runner.dart' as build_runner;
import 'tasks/i18n.dart' as i18n;
import 'tasks/icon.dart' as icon;
import 'tasks/meta.dart' as meta;

Future<void> main(final List<String> args) async {
  await i18n.main(args);
  await build_runner.main(args);
  await meta.main();
  await icon.main();
}


================================================
FILE: cli/run.dart
================================================
import 'dart:io';
import 'prerequisites.dart' as prerequisites;
import 'utils/exports.dart';

const Logger _logger = Logger('run');

Future<void> main(final List<String> args) async {
  await prerequisites.main(args);
  _logger.info('Starting...');

  final Process process = await Process.start(
    'flutter',
    <String>['run'],
    mode: ProcessStartMode.inheritStdio,
    runInShell: true,
  );

  final int exitCode = await process.exitCode;
  if (exitCode != 0) {
    throw Exception('Debug run failed with error code $exitCode');
  }
}


================================================
FILE: cli/tasks/build_runner.dart
================================================
import 'dart:io';
import '../utils/exports.dart';

const Logger _logger = Logger('build_runner');

Future<void> main(final List<String> args) async {
  await runBuildRunner(
    deleteConflictingOutputs: args.contains('--force-build-runner'),
  );
}

Future<void> runBuildRunner({
  final bool deleteConflictingOutputs = false,
}) async {
  _logger.info('Running...');

  final Stopwatch watch = Stopwatch()..start();
  final Process process = await Process.start(
    'dart',
    <String>[
      'run',
      'build_runner',
      'build',
      '--fail-on-severe',
      if (deleteConflictingOutputs) '--delete-conflicting-outputs',
    ],
  );
  process.stdout.listen(stdout.add, onError: stdout.addError);

  final int exitCode = await process.exitCode;
  watch.stop();

  if (exitCode == 78 && !deleteConflictingOutputs) {
    _logger.info('Failed with error code $exitCode');
    _logger.info('Retrying with --delete-conflicting-outputs flag...');
    return runBuildRunner(deleteConflictingOutputs: true);
  }

  if (exitCode != 0) {
    throw Exception('Build runner failed with error code $exitCode');
  }

  _logger.info('Finished in ${watch.elapsedMilliseconds}ms');
}


================================================
FILE: cli/tasks/i18n.dart
================================================
import 'dart:io';

Future<void> main(final List<String> args) async {
  final ProcessResult result = await Process.run(
    'npm',
    <String>['run', 'i18n:build'],
  );
  if (result.exitCode != 0) {
    throw Exception('i18n builder failed with error code $exitCode');
  }
}


================================================
FILE: cli/tasks/icon.dart
================================================
import 'dart:io';
import 'dart:typed_data';
import 'package:image/image.dart';
import 'package:path/path.dart' as path;
import '../utils/exports.dart';

const Logger _logger = Logger('icon');
const int defaultImageSize = 1000;
const int overlayContentSize = 250;

const List<(int, String)> androidIconSizes = <(int, String)>[
  (defaultImageSize ~/ 1, 'mdpi'),
  (defaultImageSize ~/ 1.5, 'hdpi'),
  (defaultImageSize ~/ 2, 'xhdpi'),
  (defaultImageSize ~/ 3, 'xxhdpi'),
  (defaultImageSize ~/ 4, 'xxxhdpi'),
];

String getAndroidIconPath(final String code) => path.join(
      Paths.rootDir,
      'android/app/src/main/res/mipmap-$code/ic_launcher.png',
    );

Future<void> main() async {
  final String backgroundImagePath =
      path.join(Paths.iconsDir, 'background.png');
  final String overlayImagePath = path.join(Paths.iconsDir, 'overlay.png');
  _logger.info('Background Image Path: $backgroundImagePath');
  _logger.info('Overlay Image Path: $overlayImagePath');

  final Uint8List backgroundImageBytes =
      await File(backgroundImagePath).readAsBytes();
  final Uint8List overlayImageBytes =
      await File(overlayImagePath).readAsBytes();

  final Image backgroundImage = decodePng(backgroundImageBytes)!;
  final Image overlayImage = decodePng(overlayImageBytes)!;

  final Image iconImage = compositeImage(
    overlayImage,
    copyCrop(
      backgroundImage,
      x: 0,
      y: overlayContentSize ~/ 2,
      width: defaultImageSize,
      height: defaultImageSize - overlayContentSize,
    ),
  );

  for (final (int size, String code) in androidIconSizes) {
    final String iconPath = getAndroidIconPath(code);
    final File iconFile = File(iconPath);
    final List<int> icon = encodeNamedImage(
      path.basename(iconFile.path),
      copyResizeCropSquare(iconImage, size: size),
    )!;
    await iconFile.writeAsBytes(icon);
    _logger.info('Generated $iconPath ($code)');
  }
}


================================================
FILE: cli/tasks/meta.dart
================================================
import 'dart:io';
import 'package:path/path.dart' as path;
import '../utils/exports.dart';
import 'version.dart';

const Logger _logger = Logger('meta');
final String generatedAppMetaPath =
    path.join(Paths.libDir, 'core/app/meta.g.dart');

Future<void> main() async {
  await File(generatedAppMetaPath)
      .writeAsString(await getGeneratedAppMetaContent());
  _logger.info('Generated $generatedAppMetaPath');
}

Future<String> getGeneratedAppMetaContent() async => '''
part of 'meta.dart';

abstract class GeneratedAppMeta {
  static const String version = '${await getVersion()}';
  static const int builtAtMs = ${DateTime.now().millisecondsSinceEpoch};
}
''';


================================================
FILE: cli/tasks/version.dart
================================================
import 'dart:io';
import 'package:path/path.dart' as path;
import '../utils/exports.dart';

final String pubspecYamlPath = path.join(Paths.rootDir, 'pubspec.yaml');

Future<String> getVersion() async {
  final String content = await File(pubspecYamlPath).readAsString();
  return RegExp(r'version: ([\w+\.-]+)').firstMatch(content)!.group(1)!;
}


================================================
FILE: cli/utils/exports.dart
================================================
export 'logger.dart';
export 'paths.dart';


================================================
FILE: cli/utils/logger.dart
================================================
// ignore_for_file: avoid_print

class Logger {
  const Logger(this.name);

  final String name;

  void info(final Object text) {
    print('[$time info] $name: $text');
  }

  void fatal(final Object text) {
    print('[$time err!] $name: $text');
  }

  void println() {
    print(' ');
  }

  String get time {
    final DateTime now = DateTime.now();
    return '${now.hour}:${now.minute}:${now.second}';
  }
}


================================================
FILE: cli/utils/paths.dart
================================================
import 'dart:io';
import 'package:path/path.dart' as path;

abstract class Paths {
  static final String rootDir = Directory.current.path;
  static final String cliDir = path.join(rootDir, 'cli');
  static final String assetsDir = path.join(rootDir, 'assets');
  static final String libDir = path.join(rootDir, 'lib');
  static final String iconsDir = path.join(assetsDir, 'icon');
}


================================================
FILE: i18n/en.toml
================================================
locale = "en"

[keys]
Anime = "Anime"
Manga = "Manga"
SearchAnAnimeOrManga = "Search an anime or manga"
MostPopularAnime = "Most Popular Anime"
TopOngoingAnime = "Top Ongoing Anime"
MostPopularManga = "Most Popular Manga"
TopOngoingManga = "Top Ongoing Manga"
Winter = "Winter"
Spring = "Spring"
Summer = "Summer"
Fall = "Fall"
NEps = "{n} eps."
NChs = "{n} chs."
Episodes = "Episodes"
Chapters = "Chapters"
NMins = "{n} mins."
NHrsOMins = "{n} hrs. {o} mins."
Relations = "Relations"
Cancelled = "Cancelled"
Releasing = "Releasing"
NotYetReleased = "Unreleased"
Finished = "Finished"
Hiatus = "Hiatus"
Nsfw = "NSFW"
Characters = "Characters"
Settings = "Settings"
Appearance = "Appearance"
DarkMode = "Dark mode"
AccentColor = "Accent color"
BackgroundColor = "Background color"
DisableAnimations = "Disable animations"
UseSystemTheme = "Use system theme"
Overview = "Overview"
Extensions = "Extensions"
ByX = "By {x}"
AuthenticatedAsX = "Authenticated as {x}"
Anilist = "Anilist"
LoginUsingAnilist = "Login using Anilist"
SomethingWentWrong = "Something went wrong!"
TrackYourProgressUsingAnilist = "Track your progress using Anilist"
Current = "Current"
Planning = "Planning"
Completed = "Completed"
Dropped = "Dropped"
Paused = "Paused"
Repeating = "Repeating"
TotalAnime = "Total anime"
EpisodesWatched = "Episodes watched"
MeanScore = "Mean score"
TimeSpent = "Time spent"
TotalManga = "Total manga"
ChaptersRead = "Chapters read"
VolumesRead = "Volumes read"
Red = "Red"
Orange = "Orange"
Amber = "Amber"
Yellow = "Yellow"
Lime = "Lime"
Green = "Green"
Emerald = "Emerald"
Teal = "Teal"
Cyan = "Cyan"
Sky = "Sky"
Blue = "Blue"
Indigo = "Indigo"
Violet = "Violet"
Purple = "Purple"
Fuchsia = "Fuchsia"
Pink = "Pink"
Rose = "Rose"


================================================
FILE: lib/core/anilist/auth.dart
================================================
import 'package:anilist/anilist.dart';
import 'package:kazahana/ui/exports.dart';
import '../app/exports.dart';
import '../database/exports.dart';
import '../packages.dart';
import 'credentials.dart';

abstract class AnilistAuth {
  static const String baseURL = 'https://anilist.co/api/v2';
  static AnilistUser? user;

  static Future<void> initialize() async {
    updateAnilistClient(SecureDatabase.data.anilistToken);
    await fetchUser();
  }

  static Future<void> authenticate(final AnilistToken token) async {
    SecureDatabase.data.anilistToken = token;
    await SecureDatabase.save();
    updateAnilistClient(SecureDatabase.data.anilistToken);

    await fetchUser();
    if (user != null) {
      Toast(
        content: Text(
          <String>[
            '${gNavigatorKey.currentContext!.t.anilist}:',
            gNavigatorKey.currentContext!.t.authenticatedAsX(user!.name),
          ].join(' '),
        ),
      ).show();
    }
  }

  static Future<void> unauthenticate() async {
    SecureDatabase.data.anilistToken = null;
    await SecureDatabase.save();
    updateAnilistClient(null);
  }

  static Future<void> fetchUser() async {
    try {
      user = await AnilistUserEndpoints.getAuthenticatedUser();
    } catch (_) {}
  }

  static void updateAnilistClient(final AnilistToken? token) {
    AnilistGraphQL.updateClient(
      token: token,
      onTokenExpired: token != null ? unauthenticate : null,
      additionalHeaders: const <String, String>{
        'User-Agent': '${AppMeta.name} v${AppMeta.version}',
      },
    );
    AppEvents.controller.add(AppEvent.anilistStateChange);
  }

  static String get oauthURL => Uri.encodeFull(
        '$baseURL/oauth/authorize?client_id=${AnilistCredentials.clientId}&response_type=token',
      );
}


================================================
FILE: lib/core/anilist/credentials.dart
================================================
abstract class AnilistCredentials {
  static const String clientId = '6444';
}


================================================
FILE: lib/core/anilist/exports.dart
================================================
export 'package:anilist/anilist.dart';
export 'auth.dart';
export 'translations.dart';


================================================
FILE: lib/core/anilist/translations.dart
================================================
import 'package:anilist/anilist.dart';
import 'package:tenka/tenka.dart';
import '../translator/exports.dart';
import '../utils/exports.dart';

extension AnilistFuzzyDateTUtils on AnilistFuzzyDate {
  String get pretty => PrettyDates.constructDateString(
        day: day?.toString() ?? Translation.unk,
        month: month?.toString() ?? Translation.unk,
        year: year?.toString() ?? Translation.unk,
      );

  String? get maybePretty => isValidDateTime ? pretty : null;
}

const Map<AnilistMediaType, TenkaType> _anilistMediaTypeTenkaTypeMap =
    <AnilistMediaType, TenkaType>{
  AnilistMediaType.anime: TenkaType.anime,
  AnilistMediaType.manga: TenkaType.manga,
};

extension AnilistMediaTypeTUtils on AnilistMediaType {
  TenkaType get asTenkaType => _anilistMediaTypeTenkaTypeMap[this]!;
}

extension TenkaTypeAnilistUtils on TenkaType {
  AnilistMediaType get asAnilistMediaType =>
      _anilistMediaTypeTenkaTypeMap.entries
          .firstWhere(
            (final MapEntry<AnilistMediaType, TenkaType> x) => x.value == this,
          )
          .key;
}

extension AnimeSeasonsTUtils on AnimeSeasons {
  String getTitleCase(final Translation translation) => switch (this) {
        AnimeSeasons.winter => translation.winter,
        AnimeSeasons.spring => translation.spring,
        AnimeSeasons.summer => translation.summer,
        AnimeSeasons.fall => translation.fall,
      };
}

extension AnilistMediaTUtils on AnilistMedia {
  String getWatchtime(final Translation translation) => switch (type) {
        AnilistMediaType.anime when format == AnilistMediaFormat.movie =>
          duration != null
              ? PrettyDurations.prettyHoursMinutesShort(
                  translation,
                  Duration(minutes: duration!),
                )
              : translation.nMins(Translation.unk),
        AnilistMediaType.anime =>
          translation.nEps(episodes?.toString() ?? Translation.unk),
        AnilistMediaType.manga =>
          translation.nChs(chapters?.toString() ?? Translation.unk),
      };

  String get airdate {
    final String startDatePretty = startDate?.maybePretty ?? Translation.unk;
    final String endDatePretty = endDate?.maybePretty ?? Translation.unk;
    if (startDatePretty == endDatePretty) return startDatePretty;
    return '$startDatePretty - $endDatePretty';
  }
}

extension AnilistRelationTypeTUtils on AnilistRelationType {
  String getTitleCase(final Translation translation) =>
      StringCase(name).titleCase;
}

extension AnilistCharacterRoleTUtils on AnilistCharacterRole {
  String getTitleCase(final Translation translation) =>
      StringCase(name).titleCase;
}

extension AnilistMediaStatusTUtils on AnilistMediaStatus {
  String getTitleCase(final Translation translation) => switch (this) {
        AnilistMediaStatus.cancelled => translation.cancelled,
        AnilistMediaStatus.releasing => translation.releasing,
        AnilistMediaStatus.notYetReleased => translation.notYetReleased,
        AnilistMediaStatus.finished => translation.finished,
        AnilistMediaStatus.hiatus => translation.hiatus,
      };
}

extension AnilistMediaFormatTUtils on AnilistMediaFormat {
  String getTitleCase(final Translation translation) => switch (this) {
        AnilistMediaFormat.tv => 'TV',
        AnilistMediaFormat.tvShort => 'TV (Short)',
        AnilistMediaFormat.movie => 'Movie',
        AnilistMediaFormat.special => 'Special',
        AnilistMediaFormat.ova => 'OVA',
        AnilistMediaFormat.ona => 'ONA',
        AnilistMediaFormat.music => 'Music',
        AnilistMediaFormat.manga => 'Manga',
        AnilistMediaFormat.novel => 'Novel',
        AnilistMediaFormat.oneshot => 'OneShot',
      };
}

extension AnilistMediaListStatusTUtils on AnilistMediaListStatus {
  String getTitleCase(final Translation translation) => switch (this) {
        AnilistMediaListStatus.current => translation.current,
        AnilistMediaListStatus.planning => translation.planning,
        AnilistMediaListStatus.completed => translation.completed,
        AnilistMediaListStatus.dropped => translation.dropped,
        AnilistMediaListStatus.paused => translation.paused,
        AnilistMediaListStatus.repeating => translation.repeating,
      };
}


================================================
FILE: lib/core/app/events.dart
================================================
import 'dart:async';

class AppEvent {
  const AppEvent(this.name, [this.data]);

  final String name;
  final dynamic data;

  @override
  bool operator ==(final Object other) =>
      other is AppEvent && other.name == name;

  @override
  int get hashCode => Object.hash(name, data);

  static const AppEvent initialized = AppEvent('initialized');
  static const AppEvent afterAnitialized = AppEvent('after_initialized');
  static const AppEvent anilistStateChange = AppEvent('anilist_state_change');
  static const AppEvent settingsChange = AppEvent('settings_change');
  static const AppEvent translationsChange = AppEvent('translations_change');
}

abstract class AppEvents {
  static final StreamController<AppEvent> controller =
      StreamController<AppEvent>.broadcast();

  static final Stream<AppEvent> stream = controller.stream;
}


================================================
FILE: lib/core/app/exports.dart
================================================
export 'events.dart';
export 'loader.dart';
export 'meta.dart';


================================================
FILE: lib/core/app/loader.dart
================================================
import '../anilist/exports.dart';
import '../database/exports.dart';
import '../internals/exports.dart';
import '../paths.dart';
import '../tenka/exports.dart';
import '../translator/exports.dart';
import 'events.dart';

abstract class AppLoader {
  static bool ready = false;

  static Future<void> initialize() async {
    await Paths.initialize();
    await SettingsDatabase.initialize();
    await SecureDatabase.initialize();
    await CacheDatabase.initialize();
    await TenkaManager.initialize();
    await Translator.initialize();
    await AnilistAuth.initialize();
    ready = true;
    AppEvents.controller.add(AppEvent.initialized);
    initializeAfterLoad();
  }

  static Future<void> initializeAfterLoad() async {
    await Deeplink.initializeAfterLoad();
    AppEvents.controller.add(AppEvent.afterAnitialized);
  }
}


================================================
FILE: lib/core/app/meta.dart
================================================
part 'meta.g.dart';

abstract class AppMeta {
  static const String name = 'Kazahana';
  static const String code = 'kazahana';
  static const String scheme = 'kazahana';
  static const String yuki = '雪';

  static const String version = GeneratedAppMeta.version;
  static final DateTime builtAt =
      DateTime.fromMillisecondsSinceEpoch(GeneratedAppMeta.builtAtMs);
}


================================================
FILE: lib/core/database/cache/database.dart
================================================
import 'package:flutter/foundation.dart';
import 'package:path/path.dart' as path;
import 'package:perks/perks.dart';
import '../../paths.dart';
import '../../utils/exports.dart';

abstract class CacheDatabase {
  static const String kDataKey = 'data';
  static const String kExpiresAtKey = 'expires_at';
  static const int recommendedTtlMs = 21600000;

  static final String cacheFilePath = path.join(Paths.docsDir.path, 'cache.db');

  static final PerksNameValueBox<JsonMap> box = PerksNameValueBox<JsonMap>(
    adapter: PerksFileAdapter(cacheFilePath),
  );

  static Future<void> initialize() async {
    _removeExpiredData();
  }

  static Future<T?> get<T>(final String key) async {
    final JsonMap? data = await box.get(key);
    if (data == null) return null;

    final T? value = data[kDataKey] as T?;
    final int? expiresAtMs = data[kExpiresAtKey] as int?;

    if (expiresAtMs != null &&
        expiresAtMs < DateTime.now().millisecondsSinceEpoch) {
      await box.delete(key);
      return null;
    }

    return value;
  }

  static Future<void> set<T>(
    final String key,
    final T? data, {
    final int? ttlMs,
  }) async {
    if (data == null) return delete(key);

    await box.set(key, <dynamic, dynamic>{
      kDataKey: data,
      if (ttlMs != null)
        kExpiresAtKey: DateTime.now().millisecondsSinceEpoch + ttlMs,
    });
  }

  static Future<void> delete(final String key) async => box.delete(key);

  static Future<void> _removeExpiredData() async {
    await box.transaction((final PerksNameValueMap<JsonMap> data) async {
      await compute(_filterExpiredData, data);
      return data;
    });
  }

  static void _filterExpiredData(
    final Map<String, JsonMap> data,
  ) {
    final int nowMs = DateTime.now().millisecondsSinceEpoch;
    for (final MapEntry<String, JsonMap> x in data.entries) {
      final int? expiresAtMs = x.value[kExpiresAtKey] as int?;
      if (expiresAtMs != null && expiresAtMs < nowMs) {
        data.remove(x.key);
      }
    }
  }
}


================================================
FILE: lib/core/database/cache/exports.dart
================================================
export 'database.dart';


================================================
FILE: lib/core/database/exports.dart
================================================
export 'cache/exports.dart';
export 'secure/exports.dart';
export 'settings/exports.dart';


================================================
FILE: lib/core/database/secure/database.dart
================================================
import 'dart:convert';
import 'package:encrypt/encrypt.dart';
import 'package:path/path.dart' as path;
import 'package:perks/perks.dart';
import '../../paths.dart';
import '../../utils/exports.dart';
import 'schema.dart';

abstract class SecureDatabase {
  static final Key key = Key.fromUtf8('ThIs_Is_HiGhLy_SeCuRe_KeY_nO_cAp');
  static final IV iv = IV.fromLength(16);
  static final Encrypter encrypter = Encrypter(AES(key, mode: AESMode.cbc));

  static final PerksFileAdapter adapter =
      PerksFileAdapter(path.join(Paths.docsDir.path, 'secure.db'));

  static late SecureSchema data;

  static Future<void> initialize() async {
    final String content = await adapter.read();
    data = content.isNotEmpty
        ? SecureSchema.fromJson(json.decode(decryptData(content)) as JsonMap)
        : SecureSchema();
  }

  static Future<void> save() async {
    await adapter.write(encryptData(json.encode(data.toJson())));
  }

  static String encryptData(final String data) =>
      encrypter.encrypt(data, iv: iv).base64;

  static String decryptData(final String data) =>
      encrypter.decrypt(Encrypted.fromBase64(data), iv: iv);
}


================================================
FILE: lib/core/database/secure/exports.dart
================================================
export 'database.dart';
export 'schema.dart';


================================================
FILE: lib/core/database/secure/schema.dart
================================================
import 'package:json_annotation/json_annotation.dart';
import '../../exports.dart';

part 'schema.g.dart';

@JsonSerializable()
class SecureSchema {
  SecureSchema({
    this.anilistToken,
  });

  factory SecureSchema.fromJson(final JsonMap json) =>
      _$SecureSchemaFromJson(json.cast<String, dynamic>());

  @JsonKey(fromJson: _anilistTokenFromJson, toJson: _anilistTokenToJson)
  AnilistToken? anilistToken;

  JsonMap toJson() => _$SecureSchemaToJson(this);

  static AnilistToken? _anilistTokenFromJson(final dynamic value) =>
      value is JsonMap ? AnilistToken(value.cast<String, String>()) : null;
  static JsonMap? _anilistTokenToJson(final AnilistToken? value) => value?.json;
}


================================================
FILE: lib/core/database/settings/database.dart
================================================
import 'dart:async';
import 'dart:convert';
import 'package:path/path.dart' as path;
import 'package:perks/perks.dart';
import '../../app/events.dart';
import '../../paths.dart';
import '../../utils/exports.dart';
import 'schema.dart';

abstract class SettingsDatabase {
  static final PerksFileAdapter adapter =
      PerksFileAdapter(path.join(Paths.docsDir.path, 'settings.db'));

  static bool ready = false;
  static late SettingsSchema settings;

  static Future<void> initialize() async {
    final String content = await adapter.read();
    settings = content.isNotEmpty
        ? SettingsSchema.fromJson(json.decode(content) as JsonMap)
        : SettingsSchema();
    ready = true;
    AppEvents.controller.add(AppEvent.settingsChange);
  }

  static Future<void> save() async {
    await adapter.write(json.encode(settings.toJson()));
    AppEvents.controller.add(AppEvent.settingsChange);
  }
}


================================================
FILE: lib/core/database/settings/exports.dart
================================================
export 'database.dart';
export 'schema.dart';


================================================
FILE: lib/core/database/settings/schema.dart
================================================
import 'package:json_annotation/json_annotation.dart';
import 'package:kazahana/ui/utils/relative_scale.dart';
import '../../utils/exports.dart';

part 'schema.g.dart';

@JsonSerializable()
class SettingsSchema {
  SettingsSchema({
    this.locale,
    this.ignoreSSLCertificate = true,
    this.darkMode = true,
    this.primaryColor,
    this.backgroundColor,
    this.disableAnimations = false,
    this.useSystemPreferredTheme = false,
    this.scaleMultiplier = RelativeScaleData.defaultScaleMultiplier,
  });

  factory SettingsSchema.fromJson(final JsonMap json) =>
      _$SettingsSchemaFromJson(json.cast<String, dynamic>());

  @JsonKey(fromJson: _localeFromJson, toJson: _localeToJson)
  Locale? locale;
  bool ignoreSSLCertificate;
  bool darkMode;
  String? primaryColor;
  String? backgroundColor;
  bool disableAnimations;
  bool useSystemPreferredTheme;
  double scaleMultiplier;

  JsonMap toJson() => _$SettingsSchemaToJson(this);

  static Locale? _localeFromJson(final String? value) =>
      value != null ? Locale.parse(value) : null;
  static String? _localeToJson(final Locale? value) => value?.code;
}


================================================
FILE: lib/core/exports.dart
================================================
export 'anilist/exports.dart';
export 'app/exports.dart';
export 'database/exports.dart';
export 'packages.dart';
export 'paths.dart';
export 'state/exports.dart';
export 'tenka/exports.dart';
export 'themes/exports.dart';
export 'translator/exports.dart';
export 'utils/exports.dart';


================================================
FILE: lib/core/internals/deeplink.dart
================================================
import 'package:kazahana/ui/exports.dart';
import 'package:uni_links/uni_links.dart' as uni_links;
import '../app/exports.dart';
import '../packages.dart';
import 'router/exports.dart';

abstract class Deeplink {
  static Future<void> initializeAfterLoad() async {
    final String? path = await uni_links.getInitialLink();
    if (path != null) handle(path);
    listen();
  }

  static void listen() {
    uni_links.linkStream.listen((final String? path) {
      if (path == null) return;
      handle(path);
    });
  }

  static void handle(final String path) {
    String resolvedPath = path;
    if (resolvedPath.startsWith(fullScheme)) {
      resolvedPath = resolvedPath.replaceFirst(fullScheme, '');
    }
    debugPrint('Incoming deeplink: $resolvedPath');

    final InternalRoute? internalRoute = InternalRoutes.findMatch(resolvedPath);
    if (internalRoute != null) {
      internalRoute.handle(resolvedPath);
      return;
    }
    gNavigatorKey.currentState!.pushNamed(resolvedPath);
  }

  static const String fullScheme = '${AppMeta.scheme}://';
}


================================================
FILE: lib/core/internals/exports.dart
================================================
export 'deeplink.dart';


================================================
FILE: lib/core/internals/router/exports.dart
================================================
export 'route.dart';
export 'routes.dart';


================================================
FILE: lib/core/internals/router/route.dart
================================================
abstract class InternalRoute {
  bool matches(final String route);
  Future<void> handle(final String route);
}


================================================
FILE: lib/core/internals/router/routes/anilist.dart
================================================
import '../../../anilist/exports.dart';
import '../route.dart';

class AnilistAuthRoute extends InternalRoute {
  @override
  bool matches(final String route) => route.startsWith(routeName);

  @override
  Future<void> handle(final String route) async {
    final AnilistToken token = AnilistToken.parseURL(route);
    await AnilistAuth.authenticate(token);
  }

  static const String routeName = '/anilist/auth';
}


================================================
FILE: lib/core/internals/router/routes/exports.dart
================================================
export 'anilist.dart';


================================================
FILE: lib/core/internals/router/routes.dart
================================================
import '../../utils/exports.dart';
import 'route.dart';
import 'routes/exports.dart';

abstract class InternalRoutes {
  static AnilistAuthRoute anilistAuth = AnilistAuthRoute();

  static InternalRoute? findMatch(final String route) =>
      all.firstWhereOrNull((final InternalRoute x) => x.matches(route));

  static List<InternalRoute> get all => <InternalRoute>[anilistAuth];
}


================================================
FILE: lib/core/packages.dart
================================================
export 'dart:ui' show ImageFilter;
export 'package:animations/animations.dart';
export 'package:flutter/material.dart' hide Locale;
export 'package:provider/provider.dart';
export 'package:provider/single_child_widget.dart';
export 'package:url_launcher/url_launcher.dart'
    show LaunchMode, canLaunchUrl, launchUrl;


================================================
FILE: lib/core/paths.dart
================================================
import 'dart:io';
import 'package:path_provider/path_provider.dart' as path_provider;

abstract class Paths {
  static late final Directory docsDir;

  static Future<void> initialize() async {
    docsDir = await path_provider.getApplicationDocumentsDirectory();
  }
}

abstract class AssetPaths {
  static const String anilistLogo = 'assets/images/anilist_logo.png';
}


================================================
FILE: lib/core/player/video_player.dart
================================================
import 'package:flutter/material.dart';
import 'package:media_kit/media_kit.dart' as media_kit;
import 'package:media_kit_video/media_kit_video.dart' as media_kit;

class PlayerPage extends StatefulWidget {
  const PlayerPage({super.key});

  @override
  _PlayerPageState createState() => _PlayerPageState();
}

String sourceurl =
    ''; // TODO: Placeholder variable. Swap this out for the new video url provider.
String fileContents =
    ''; // TODO: Placeholder variable. Subtitles will have to be implemented later.

class _PlayerPageState extends State<PlayerPage> {
  late media_kit.Player _player;
  late media_kit.VideoController _controller;

  // final ValueNotifier<bool> _subtitlesEnabled = ValueNotifier<bool>(true);

  @override
  void initState() {
    super.initState();
    _player = media_kit.Player();
    _controller = media_kit.VideoController(_player);
    _setDataSource();
  }

  @override
  void dispose() {
    super.dispose();
    _player.dispose();
  }

  Future<void> _setDataSource() async {
    await _player.open(media_kit.Media(sourceurl));
    // _controller.onClosedCaptionEnabled(true);
  }

  // Future<ClosedCaptionFile> _loadCaptions() async =>
  //     SubRipCaptionFile(fileContents);

  @override
  Widget build(final BuildContext context) => Scaffold(
        appBar: AppBar(),
        body: SafeArea(
          child: AspectRatio(
            aspectRatio: 16 / 9,
            child: media_kit.Video(
              controller: _controller,
              // bottomRight: (
              //   final BuildContext ctx,
              //   final MeeduPlayerController controller,
              //   final Responsive responsive,
              // ) {
              //   final double fontSize = responsive.ip(3);

              //   return CupertinoButton(
              //     padding: const EdgeInsets.all(5),
              //     minSize: 25,
              //     child: ValueListenableBuilder<bool>(
              //       valueListenable: _subtitlesEnabled,
              //       builder: (
              //         final BuildContext context,
              //         final bool enabled,
              //         final _,
              //       ) =>
              //           Text(
              //         'CC',
              //         style: TextStyle(
              //           fontSize: fontSize > 18 ? 18 : fontSize,
              //           color: Colors.white.withOpacity(
              //             enabled ? 1 : 0.4,
              //           ),
              //         ),
              //       ),
              //     ),
              //     onPressed: () {
              //       _subtitlesEnabled.value = !_subtitlesEnabled.value;
              //       _controller.onClosedCaptionEnabled(_subtitlesEnabled.value);
              //     },
              //   );
              // },
            ),
          ),
        ),
      );
}


================================================
FILE: lib/core/state/exports.dart
================================================
export 'states.dart';
export 'value.dart';


================================================
FILE: lib/core/state/states.dart
================================================
enum States {
  waiting,
  processing,
  finished,
  failed,
}


================================================
FILE: lib/core/state/value.dart
================================================
import 'package:flutter/material.dart';
import 'states.dart';

class StatedValue<T> {
  StatedValue({
    this.state = States.waiting,
  });

  States state;
  late T value;
  Object? error;
  StackTrace? stackTrace;

  void _change(
    final States state, {
    final T? value,
    final Object? error,
    final StackTrace? stackTrace,
  }) {
    this.state = state;
    if (value != null) {
      this.value = value;
    }
    if (error != null) {
      this.error = error;
    }
    if (stackTrace != null) {
      this.stackTrace = stackTrace;
    }
  }

  void waiting([final T? value]) {
    _change(States.waiting, value: value);
  }

  void loading([final T? value]) {
    _change(States.processing, value: value);
  }

  void finish(final T value) {
    _change(States.finished, value: value);
  }

  void fail([
    final Object? error,
    final StackTrace? stackTrace,
  ]) {
    _change(States.failed, error: error, stackTrace: stackTrace);
  }

  bool get isWaiting => state == States.waiting;
  bool get isProcessing => state == States.processing;
  bool get hasFinished => state == States.finished;
  bool get hasFailed => state == States.failed;
  bool get hasFinishedOrFailed => hasFinished || hasFailed;
}

class ListenableStatedValue<T> extends StatedValue<T> with ChangeNotifier {
  @override
  void _change(
    final States state, {
    final T? value,
    final Object? error,
    final StackTrace? stackTrace,
  }) {
    super._change(state, value: value, error: error, stackTrace: stackTrace);
    notifyListeners();
  }
}


================================================
FILE: lib/core/tenka/exports.dart
================================================
export 'package:tenka/tenka.dart';
export 'manager.dart';
export 'utils.dart';


================================================
FILE: lib/core/tenka/manager.dart
================================================
import 'package:path/path.dart' as path;
import 'package:tenka/tenka.dart';
import '../database/exports.dart';
import '../paths.dart';

abstract class TenkaManager {
  static late final TenkaRepository repository;
  static final Map<String, dynamic> _extractors = <String, dynamic>{};

  static Future<void> initialize() async {
    await TenkaInternals.initialize(
      runtime: TenkaRuntimeOptions(
        http: TenkaRuntimeHttpClientOptions(
          ignoreSSLCertificate: SettingsDatabase.settings.ignoreSSLCertificate,
        ),
      ),
    );

    repository = TenkaRepository(
      resolver: const TenkaStoreURLResolver(),
      baseDir: path.join(Paths.docsDir.path, 'tenka'),
    );

    // await repository.initialize();
  }

  static Future<T> getExtractor<T>(final TenkaMetadata metadata) async {
    if (!_extractors.containsKey(metadata.id)) {
      final BeizeProgramConstant program = BeizeProgramConstant.deserialize(
        (metadata.source as TenkaBase64DS).data,
      );
      final TenkaRuntimeInstance runtime =
          await TenkaRuntimeManager.create(program);
      final T extractor;
      if (T is AnimeExtractor) {
        extractor = await runtime.getAnimeExtractor() as T;
      } else if (T is MangaExtractor) {
        extractor = await runtime.getMangaExtractor() as T;
      } else {
        throw UnsupportedError('Invalid extractor type: $T');
      }
      _extractors[metadata.id] = extractor;
    }

    return _extractors[metadata.id] as T;
  }
}


================================================
FILE: lib/core/tenka/utils.dart
================================================
import 'package:tenka/tenka.dart';
import '../translator/exports.dart';

extension TenkaTypeUtils on TenkaType {
  String getTitleCase(final Translation translation) => switch (this) {
        TenkaType.anime => translation.anime,
        TenkaType.manga => translation.manga,
      };
}


================================================
FILE: lib/core/themes/colors.dart
================================================
import 'package:flutter/material.dart';
import '../translator/exports.dart';

abstract class ForegroundColors {
  static const Color red = Color(0xffef4444);
  static const Color orange = Color(0xfff97316);
  static const Color amber = Color(0xfff59e0b);
  static const Color yellow = Color(0xffeab308);
  static const Color lime = Color(0xff84cc16);
  static const Color green = Color(0xff22c55e);
  static const Color emerald = Color(0xff10b981);
  static const Color teal = Color(0xff14b8a6);
  static const Color cyan = Color(0xff06b6d4);
  static const Color sky = Color(0xff0ea5e9);
  static const Color blue = Color(0xff3b82f6);
  static const Color indigo = Color(0xff6366f1);
  static const Color violet = Color(0xff8b5cf6);
  static const Color purple = Color(0xffa855f7);
  static const Color fuchsia = Color(0xffd946ef);
  static const Color pink = Color(0xffec4899);
  static const Color rose = Color(0xfff43f5e);

  static const Map<String, Color> colors = <String, Color>{
    'red': red,
    'orange': orange,
    'amber': amber,
    'yellow': yellow,
    'lime': lime,
    'green': green,
    'emerald': emerald,
    'teal': teal,
    'cyan': cyan,
    'sky': sky,
    'blue': blue,
    'indigo': indigo,
    'violet': violet,
    'purple': purple,
    'fuchsia': fuchsia,
    'pink': pink,
    'rose': rose,
  };

  static Color? find(final String name) => colors[name];

  static List<String> names() => colors.keys.toList();

  static String getTitleCase(
    final Translation translation,
    final String name,
  ) =>
      switch (name) {
        'red' => translation.red,
        'orange' => translation.orange,
        'amber' => translation.amber,
        'yellow' => translation.yellow,
        'lime' => translation.lime,
        'green' => translation.green,
        'emerald' => translation.emerald,
        'teal' => translation.teal,
        'cyan' => translation.cyan,
        'sky' => translation.sky,
        'blue' => translation.blue,
        'indigo' => translation.indigo,
        'violet' => translation.violet,
        'purple' => translation.purple,
        'fuchsia' => translation.fuchsia,
        'pink' => translation.pink,
        'rose' => translation.rose,
        _ => name,
      };
}


================================================
FILE: lib/core/themes/exports.dart
================================================
export 'colors.dart';
export 'fonts.dart';


================================================
FILE: lib/core/themes/fonts.dart
================================================
abstract class Fonts {
  static const String inter = 'Inter';
  static const String greatVibes = 'GreatVibes';
}


================================================
FILE: lib/core/translator/exports.dart
================================================
export 'translator.dart';


================================================
FILE: lib/core/translator/translator.dart
================================================
import 'dart:convert';
import 'package:flutter/services.dart' show rootBundle;
import 'package:utilx/locale.dart';
import 'package:utilx/utilx.dart';
import '../app/exports.dart';
import '../database/exports.dart';

part 'translation.g.dart';

abstract class Translator {
  static const Locale defaultLocale = LocalesRepository.en;

  static late Translation currentTranslation;

  static Future<void> initialize() async {
    await updateCurrentTranslation();

    AppEvents.stream.listen((final AppEvent event) async {
      if (event != AppEvent.settingsChange) return;
      await updateCurrentTranslation();
    });
  }

  static Future<void> updateCurrentTranslation() async {
    final Locale? settingsLocale = SettingsDatabase.settings.locale;
    final Locale locale =
        settingsLocale != null && hasTranslation(settingsLocale)
            ? settingsLocale
            : defaultLocale;
    currentTranslation = await parseTranslation(locale);
    AppEvents.controller.add(AppEvent.translationsChange);
  }

  static bool hasTranslation(final Locale locale) =>
      Translation.availableLocales.contains(locale.code);

  static Future<Translation> parseTranslation(final Locale locale) async {
    final String content =
        await rootBundle.loadString('assets/translations/${locale.code}.json');
    final JsonMap parsed = json.decode(content) as JsonMap;
    return Translation(parsed);
  }

  static Locale get locale => currentTranslation.locale;

  static String get identifier => locale.code;
}


================================================
FILE: lib/core/utils/dates.dart
================================================
abstract class PrettyDates {
  static String constructDateString({
    required final String day,
    required final String month,
    required final String year,
  }) =>
      '$day-$month-$year';

  static String toDateString(final DateTime date) => constructDateString(
        day: date.day.toString(),
        month: date.month.toString(),
        year: date.year.toString(),
      );
}


================================================
FILE: lib/core/utils/durations.dart
================================================
import '../translator/exports.dart';

abstract class PrettyDurations {
  static String prettyHoursMinutesShort(
    final Translation translation,
    final Duration duration,
  ) {
    final int hours = duration.inHours;
    final int mins = duration.inMinutes.remainder(60);
    if (hours == 0) return translation.nMins(mins.toString());
    return translation.nHrsOMins(hours.toString(), mins.toString());
  }
}


================================================
FILE: lib/core/utils/exports.dart
================================================
export 'package:collection/collection.dart';
export 'package:utilx/locale.dart';
export 'package:utilx/utilx.dart';
export 'dates.dart';
export 'durations.dart';
export 'provider.dart';


================================================
FILE: lib/core/utils/kawaii_faces.dart
================================================
// ? Source: https://kawaiiface.net (how pensive)
abstract class KawaiiFaces {
  static const List<String> sad = <String>[
    'ಥ_ಥ',
    '(-’๏_๏’-)',
    '˚⌇˚',
    'o(╥﹏╥)o',
    '(⊙﹏⊙✿)',
    '●︿●',
    '( /)w(\\✿)',
    '(╯︵╰,)',
    '(︶︹︺)',
    '(◡﹏◡✿)',
    '(✖﹏✖)',
    '‘︿’',
    'v( ‘.’ )v',
    '◄.►',
    '(ㄒoㄒ)',
    '⊙︿⊙',
    '(◕︿◕✿)',
    'ਉ_ਉ',
    '┐(‘~`;)┌',
    '(︶︹︺)',
    '흫_흫',
    'ب_ب',
    '╮(─▽─)╭',
    'ಥ‿ಥ',
    '(-’_’-)',
    '(╥╥)',
    '(•̪●)',
    '(∩︵∩)',
    '(o_-)',
    '(。-_-。)',
    '(╯_╰)',
    '(╥_╥)',
    'v(ಥ ̯ ಥ)v',
    "<('.'<)",
    'ಠ,ಥ',
    '(◕︵◕)',
    '(´ヘ`()',
    '(✖╭╮✖)',
    '(◕﹏◕✿)',
    '(+_+)',
    '★~(◠︿◕✿)',
    '(*´д`*)',
    '(◡△◡✿)',
    '٩(×̯×)۶',
    '(ノ_・。)',
    '┐(‘~`;)┌',
    '(つд`)',
    '(✖╭╮✖)',
    'ಥ⌣ಥ',
    'இ_இ',
    '✖‿✖',
  ];

  static const List<String> happy = <String>[
    '(◕‿◕✿)',
    '(◠‿◠✿)',
    '(◠﹏◠✿)',
    '(*^U^)人(≧V≦*)/',
    'ôヮô',
    '∧( ‘Θ’ )∧',
    '(¤﹏¤)',
    '●‿●',
    'ʕ·ᴥ·ʔ',
    '\(^○^)人(^○^)/',
    'ヾ(@⌒▽⌒@)ノ',
    '(°∀°)',
    'ヾ| ̄ー ̄|ノ',
    '(☉‿☉✿)',
    '┏(^0^)┛┗(^0^) ┓',
    '(◡‿◡✿)',
    '✿◕ ‿ ◕✿',
    'ヽ(‘ ∇‘ )ノ',
    '☆(❁‿❁)☆',
    '❀◕ ‿ ◕❀',
    'ヽ(^◇^*)/',
    '(•⊙ω⊙•)',
    '!⑈ˆ~ˆ!⑈',
    '(*^ -^*)',
    '(⊙‿⊙✿)',
    '◕3◕',
    '(゚ヮ゚)',
    '¢‿¢',
    'ヅ',
    '●ᴥ●',
    '(∪ ◡ ∪)',
    '≖‿≖',
    '≧◡≦',
    '٩◔‿◔۶',
    '。◕ ‿ ◕。',
    'ヾ(@^▽^@)ノ',
    '◃┆◉◡◉┆▷',
    '(✿◠‿◠)',
    '( ̄ー ̄)',
    '╰(◡‿◡✿╰)',
    '~,~',
    '(ノ◕ヮ◕)ノ*:・゚✧',
    '(*~▽~)',
    '❀‿❀',
    '◕‿◕',
    '(^L^)',
    '(^▽^)',
    '◕ ◡ ◕',
    '(◕‿◕✿)',
    '( ;´Д`)',
    '⊙﹏⊙',
    '✿。✿',
    'ヽ(゜∇゜)ノ',
    '。(✿‿✿)。',
    '(´ー`)',
    'ツ',
    'q(❂‿❂)p',
    '( ́ ◕◞ε◟◕`)',
    '☆(◒‿◒)☆',
    '(∩▂∩)',
    '(¬‿¬)',
    '(^O^)',
    'ʘ‿ʘ',
    '(’◎’)',
    '(◜௰◝)',
    '(^ー^)',
    '(o´ω`o)',
    '(^з^)-☆',
    '(◕ω◕✿)',
    '(づ。◕‿‿◕。)づ',
    '(゚▽^*)',
    '(⌒o⌒)',
    '(。◕‿◕。)',
    'ت',
    '(. ゚ー゚)',
    '१˚◡˚५',
    '\(●~▽~●)',
    '(*˘︶˘*)',
    '(✪㉨✪)',
    '(ᅌᴗᅌ* )',
    '^L^',
    '(\\/) (°„°) (\\/)',
    '\(*^▽^*)/',
    '(◠△◠✿)',
    '( ಠ◡ಠ )',
    '(〃^∇^)ノ',
    '^^',
    '|◔◡◉|',
    '(●⌒∇⌒●)',
    '⊂◉‿◉つ',
    '.ʕʘ‿ʘʔ.',
    '(*・∀・*)人(*・∀・*)',
    '\(^-^)/',
    '∩(︶▽︶)∩',
    '(☉∀☉)',
    '(´ω`)',
    '●﹏●',
    '( ´∀`)☆',
    '•ᴥ•',
    '✿◕ ‿ ◕✿',
    '(≧◡≦)',
    '(◡‿◡✿)',
    '(・ェ-)',
    '^‿^',
    '٩(̾●̮̮̃̾•̃̾)۶',
    '≖‿≖',
    '(⊙ω⊙✿)',
    '٩(-̮̮̃•̃)',
    '(´・ω・`)',
    '◤(¬‿¬)◥',
    '^.^',
    '(•‿•)',
    '(^⊆^)',
    "^( '‿' )^",
    '☆d(o⌒∇⌒o)b',
    '∑(゜Д゜;)',
    '(▰˘◡˘▰)',
    '(• ε •)',
    '( ͡° ͜ʖ ͡°)',
    '(\\/) (°,,°) (\\/)',
    '( ̄(エ) ̄)',
    '{◕ ◡ ◕}',
    '(>‘o’)>',
    'シ',
    '(❀‿❀)',
    '< (^^,) >',
    'ヾ(●⌒∇⌒●)ノ',
    '( ´∀`)',
    '☾˙❀‿❀˙☽',
    '°٢°',
    '^o^',
    '(=゚ω゚)ノ',
    '٩(●̮̮̃•̃)۶',
    '(☞゚∀゚)☞',
    '(=゜ω゜)',
    '(。✿‿✿。)',
    'ó‿ó',
    '◎[‿]◎',
    '(▰˘◡˘▰)',
    '(︶ω︶)',
    '(ノ◕ヮ◕)ノ*:・゚✧',
    '(◠ω◠✿)',
    '٩(^‿^)۶',
    '(●*∩_∩*●)',
    '٩(-̮̮̃-̃)۶',
    '<丶´Д`>',
    '(✿◠‿◠)',
    'ヽ(´▽`)ノ',
    '(°⌣°)',
    '☆(❁‿❁)☆',
    '(० ्०)',
    '٩(-̮̮̃•̃)۶',
    '(╹ェ╹)',
    'ᵔᴥᵔ',
    '•(_)•',
    'ヽ( ´ ∇ ` )ノ',
    '(ミ ̄ー ̄ミ)',
    '(─‿‿─)',
    '~(^з^)-',
    '(*≗*)',
    '~(^з^)-',
    '(´・ω・`)',
    '(。◕‿◕。)',
    '.=^.^=',
    '(◠︿◠✿)',
    'ッ',
    '(`・ω・´)',
    '´ ▽ ` )ノ',
    '(´∀`)',
    '(◑‿◐)',
    'ヽ(゚ー゚*ヽ)ヽ(*゚ー゚*)ノ(ノ*゚ー゚)ノ',
    '˚ᆺ˚',
    'ヽ(〃^▽^〃)ノ',
    '。◕‿◕。',
    '❀◕ ‿ ◕❀',
    '( °٢° )',
    'Ü',
    '(●´ω`●)',
    "<('o'<)",
    '◕‿◕',
    'ᵔᴥᵔ',
    '◙‿◙',
  ];
}


================================================
FILE: lib/core/utils/provider.dart
================================================
import 'package:flutter/material.dart';

class StatedChangeNotifier extends ChangeNotifier {
  bool mounted = true;

  @override
  void dispose() {
    mounted = false;

    super.dispose();
  }
}


================================================
FILE: lib/main.dart
================================================
import 'package:flutter/material.dart';
import 'package:kazahana/ui/exports.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const BaseApp());
}


================================================
FILE: lib/ui/base.dart
================================================
import 'package:kazahana/core/exports.dart';
import 'exports.dart';

class BaseApp extends StatefulWidget {
  const BaseApp({
    super.key,
  });

  @override
  State<BaseApp> createState() => _BaseAppState();
}

class _BaseAppState extends State<BaseApp> {
  late ThemerThemeData theme;
  late double scaleMultiplier;
  late String translationId;

  @override
  void initState() {
    super.initState();
    theme = Themer.defaultTheme();
    scaleMultiplier = RelativeScaleData.defaultScaleMultiplier;
    translationId = '';
    AppEvents.stream.listen((final AppEvent event) {
      if (event == AppEvent.settingsChange) {
        final ThemerThemeData nTheme = Themer.getCurrentTheme();
        if (theme != nTheme) {
          setState(() {
            theme = nTheme;
          });
        }
        final double nScaleMultiplier = RelativeScaleData.getScaleMultiplier();
        if (scaleMultiplier != nScaleMultiplier) {
          setState(() {
            scaleMultiplier = nScaleMultiplier;
          });
        }
      }
      if (event == AppEvent.translationsChange) {
        final String nTranslationId = Translator.identifier;
        if (translationId != nTranslationId) {
          setState(() {
            translationId = nTranslationId;
          });
        }
      }
    });
  }

  @override
  Widget build(final BuildContext context) => MaterialApp(
        title: AppMeta.name,
        navigatorKey: gNavigatorKey,
        debugShowCheckedModeBanner: false,
        builder: (
          final BuildContext context,
          final Widget? child,
        ) =>
            RelativeScaler(
          data: RelativeScaleData(
            multiplier: scaleMultiplier,
            screen: RelativeScaleData.getScreenSize(context),
          ),
          child: TranslationWrapper(
            id: translationId,
            child: Builder(
              builder: (final BuildContext context) => Theme(
                data: theme.getThemeData(context),
                child: Builder(
                  builder: (final BuildContext context) =>
                      ClassicWrapper(child: child!),
                ),
              ),
            ),
          ),
        ),
        onGenerateRoute: (final RouteSettings settings) {
          final RouteInfo route = RouteInfo(settings);
          final RoutePage? page = RoutePages.findMatch(route);
          if (page == null) return null;
          return page.buildRoutePage(route);
        },
      );
}

class ClassicWrapper extends StatelessWidget {
  const ClassicWrapper({
    required this.child,
    super.key,
  });

  final Widget child;

  @override
  Widget build(final BuildContext context) =>
      Stack(children: <Widget>[child, const SuperImposer()]);
}


================================================
FILE: lib/ui/components/anilist/exports.dart
================================================
export 'media_row.dart';
export 'media_slide.dart';
export 'media_tile.dart';


================================================
FILE: lib/ui/components/anilist/media_row.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';

class AnilistMediaRow extends StatelessWidget {
  const AnilistMediaRow(
    this.results, {
    super.key,
  });

  final List<AnilistMedia> results;

  @override
  Widget build(final BuildContext context) => ScrollableRow(
        results
            .map(
              (final AnilistMedia x) => SizedBox(
                width: getTileWidth(context.r),
                child: AnilistMediaTile(x),
              ),
            )
            .toList(),
      );

  static const double tileWidthAny = 8;
  static const double tileWidthMd = 9;

  static double getTileWidth(final RelativeScaler r) =>
      r.scale(tileWidthAny, md: tileWidthMd);
}


================================================
FILE: lib/ui/components/anilist/media_slide.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';

class AnilistMediaSlide extends StatefulWidget {
  const AnilistMediaSlide(
    this.media, {
    super.key,
  });

  final AnilistMedia media;

  @override
  State<AnilistMediaSlide> createState() => _AnilistMediaSlideState();
}

class _AnilistMediaSlideState extends State<AnilistMediaSlide>
    with AutomaticKeepAliveClientMixin {
  Widget buildThumbnail(final BuildContext context) => ClipRRect(
        borderRadius: BorderRadius.circular(context.r.scale(1)),
        child: AspectRatio(
          aspectRatio: AnilistMediaTile.coverRatio,
          child: FadeInImage(
            placeholder: MemoryImage(Placeholders.transparent1x1Image),
            image: NetworkImage(widget.media.coverImageExtraLarge),
            fit: BoxFit.cover,
          ),
        ),
      );

  Widget buildContent(final BuildContext context) => Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: <Widget>[
          Wrap(
            spacing: context.r.scale(0.25),
            runSpacing: context.r.scale(0.2),
            alignment: WrapAlignment.center,
            children: <Widget>[
              AnilistMediaTile.buildFormatChip(
                context: context,
                media: widget.media,
              ),
              AnilistMediaTile.buildWatchtimeChip(
                context: context,
                media: widget.media,
              ),
              if (widget.media.averageScore != null)
                AnilistMediaTile.buildRatingChip(
                  context: context,
                  media: widget.media,
                ),
              if (widget.media.startDate != null ||
                  widget.media.endDate != null)
                AnilistMediaTile.buildAirdateChip(
                  context: context,
                  media: widget.media,
                ),
              if (widget.media.isAdult)
                AnilistMediaTile.buildNSFWChip(
                  context: context,
                  media: widget.media,
                ),
            ],
          ),
          SizedBox(height: context.r.scale(0.5)),
          Text(
            widget.media.titleUserPreferred,
            style: context.r
                .responsive(
                  Theme.of(context).textTheme.titleLarge,
                  md: Theme.of(context).textTheme.headlineSmall,
                )!
                .copyWith(fontWeight: FontWeight.bold),
          ),
          SizedBox(height: context.r.scale(0.25)),
          if (widget.media.description != null)
            Text(
              widget.media.description!,
              maxLines: 5,
              overflow: TextOverflow.ellipsis,
            ),
        ],
      );

  @override
  Widget build(final BuildContext context) {
    super.build(context);
    return Stack(
      children: <Widget>[
        Container(color: Theme.of(context).bottomAppBarTheme.color),
        Positioned.fill(
          child: FadeInImage(
            placeholder: MemoryImage(Placeholders.transparent1x1Image),
            image: NetworkImage(
              widget.media.bannerImage ?? widget.media.coverImageExtraLarge,
            ),
            fit: BoxFit.cover,
          ),
        ),
        if (widget.media.bannerImage == null)
          ClipRRect(
            child: BackdropFilter(
              filter: ImageFilter.blur(sigmaX: 4, sigmaY: 4),
              child: const SizedBox.expand(),
            ),
          ),
        Positioned.fill(
          child: Material(
            type: MaterialType.transparency,
            child: InkWell(
              child: DecoratedBox(
                decoration: BoxDecoration(
                  gradient: LinearGradient(
                    begin: Alignment.topCenter,
                    end: Alignment.bottomCenter,
                    colors: <Color>[
                      Theme.of(context)
                          .colorScheme
                          .background
                          .withOpacity(0.25),
                      Theme.of(context)
                          .colorScheme
                          .background
                          .withOpacity(0.75),
                    ],
                  ),
                ),
              ),
              onTap: () {
                Navigator.of(context)
                    .pusher
                    .pushToViewPageFromMedia(widget.media);
              },
            ),
          ),
        ),
        Align(
          alignment: Alignment.bottomLeft,
          child: IgnorePointer(
            child: Padding(
              padding: EdgeInsets.all(context.r.scale(1)),
              child: context.r.responsiveBuilder(
                () => Column(
                  mainAxisSize: MainAxisSize.min,
                  mainAxisAlignment: MainAxisAlignment.end,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: <Widget>[
                    Expanded(
                      child: buildThumbnail(context),
                    ),
                    SizedBox(height: context.r.scale(1)),
                    buildContent(context),
                  ],
                ),
                md: () => Row(
                  children: <Widget>[
                    buildThumbnail(context),
                    SizedBox(width: context.r.scale(1.5)),
                    Expanded(
                      child: Column(
                        mainAxisAlignment: MainAxisAlignment.end,
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: <Widget>[
                          buildContent(context),
                        ],
                      ),
                    ),
                  ],
                ),
              ),
            ),
          ),
        ),
      ],
    );
  }

  @override
  bool get wantKeepAlive => true;
}


================================================
FILE: lib/ui/components/anilist/media_tile.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';

class AnilistMediaTile extends StatelessWidget {
  const AnilistMediaTile(
    this.media, {
    this.additionalBottomChips = const <Widget>[],
    super.key,
  });

  final AnilistMedia media;
  final List<Widget> additionalBottomChips;

  @override
  Widget build(final BuildContext context) => InkWell(
        onTap: () {
          Navigator.of(context).pusher.pushToViewPageFromMedia(media);
        },
        borderRadius: BorderRadius.circular(context.r.scale(0.5)),
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            ClipRRect(
              borderRadius: BorderRadius.circular(context.r.scale(0.5)),
              child: AspectRatio(
                aspectRatio: coverRatio,
                child: Stack(
                  children: <Widget>[
                    Positioned.fill(
                      child: Container(
                        color: Theme.of(context).bottomAppBarTheme.color,
                      ),
                    ),
                    Positioned.fill(
                      child: Image.network(
                        media.coverImageExtraLarge,
                        fit: BoxFit.cover,
                      ),
                    ),
                    Align(
                      alignment: Alignment.bottomRight,
                      child: Padding(
                        padding: EdgeInsets.all(context.r.scale(0.25)),
                        child: Column(
                          mainAxisAlignment: MainAxisAlignment.end,
                          crossAxisAlignment: CrossAxisAlignment.end,
                          children: ListUtils.insertBetween(
                            <Widget>[
                              if (media.averageScore != null)
                                buildRatingChip(
                                  context: context,
                                  media: media,
                                ),
                              buildWatchtimeChip(
                                context: context,
                                media: media,
                              ),
                              buildFormatChip(
                                context: context,
                                media: media,
                              ),
                              if (media.isAdult)
                                AnilistMediaTile.buildNSFWChip(
                                  context: context,
                                  media: media,
                                ),
                              ...additionalBottomChips,
                            ],
                            SizedBox(height: context.r.scale(0.2)),
                          ),
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            ),
            SizedBox(height: context.r.scale(0.5)),
            Flexible(
              child: Text(
                media.titleUserPreferred,
                style: Theme.of(context).textTheme.bodyMedium,
                textAlign: TextAlign.center,
              ),
            ),
            SizedBox(height: context.r.scale(0.25)),
          ],
        ),
      );

  static const double coverRatio = 5 / 8;

  static Widget buildChip({
    required final BuildContext context,
    required final Widget child,
    final Widget? icon,
    final Color? backgroundColor,
    final Color? textColor,
  }) =>
      DecoratedBox(
        decoration: BoxDecoration(
          color: backgroundColor ?? Theme.of(context).colorScheme.background,
          borderRadius: BorderRadius.circular(context.r.scale(0.3)),
        ),
        child: Padding(
          padding: EdgeInsets.only(
            top: context.r.scale(0.05),
            bottom: context.r.scale(0.1),
            left: context.r.scale(0.25),
            right: context.r.scale(0.25),
          ),
          child: DefaultTextStyle(
            style: Theme.of(context).textTheme.labelLarge!.copyWith(
                  fontWeight: FontWeight.normal,
                  color:
                      textColor ?? Theme.of(context).colorScheme.onBackground,
                ),
            child: Row(
              mainAxisSize: MainAxisSize.min,
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                if (icon != null) ...<Widget>[
                  IconTheme(
                    data: Theme.of(context)
                        .iconTheme
                        .copyWith(size: context.r.scale(1)),
                    child: icon,
                  ),
                  SizedBox(width: context.r.scale(0.25)),
                ],
                child,
              ],
            ),
          ),
        ),
      );

  static Widget buildFormatChip({
    required final BuildContext context,
    required final AnilistMedia media,
    final Color? backgroundColor,
    final Color? textColor,
  }) =>
      AnilistMediaTile.buildChip(
        context: context,
        icon: media.status == AnilistMediaStatus.releasing
            ? AnilistMediaTile.ongoingIcon
            : null,
        child: Text(media.format.getTitleCase(context.t)),
        backgroundColor: backgroundColor,
        textColor: textColor,
      );

  static Widget buildWatchtimeChip({
    required final BuildContext context,
    required final AnilistMedia media,
    final Color? backgroundColor,
    final Color? textColor,
  }) =>
      AnilistMediaTile.buildChip(
        context: context,
        child: Text(media.getWatchtime(context.t)),
        backgroundColor: backgroundColor,
        textColor: textColor,
      );

  static Widget buildRatingChip({
    required final BuildContext context,
    required final AnilistMedia media,
    final Color? backgroundColor,
    final Color? textColor,
  }) =>
      AnilistMediaTile.buildChip(
        context: context,
        icon: AnilistMediaTile.ratingIcon,
        child: Text('${media.averageScore}%'),
        backgroundColor: backgroundColor,
        textColor: textColor,
      );

  static Widget buildAirdateChip({
    required final BuildContext context,
    required final AnilistMedia media,
    final Color? backgroundColor,
    final Color? textColor,
  }) =>
      AnilistMediaTile.buildChip(
        context: context,
        icon: airdateIcon,
        child: Text(media.airdate),
        backgroundColor: backgroundColor,
        textColor: textColor,
      );

  static Widget buildNSFWChip({
    required final BuildContext context,
    required final AnilistMedia media,
  }) =>
      AnilistMediaTile.buildChip(
        context: context,
        backgroundColor: ForegroundColors.red,
        child: Text(context.t.nsfw),
      );

  static const Icon ratingIcon = Icon(
    Icons.star_rounded,
    color: ForegroundColors.yellow,
  );

  static const Icon ongoingIcon = Icon(
    Icons.fiber_manual_record_outlined,
    color: ForegroundColors.green,
  );

  static const Icon airdateIcon = Icon(
    Icons.date_range_rounded,
    color: ForegroundColors.fuchsia,
  );
}


================================================
FILE: lib/ui/components/body_padding.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../exports.dart';

class HorizontalBodyPadding extends StatelessWidget {
  const HorizontalBodyPadding(
    this.child, {
    super.key,
  });

  final Widget child;

  @override
  Widget build(final BuildContext context) =>
      Padding(padding: padding(context), child: child);

  static const double paddingAny = 0.75;
  static const double paddingMd = 1;

  static double paddingValue(final BuildContext context) =>
      context.r.scale(paddingAny, md: paddingMd);

  static EdgeInsets padding(final BuildContext context) =>
      EdgeInsets.symmetric(horizontal: paddingValue(context));
}


================================================
FILE: lib/ui/components/cross_draggable_scroll_behaviour.dart
================================================
import 'dart:ui';
import 'package:kazahana/core/exports.dart';

class DraggableScrollBehavior extends MaterialScrollBehavior {
  @override
  Set<PointerDeviceKind> get dragDevices => <PointerDeviceKind>{
        PointerDeviceKind.touch,
        PointerDeviceKind.mouse,
      };
}

class DraggableScrollConfiguration extends StatelessWidget {
  const DraggableScrollConfiguration({
    required this.child,
    super.key,
  });

  final Widget child;

  @override
  Widget build(final BuildContext context) => ScrollConfiguration(
        behavior: DraggableScrollBehavior(),
        child: child,
      );
}


================================================
FILE: lib/ui/components/exports.dart
================================================
export 'anilist/exports.dart';
export 'body_padding.dart';
export 'cross_draggable_scroll_behaviour.dart';
export 'rounded_back_button.dart';
export 'scrollable_row.dart';
export 'slideshow.dart';
export 'stated_builder.dart';
export 'super_imposer.dart';
export 'toast.dart';


================================================
FILE: lib/ui/components/kawaii_face.dart
================================================
import 'package:kazahana/core/exports.dart';

class KawaiiFace extends StatelessWidget {
  const KawaiiFace({
    required this.face,
    this.text,
    this.child,
    super.key,
  }) : assert(text != null || child != null);

  final String face;
  final String? text;
  final InlineSpan? child;

  @override
  Widget build(final BuildContext context) => RichText(
        text: TextSpan(
          children: <InlineSpan>[
            TextSpan(text: face),
            if (text != null) TextSpan(text: text),
            if (child != null) child!,
          ],
        ),
        textAlign: TextAlign.center,
      );
}


================================================
FILE: lib/ui/components/rounded_back_button.dart
================================================
import 'package:kazahana/core/exports.dart';

class RoundedBackButton extends StatelessWidget {
  const RoundedBackButton({
    super.key,
  });

  @override
  Widget build(final BuildContext context) => IconButton(
        icon: const Icon(Icons.arrow_back_rounded),
        onPressed: () {
          Navigator.maybePop(context);
        },
      );
}


================================================
FILE: lib/ui/components/scrollable_row.dart
================================================
import 'package:kazahana/core/exports.dart';
import 'package:kazahana/ui/components/exports.dart';
import 'body_padding.dart';

class ScrollableRow extends StatefulWidget {
  const ScrollableRow(
    this.children, {
    super.key,
  });

  final List<Widget> children;

  @override
  State<ScrollableRow> createState() => _ScrollableRowState();
}

class _ScrollableRowState extends State<ScrollableRow> {
  late final ScrollController scrollController;

  @override
  void initState() {
    super.initState();
    scrollController = ScrollController();
  }

  @override
  void dispose() {
    super.dispose();
    scrollController.dispose();
  }

  SizedBox buildSpacer(final BuildContext context) =>
      SizedBox(width: HorizontalBodyPadding.paddingValue(context));

  @override
  Widget build(final BuildContext context) => DraggableScrollConfiguration(
        child: SingleChildScrollView(
          controller: scrollController,
          scrollDirection: Axis.horizontal,
          child: Row(
            mainAxisSize: MainAxisSize.min,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: <Widget>[
              buildSpacer(context),
              ...ListUtils.insertBetween(
                widget.children,
                buildSpacer(context),
              ),
              buildSpacer(context),
            ],
          ),
        ),
      );
}


================================================
FILE: lib/ui/components/slideshow.dart
================================================
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:kazahana/ui/components/exports.dart';

class Slideshow extends StatefulWidget {
  const Slideshow({
    required this.children,
    required this.slideDuration,
    required this.animationDuration,
    super.key,
  });

  final List<Widget> children;
  final Duration slideDuration;
  final Duration animationDuration;

  @override
  State<Slideshow> createState() => _SlideshowState();
}

class _SlideshowState extends State<Slideshow>
    with SingleTickerProviderStateMixin {
  late final TabController tabController;
  Timer? timer;
  bool isDragged = false;

  @override
  void initState() {
    super.initState();
    tabController = TabController(
      length: widget.children.length,
      vsync: this,
    );
    scheduleSlideChange();
  }

  @override
  void dispose() {
    super.dispose();
    timer?.cancel();
    tabController.dispose();
  }

  void scheduleSlideChange() {
    timer = Timer(widget.slideDuration, () {
      if (!isDragged) {
        final int nextIndex =
            currentIndex + 1 < widget.children.length ? currentIndex + 1 : 0;
        tabController.animateTo(nextIndex, duration: widget.animationDuration);
      }
      scheduleSlideChange();
    });
  }

  @override
  Widget build(final BuildContext context) => DraggableScrollConfiguration(
        child: NotificationListener<ScrollNotification>(
          onNotification: (final ScrollNotification x) {
            if (x is ScrollStartNotification) {
              isDragged = true;
            } else if (x is ScrollEndNotification) {
              isDragged = false;
            }
            return false;
          },
          child: TabBarView(
            controller: tabController,
            children: widget.children,
          ),
        ),
      );

  int get currentIndex => tabController.index;
}


================================================
FILE: lib/ui/components/stated_builder.dart
================================================
import 'package:kazahana/core/exports.dart';

class StatedBuilder extends StatelessWidget {
  const StatedBuilder(
    this.state, {
    required this.waiting,
    required this.processing,
    required this.finished,
    required this.failed,
    super.key,
  });

  final States state;
  final WidgetBuilder waiting;
  final WidgetBuilder processing;
  final WidgetBuilder finished;
  final WidgetBuilder failed;

  @override
  Widget build(final BuildContext context) {
    if (state == States.waiting) return waiting(context);
    if (state == States.processing) return processing(context);
    if (state == States.finished) return finished(context);
    return failed(context);
  }
}


================================================
FILE: lib/ui/components/super_imposer.dart
================================================
import 'dart:async';
import 'package:kazahana/core/exports.dart';

class SuperImposerEntry {
  const SuperImposerEntry._({
    required this.id,
    required this.builder,
  });

  factory SuperImposerEntry.create(final WidgetBuilder builder) =>
      SuperImposerEntry._(id: StringUtils.random(), builder: builder);

  final String id;
  final WidgetBuilder builder;
}

class SuperImposer extends StatefulWidget {
  const SuperImposer({
    super.key,
  });

  @override
  State<SuperImposer> createState() => _SuperImposerState();

  static final Map<String, SuperImposerEntry> entries =
      <String, SuperImposerEntry>{};

  static final StreamController<void> onChangeController =
      StreamController<void>.broadcast();

  static final Stream<void> onChange = onChangeController.stream;

  static void insert(final SuperImposerEntry entry) {
    entries[entry.id] = entry;
    onChangeController.add(null);
  }

  static void remove(final SuperImposerEntry entry) {
    entries.remove(entry.id);
    onChangeController.add(null);
  }
}

class _SuperImposerState extends State<SuperImposer> {
  StreamSubscription<void>? subscription;

  @override
  void initState() {
    super.initState();
    subscription = SuperImposer.onChange.listen((final _) {
      if (!mounted) return;
      setState(() {});
    });
  }

  @override
  void dispose() {
    subscription?.cancel();

    super.dispose();
  }

  @override
  Widget build(final BuildContext context) => Stack(
        children: SuperImposer.entries.values
            .map((final SuperImposerEntry x) => x.builder(context))
            .toList(),
      );
}


================================================
FILE: lib/ui/components/toast.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../utils/exports.dart';
import 'super_imposer.dart';

class Toast extends StatefulWidget {
  const Toast({
    required this.content,
    this.duration = defaultToastDuration,
    this.animationDuration,
    super.key,
  });

  final Widget content;
  final Duration duration;
  final Duration? animationDuration;

  @override
  State<Toast> createState() => _ToastState();

  Future<void> show() async => showToast(this);

  Duration get resolvedAnimationDuration =>
      animationDuration ?? AnimationDurations.defaultNormalAnimation;

  static const Duration defaultToastDuration = Duration(seconds: 3);

  static Future<void> showToast(final Toast toast) async {
    final SuperImposerEntry entry = SuperImposerEntry.create(
      (final _) => Align(
        alignment: Alignment.bottomCenter,
        child: toast,
      ),
    );
    SuperImposer.insert(entry);
    await Future<void>.delayed(
      toast.duration + (toast.resolvedAnimationDuration * 2),
    );
    SuperImposer.remove(entry);
  }
}

class _ToastState extends State<Toast> {
  bool visible = false;

  @override
  void initState() {
    super.initState();
    Future<void>.microtask(() async {
      setState(() {
        visible = true;
      });
      await Future<void>.delayed(widget.duration);
      if (!mounted) return;
      setState(() {
        visible = false;
      });
    });
  }

  @override
  Widget build(final BuildContext context) => AnimatedSwitcher(
        duration: widget.resolvedAnimationDuration,
        transitionBuilder:
            (final Widget child, final Animation<double> animation) =>
                FadeScaleTransition(animation: animation, child: child),
        child: visible
            ? Padding(
                padding: EdgeInsets.all(context.r.scale(0.4)),
                child: SizedBox(
                  width: double.infinity,
                  child: Material(
                    color: Colors.transparent,
                    child: DecoratedBox(
                      decoration: BoxDecoration(
                        color: Theme.of(context).bottomAppBarTheme.color,
                        borderRadius:
                            BorderRadius.circular(context.r.scale(0.25)),
                      ),
                      child: Padding(
                        padding: EdgeInsets.all(context.r.scale(0.5)),
                        child: Row(
                          children: <Widget>[
                            widget.content,
                          ],
                        ),
                      ),
                    ),
                  ),
                ),
              )
            : const SizedBox.shrink(),
      );
}


================================================
FILE: lib/ui/exports.dart
================================================
export 'base.dart';
export 'components/exports.dart';
export 'keys.dart';
export 'router/exports.dart';
export 'utils/exports.dart';


================================================
FILE: lib/ui/keys.dart
================================================
import 'package:kazahana/core/exports.dart';

final GlobalKey<NavigatorState> gNavigatorKey = GlobalKey<NavigatorState>();


================================================
FILE: lib/ui/pages/_home/components/appbar.dart
================================================
import 'dart:async';
import 'package:kazahana/core/exports.dart';
import '../../../exports.dart';

class UnderScoreHomePageAppBar extends StatefulWidget
    implements PreferredSizeWidget {
  const UnderScoreHomePageAppBar({
    super.key,
  });

  @override
  State<UnderScoreHomePageAppBar> createState() =>
      _UnderScoreHomePageAppBarState();

  @override
  Size get preferredSize => const Size.fromHeight(kToolbarHeight);
}

class _UnderScoreHomePageAppBarState extends State<UnderScoreHomePageAppBar> {
  StreamSubscription<AppEvent>? appEventSubscription;

  @override
  void initState() {
    super.initState();
    appEventSubscription = AppEvents.stream.listen((final AppEvent event) {
      if (event != AppEvent.anilistStateChange) return;
      setState(() {});
    });
  }

  @override
  void dispose() {
    super.dispose();
    appEventSubscription?.cancel();
  }

  @override
  Widget build(final BuildContext context) => AppBar(
        centerTitle: true,
        title: Text(
          AppMeta.name,
          style: Theme.of(context).textTheme.headlineSmall!.copyWith(
                fontFamily: Fonts.greatVibes,
                color: Theme.of(context).textTheme.bodyLarge?.color,
              ),
        ),
        actions: <Widget>[
          Row(
            children: <Widget>[
              InkWell(
                child: Padding(
                  padding: EdgeInsets.all(context.r.scale(0.5)),
                  child: AnilistAuth.user?.avatarLarge != null
                      ? ClipRRect(
                          borderRadius:
                              BorderRadius.circular(context.r.scale(1)),
                          child: Image.network(AnilistAuth.user!.avatarLarge!),
                        )
                      : ClipRRect(
                          borderRadius:
                              BorderRadius.circular(context.r.scale(0.2)),
                          child: Image.asset(AssetPaths.anilistLogo),
                        ),
                ),
                onTap: () {
                  Navigator.of(context).pusher.pushToAnilistPage();
                },
              ),
            ],
          ),
          SizedBox(width: context.r.scale(0.5)),
        ],
      );
}


================================================
FILE: lib/ui/pages/_home/components/body.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../../exports.dart';
import '../provider.dart';

class UnderScoreHomePageBody extends StatelessWidget {
  const UnderScoreHomePageBody({
    super.key,
  });

  Widget buildOnWaiting(final BuildContext context) => SizedBox(
        height: context.r.scale(12),
        child: const Center(child: CircularProgressIndicator()),
      );

  Widget buildCarousel({
    required final BuildContext context,
    required final StatedValue<List<AnilistMedia>> results,
  }) =>
      Padding(
        padding: EdgeInsets.only(bottom: context.r.scale(1)),
        child: StatedBuilder(
          results.state,
          waiting: buildOnWaiting,
          processing: buildOnWaiting,
          finished: (final _) => AnilistMediaRow(results.value),
          failed: (final _) => Text('Error: ${results.error}'),
        ),
      );

  Widget buildText(
    final String text, {
    required final BuildContext context,
  }) =>
      Padding(
        padding: HorizontalBodyPadding.padding(context)
            .copyWith(bottom: context.r.scale(0.75, md: 1)),
        child: Text(text, style: Theme.of(context).textTheme.titleMedium),
      );

  Widget buildTrendsSlideshow(final StatedValue<List<AnilistMedia>> data) =>
      StatedBuilder(
        data.state,
        waiting: buildOnWaiting,
        processing: buildOnWaiting,
        finished: (final BuildContext context) => SizedBox(
          height: context.r.scale(25),
          child: Slideshow(
            slideDuration: defaultSlideDuration,
            animationDuration: AnimationDurations.defaultNormalAnimation,
            children: data.value
                .map((final AnilistMedia x) => AnilistMediaSlide(x))
                .toList(),
          ),
        ),
        failed: (final _) => const Text('Error'),
      );

  Widget buildBody(final BuildContext context) {
    final UnderScoreHomePageProvider provider =
        context.watch<UnderScoreHomePageProvider>();

    return switch (provider.type) {
      TenkaType.anime => Column(
          key: const ValueKey<TenkaType>(TenkaType.anime),
          mainAxisSize: MainAxisSize.min,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            buildTrendsSlideshow(provider.trendingAnime),
            SizedBox(height: context.r.scale(2)),
            buildText(context.t.topOngoingAnime, context: context),
            buildCarousel(
              context: context,
              results: provider.topOngoingAnime,
            ),
            SizedBox(height: context.r.scale(1)),
            buildText(context.t.mostPopularAnime, context: context),
            buildCarousel(
              context: context,
              results: provider.mostPopularAnime,
            ),
            SizedBox(height: context.r.scale(1)),
          ],
        ),
      TenkaType.manga => Column(
          key: const ValueKey<TenkaType>(TenkaType.manga),
          mainAxisSize: MainAxisSize.min,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            buildTrendsSlideshow(provider.trendingManga),
            SizedBox(height: context.r.scale(2)),
            buildText(context.t.topOngoingManga, context: context),
            buildCarousel(
              context: context,
              results: provider.topOngoingManga,
            ),
            SizedBox(height: context.r.scale(1)),
            buildText(context.t.mostPopularManga, context: context),
            buildCarousel(
              context: context,
              results: provider.mostPopularManga,
            ),
            SizedBox(height: context.r.scale(1)),
          ],
        ),
    };
  }

  @override
  Widget build(final BuildContext context) => PageTransitionSwitcher(
        duration: AnimationDurations.defaultLongAnimation,
        transitionBuilder: (
          final Widget child,
          final Animation<double> animation,
          final Animation<double> secondaryAnimation,
        ) =>
            SharedAxisTransition(
          transitionType: SharedAxisTransitionType.vertical,
          fillColor: Colors.transparent,
          animation: animation,
          secondaryAnimation: secondaryAnimation,
          child: child,
        ),
        layoutBuilder: (final List<Widget> children) =>
            Stack(children: children),
        child: buildBody(context),
      );

  static const Duration defaultSlideDuration = Duration(seconds: 5);
}


================================================
FILE: lib/ui/pages/_home/components/bottombar.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../../exports.dart';
import '../provider.dart';

class UnderScoreHomePageBottomBar extends StatelessWidget {
  const UnderScoreHomePageBottomBar({
    required this.provider,
    super.key,
  });

  final UnderScoreHomePageProvider provider;

  Future<void> showTypeModal({
    required final BuildContext context,
    required final UnderScoreHomePageProvider provider,
  }) async {
    await showModalBottomSheet(
      context: context,
      shape: RoundedRectangleBorder(
        borderRadius:
            BorderRadius.vertical(top: Radius.circular(context.r.scale(1))),
      ),
      builder: (final BuildContext context) => Padding(
        padding: EdgeInsets.symmetric(vertical: context.r.scale(0.5)),
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            ...TenkaType.values.map(
              (final TenkaType x) => RadioListTile<TenkaType>(
                title: Text(x.getTitleCase(context.t)),
                value: x,
                groupValue: provider.type,
                onChanged: (final TenkaType? type) {
                  if (type == null) return;
                  provider.setType(type);
                  Navigator.of(context).pop();
                },
              ),
            ),
          ],
        ),
      ),
    );
  }

  @override
  Widget build(final BuildContext context) => Padding(
        padding: EdgeInsets.symmetric(
          horizontal: context.r.scale(1),
          vertical: context.r.scale(0.5),
        ),
        child: SizedBox(
          height: context.r.scale(2.5),
          child: Row(
            children: <Widget>[
              Expanded(
                child: Builder(
                  builder: (final BuildContext context) => TextButton(
                    style: TextButton.styleFrom(
                      backgroundColor:
                          Theme.of(context).colorScheme.surfaceVariant,
                      padding: EdgeInsets.symmetric(
                        vertical: context.r.scale(0.5),
                      ),
                    ),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: <Widget>[
                        SizedBox(width: context.r.scale(0.5)),
                        Text(provider.type.getTitleCase(context.t)),
                        const Icon(Icons.arrow_drop_up_rounded),
                      ],
                    ),
                    onPressed: () {
                      showTypeModal(context: context, provider: provider);
                    },
                  ),
                ),
              ),
              SizedBox(width: context.r.scale(0.5)),
              DecoratedBox(
                decoration: BoxDecoration(
                  color: Theme.of(context).colorScheme.surfaceVariant,
                  borderRadius: BorderRadius.circular(context.r.scale(999)),
                ),
                child: IconTheme(
                  data: IconThemeData(
                    color: Theme.of(context).colorScheme.onSurfaceVariant,
                    size: Theme.of(context).textTheme.titleSmall!.fontSize,
                  ),
                  child: Row(
                    children: <Widget>[
                      IconButton(
                        icon: const Icon(Icons.search_rounded),
                        onPressed: () {
                          Navigator.of(context).pusher.pushToSearchPage();
                        },
                      ),
                      SizedBox(width: context.r.scale(0.25)),
                      IconButton(
                        icon: const Icon(Icons.extension_rounded),
                        onPressed: () {
                          Navigator.of(context).pusher.pushToModulesPage();
                        },
                      ),
                      SizedBox(width: context.r.scale(0.25)),
                      IconButton(
                        icon: const Icon(Icons.settings_rounded),
                        onPressed: () {
                          Navigator.of(context).pusher.pushToSettingsPage();
                        },
                      ),
                    ],
                  ),
                ),
              ),
            ],
          ),
        ),
      );
}


================================================
FILE: lib/ui/pages/_home/components/exports.dart
================================================
export 'appbar.dart';
export 'body.dart';
export 'bottombar.dart';


================================================
FILE: lib/ui/pages/_home/provider.dart
================================================
import 'package:kazahana/core/exports.dart';

class UnderScoreHomePageProvider extends StatedChangeNotifier {
  TenkaType type = TenkaType.anime;

  final StatedValue<List<AnilistMedia>> trendingAnime =
      StatedValue<List<AnilistMedia>>();
  final StatedValue<List<AnilistMedia>> topOngoingAnime =
      StatedValue<List<AnilistMedia>>();
  final StatedValue<List<AnilistMedia>> mostPopularAnime =
      StatedValue<List<AnilistMedia>>();

  final StatedValue<List<AnilistMedia>> trendingManga =
      StatedValue<List<AnilistMedia>>();
  final StatedValue<List<AnilistMedia>> topOngoingManga =
      StatedValue<List<AnilistMedia>>();
  final StatedValue<List<AnilistMedia>> mostPopularManga =
      StatedValue<List<AnilistMedia>>();

  Future<void> initialize() async {
    final TenkaType? lastVisitedType = await getHomeLastVisited();
    if (lastVisitedType != null && type != lastVisitedType) {
      type = lastVisitedType;
      notifyListeners();
    }

    fetch(type);
  }

  Future<void> setType(final TenkaType type) async {
    this.type = type;
    fetch(type);
    notifyListeners();
    await setHomeLastVisited(type);
  }

  void fetch(final TenkaType type) {
    switch (type) {
      case TenkaType.anime:
        fetchTrendingAnimes();
        fetchTopOngoingAnimes();
        fetchMostPopularAnimes();

      case TenkaType.manga:
        fetchTrendingMangas();
        fetchTopOngoingMangas();
        fetchMostPopularMangas();
    }
  }

  Future<void> fetchTrendingAnimes() async {
    if (!trendingAnime.isWaiting) return;

    try {
      trendingAnime.finish(await AnilistMediaEndpoints.trendingAnimes());
    } catch (error, stackTrace) {
      trendingAnime.fail(error, stackTrace);
    }
    if (!mounted) return;
    notifyListeners();
  }

  Future<void> fetchTopOngoingAnimes() async {
    if (!topOngoingAnime.isWaiting) return;

    try {
      topOngoingAnime.finish(await AnilistMediaEndpoints.topOngoingAnimes());
    } catch (error, stackTrace) {
      topOngoingAnime.fail(error, stackTrace);
    }
    if (!mounted) return;
    notifyListeners();
  }

  Future<void> fetchMostPopularAnimes() async {
    if (!mostPopularAnime.isWaiting) return;

    try {
      mostPopularAnime.finish(await AnilistMediaEndpoints.mostPopularAnimes());
    } catch (error, stackTrace) {
      mostPopularAnime.fail(error, stackTrace);
    }
    if (!mounted) return;
    notifyListeners();
  }

  Future<void> fetchTrendingMangas() async {
    if (!trendingManga.isWaiting) return;

    try {
      trendingManga.finish(await AnilistMediaEndpoints.trendingMangas());
    } catch (error, stackTrace) {
      trendingManga.fail(error, stackTrace);
    }
    if (!mounted) return;
    notifyListeners();
  }

  Future<void> fetchTopOngoingMangas() async {
    if (!topOngoingManga.isWaiting) return;

    try {
      topOngoingManga.finish(await AnilistMediaEndpoints.topOngoingMangas());
    } catch (error, stackTrace) {
      topOngoingManga.fail(error, stackTrace);
    }
    if (!mounted) return;
    notifyListeners();
  }

  Future<void> fetchMostPopularMangas() async {
    if (!mostPopularManga.isWaiting) return;

    try {
      mostPopularManga.finish(await AnilistMediaEndpoints.mostPopularMangas());
    } catch (error, stackTrace) {
      mostPopularManga.fail(error, stackTrace);
    }
    if (!mounted) return;
    notifyListeners();
  }

  static const String kHomeLastVisitedKey = 'home_last_visited';

  static Future<TenkaType?> getHomeLastVisited() async {
    final String? value = await CacheDatabase.get<String?>(kHomeLastVisitedKey);
    return value != null ? EnumUtils.find(TenkaType.values, value) : null;
  }

  static Future<void> setHomeLastVisited(final TenkaType type) async {
    await CacheDatabase.set(kHomeLastVisitedKey, type.name);
  }
}


================================================
FILE: lib/ui/pages/_home/view.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import 'components/exports.dart';
import 'provider.dart';

class UnderScoreHomePage extends StatelessWidget {
  const UnderScoreHomePage({
    super.key,
  });

  @override
  Widget build(final BuildContext context) =>
      ChangeNotifierProvider<UnderScoreHomePageProvider>(
        create: (final _) => UnderScoreHomePageProvider()..initialize(),
        lazy: false,
        child: Consumer<UnderScoreHomePageProvider>(
          builder: (
            final BuildContext context,
            final UnderScoreHomePageProvider provider,
            final _,
          ) =>
              Scaffold(
            appBar: const UnderScoreHomePageAppBar(),
            extendBody: true,
            body: SingleChildScrollView(
              padding: EdgeInsets.only(bottom: context.r.scale(2.5)),
              child: const UnderScoreHomePageBody(),
            ),
            bottomNavigationBar:
                UnderScoreHomePageBottomBar(provider: provider),
          ),
        ),
      );
}


================================================
FILE: lib/ui/pages/_splash/view.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';

class UnderScoreSplashPage extends StatelessWidget {
  const UnderScoreSplashPage({
    super.key,
  });

  @override
  Widget build(final BuildContext context) => Scaffold(
        body: Stack(
          children: <Widget>[
            Align(
              child: Column(
                mainAxisSize: MainAxisSize.min,
                children: <Widget>[
                  Text(
                    AppMeta.name,
                    style: Theme.of(context)
                        .textTheme
                        .displayMedium!
                        .copyWith(fontFamily: Fonts.greatVibes),
                  ),
                  Text(
                    'v${AppMeta.version}',
                    style: Theme.of(context).textTheme.bodySmall,
                  ),
                ],
              ),
            ),
            Align(
              alignment: Alignment.bottomRight,
              child: Padding(
                padding: EdgeInsets.all(context.r.scale(1)),
                child: Text(
                  AppMeta.yuki,
                  style: Theme.of(context)
                      .textTheme
                      .headlineMedium!
                      .copyWith(color: Theme.of(context).colorScheme.primary),
                ),
              ),
            ),
          ],
        ),
      );
}


================================================
FILE: lib/ui/pages/anilist/components/body/exports.dart
================================================
export 'login.dart';
export 'profile/exports.dart';


================================================
FILE: lib/ui/pages/anilist/components/body/login.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../../../exports.dart';

class AnilistPageLoginBody extends StatelessWidget {
  const AnilistPageLoginBody({
    super.key,
  });

  @override
  Widget build(final BuildContext context) => SingleChildScrollView(
        padding: EdgeInsets.symmetric(
          horizontal: HorizontalBodyPadding.paddingValue(context),
          vertical: MediaQuery.of(context).size.height * 0.2,
        ),
        child: Column(
          children: <Widget>[
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Text(
                  AppMeta.name,
                  style: Theme.of(context)
                      .textTheme
                      .headlineLarge!
                      .copyWith(fontFamily: Fonts.greatVibes),
                ),
                SizedBox(width: context.r.scale(1)),
                Text(
                  '+',
                  style: Theme.of(context).textTheme.titleLarge!.copyWith(
                        color: Theme.of(context)
                            .textTheme
                            .titleLarge!
                            .color!
                            .withOpacity(0.3),
                      ),
                ),
                SizedBox(width: context.r.scale(1)),
                ClipRRect(
                  borderRadius: BorderRadius.circular(context.r.scale(0.5)),
                  child: SizedBox.square(
                    dimension: context.r.scale(2.5),
                    child: Image.asset(
                      AssetPaths.anilistLogo,
                      fit: BoxFit.cover,
                    ),
                  ),
                ),
              ],
            ),
            SizedBox(height: context.r.scale(1)),
            const Divider(),
            SizedBox(height: context.r.scale(1)),
            Text(
              context.t.trackYourProgressUsingAnilist,
              style: Theme.of(context).textTheme.titleLarge,
            ),
            SizedBox(height: context.r.scale(1)),
            TextButton.icon(
              icon: const Icon(Icons.login_rounded),
              label: Text(context.t.loginUsingAnilist),
              style: TextButton.styleFrom(
                backgroundColor: Theme.of(context).colorScheme.primary,
                foregroundColor: Theme.of(context).colorScheme.onPrimary,
                padding:
                    EdgeInsets.symmetric(horizontal: context.r.scale(0.75)),
                shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(context.r.scale(0.5)),
                ),
              ),
              onPressed: () async {
                try {
                  final bool didLaunch = await launchUrl(
                    Uri.parse(AnilistAuth.oauthURL),
                    mode: LaunchMode.externalApplication,
                  );
                  if (!didLaunch) {
                    throw Exception('Failed to launch URL');
                  }
                } catch (err) {
                  if (!context.mounted) return;
                  Toast(
                    content: Text(
                      '${context.t.somethingWentWrong} $err',
                    ), //dart(use_build_context_synchronously)
                  ).show();
                }
              },
            ),
          ],
        ),
      );
}


================================================
FILE: lib/ui/pages/anilist/components/body/profile/body.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../../../../exports.dart';
import 'provider.dart';

class AnilistPageProfileBodyBody extends StatelessWidget {
  const AnilistPageProfileBodyBody({
    required this.provider,
    super.key,
  });

  final AnilistPageProfileProvider provider;

  Widget buildOnWaiting(final BuildContext context) => SizedBox(
        height: context.r.scale(12),
        child: const Center(child: CircularProgressIndicator()),
      );

  Widget buildGridRow({
    required final BuildContext context,
    required final List<Widget> children,
  }) =>
      Padding(
        padding: EdgeInsets.only(bottom: context.r.scale(1)),
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: ListUtils.insertBetween(
            children.map((final Widget x) => Expanded(child: x)).toList(),
            SizedBox(width: context.r.scale(1)),
          ),
        ),
      );

  String getMediaProgressText(final AnilistMedia media) => switch (media.type) {
        AnilistMediaType.anime =>
          '${media.mediaListEntry?.progress ?? 0}/${media.episodes ?? Translation.unk}',
        AnilistMediaType.manga => <String>[
            '${media.mediaListEntry?.progress ?? 0}/${media.episodes ?? 0}',
            '(${media.mediaListEntry?.progressVolumes ?? 0}/${media.volumes ?? Translation.unk})',
          ].join(' '),
      };

  List<Widget> buildTiles({
    required final BuildContext context,
    required final List<AnilistMedia> list,
  }) =>
      list
          .map(
            (final AnilistMedia x) => AnilistMediaTile(
              x,
              additionalBottomChips: <Widget>[
                AnilistMediaTile.buildChip(
                  context: context,
                  backgroundColor: Theme.of(context).colorScheme.primary,
                  textColor: Theme.of(context).colorScheme.onPrimary,
                  child: Text(getMediaProgressText(x)),
                ),
              ],
            ),
          )
          .toList();

  @override
  Widget build(final BuildContext context) => Padding(
        padding: EdgeInsets.symmetric(
          horizontal: HorizontalBodyPadding.paddingValue(context),
          vertical: context.r.scale(0.5),
        ),
        child: StatedBuilder(
          provider.list.state,
          waiting: buildOnWaiting,
          processing: buildOnWaiting,
          finished: (final _) => Column(
            children: ListUtils.chunk(
              buildTiles(context: context, list: provider.list.value.last),
              2,
              const SizedBox.shrink(),
            )
                .map(
                  (final List<Widget> x) =>
                      buildGridRow(context: context, children: x),
                )
                .toList(),
          ),
          failed: (final _) => Text('Error: ${provider.list.error}'),
        ),
      );
}


================================================
FILE: lib/ui/pages/anilist/components/body/profile/exports.dart
================================================
export 'wrapper.dart';


================================================
FILE: lib/ui/pages/anilist/components/body/profile/hero.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../../../../exports.dart';
import 'provider.dart';

class AnilistPageProfileBodyHero extends StatelessWidget {
  const AnilistPageProfileBodyHero({
    required this.provider,
    super.key,
  });

  final AnilistPageProfileProvider provider;

  Widget buildStatisticsChild({
    required final BuildContext context,
    required final String title,
    required final String value,
  }) =>
      RichText(
        text: TextSpan(
          children: <InlineSpan>[
            TextSpan(
              text: '$title: ',
              style: Theme.of(context).textTheme.bodySmall,
            ),
            TextSpan(
              text: value,
              style: Theme.of(context).textTheme.bodySmall!.copyWith(
                    fontWeight: FontWeight.bold,
                    color: Theme.of(context).colorScheme.primary,
                  ),
            ),
          ],
        ),
        textAlign: TextAlign.center,
      );

  List<Widget> buildStatisticsTiles(final BuildContext context) {
    switch (provider.category.type) {
      case AnilistMediaType.anime:
        final AnilistUserStatistics? stats = user.animeStatistics;
        return <Widget>[
          buildStatisticsChild(
            context: context,
            title: context.t.totalAnime,
            value: stats?.count.toString() ?? Translation.unk,
          ),
          buildStatisticsChild(
            context: context,
            title: context.t.episodesWatched,
            value: stats?.episodesWatched.toString() ?? Translation.unk,
          ),
          buildStatisticsChild(
            context: context,
            title: context.t.timeSpent,
            value: stats?.minutesWatched != null
                ? PrettyDurations.prettyHoursMinutesShort(
                    context.t,
                    Duration(minutes: stats!.minutesWatched!),
                  )
                : Translation.unk,
          ),
          buildStatisticsChild(
            context: context,
            title: context.t.meanScore,
            value: stats != null ? '${stats.meanScore}%' : Translation.unk,
          ),
        ];

      case AnilistMediaType.manga:
        final AnilistUserStatistics? stats = user.mangaStatistics;
        return <Widget>[
          buildStatisticsChild(
            context: context,
            title: context.t.totalManga,
            value: stats?.count.toString() ?? Translation.unk,
          ),
          buildStatisticsChild(
            context: context,
            title: context.t.volumesRead,
            value: stats?.volumesRead.toString() ?? Translation.unk,
          ),
          buildStatisticsChild(
            context: context,
            title: context.t.chaptersRead,
            value: stats?.chaptersRead.toString() ?? Translation.unk,
          ),
          buildStatisticsChild(
            context: context,
            title: context.t.meanScore,
            value: stats != null ? '${stats.meanScore}%' : Translation.unk,
          ),
        ];
    }
  }

  Widget buildHeroContent(final BuildContext context) => Row(
        mainAxisSize: MainAxisSize.min,
        crossAxisAlignment: CrossAxisAlignment.end,
        children: <Widget>[
          ClipRRect(
            borderRadius: BorderRadius.circular(context.r.scale(0.25)),
            child: SizedBox(
              height: context.r.scale(5),
              child: user.avatarLarge != null
                  ? Image.network(
                      user.avatarLarge!,
                      fit: BoxFit.cover,
                    )
                  : Image.asset(AssetPaths.anilistLogo),
            ),
          ),
          SizedBox(width: context.r.scale(1)),
          Expanded(
            child: Column(
              mainAxisSize: MainAxisSize.min,
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                ...buildStatisticsTiles(context),
                const Divider(),
                Text(
                  user.name,
                  style: Theme.of(context).textTheme.titleLarge!.copyWith(
                        fontWeight: FontWeight.bold,
                      ),
                ),
              ],
            ),
          ),
        ],
      );

  @override
  Widget build(final BuildContext context) => SliverList(
        delegate: SliverChildListDelegate.fixed(
          <Widget>[
            Container(
              color: Theme.of(context).bottomAppBarTheme.color,
              height: context.r.scale(10),
              child: Stack(
                children: <Widget>[
                  if (user.bannerImage != null)
                    Positioned.fill(
                      child: Image.network(
                        user.bannerImage!,
                        fit: BoxFit.cover,
                      ),
                    ),
                  Positioned.fill(
                    child: DecoratedBox(
                      decoration: BoxDecoration(
                        gradient: LinearGradient(
                          begin: Alignment.topCenter,
                          end: Alignment.bottomCenter,
                          colors: <Color>[
                            Colors.transparent,
                            Theme.of(context)
                                .bottomAppBarTheme
                                .color!
                                .withOpacity(0.75),
                          ],
                        ),
                      ),
                      child: const SizedBox.expand(),
                    ),
                  ),
                  Align(
                    alignment: Alignment.bottomCenter,
                    child: Padding(
                      padding: EdgeInsets.all(
                        HorizontalBodyPadding.paddingValue(context),
                      ),
                      child: buildHeroContent(context),
                    ),
                  ),
                ],
              ),
            ),
          ],
        ),
      );

  AnilistUser get user => provider.pageProvider.user!;
}


================================================
FILE: lib/ui/pages/anilist/components/body/profile/provider.dart
================================================
import 'dart:async';
import 'package:kazahana/core/exports.dart';
import '../../../provider.dart';

class AnilistProfileCategory {
  const AnilistProfileCategory(this.type, this.status);

  factory AnilistProfileCategory.parse(final String value) {
    final List<String> split = value.split('_');
    return AnilistProfileCategory(
      parseAnilistMediaType(split.first),
      parseAnilistMediaListStatus(split.last),
    );
  }

  final AnilistMediaType type;
  final AnilistMediaListStatus status;

  AnilistProfileCategory copyWith({
    final AnilistMediaType? type,
    final AnilistMediaListStatus? status,
  }) =>
      AnilistProfileCategory(type ?? this.type, status ?? this.status);

  String get stringify => '${type.stringify}_${status.stringify}';

  @override
  bool operator ==(final Object other) =>
      other is AnilistProfileCategory &&
      type == other.type &&
      status == other.status;

  @override
  int get hashCode => Object.hash(type, status);
}

class AnilistPageProfileProvider extends StatedChangeNotifier {
  AnilistPageProfileProvider(this.pageProvider);

  final AnilistPageProvider pageProvider;

  AnilistProfileCategory category = const AnilistProfileCategory(
    AnilistMediaType.anime,
    AnilistMediaListStatus.current,
  );
  final StatedValue<TwinTuple<AnilistProfileCategory, List<AnilistMedia>>>
      list =
      StatedValue<TwinTuple<AnilistProfileCategory, List<AnilistMedia>>>();

  Future<void> initialize() async {
    final AnilistProfileCategory? lastVisitedCategory =
        await getAnilistLastVisitedCategory();
    if (lastVisitedCategory != null && lastVisitedCategory != category) {
      category = lastVisitedCategory;
      notifyListeners();
    }

    fetch();
  }

  Future<void> change(final AnilistProfileCategory nCategory) async {
    if (category == nCategory) return;
    category = nCategory;
    await setAnilistLastVisitedCategory(category);
    await fetch();
  }

  Future<void> fetch() async {
    if (list.hasFinished && list.value.first == category) return;
    list.waiting();
    notifyListeners();

    try {
      list.finish(
        TwinTuple<AnilistProfileCategory, List<AnilistMedia>>(
          category,
          await AnilistMediaListEndpoints.fetch(
            userId: pageProvider.user!.id,
            type: category.type,
            status: category.status,
            sort: AnilistMediaListSort.addedTimeDesc,
          ),
        ),
      );
    } catch (error, stackTrace) {
      list.fail(error, stackTrace);
    }
    notifyListeners();
  }

  static const String kAnilistLastVisitedCategoryKey =
      'anilist_last_visited_list';

  static Future<AnilistProfileCategory?> getAnilistLastVisitedCategory() async {
    final String? value =
        await CacheDatabase.get<String?>(kAnilistLastVisitedCategoryKey);
    return value != null ? AnilistProfileCategory.parse(value) : null;
  }

  static Future<void> setAnilistLastVisitedCategory(
    final AnilistProfileCategory category,
  ) async {
    await CacheDatabase.set(kAnilistLastVisitedCategoryKey, category.stringify);
  }
}


================================================
FILE: lib/ui/pages/anilist/components/body/profile/wrapper.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../../../../exports.dart';
import '../../../provider.dart';
import 'body.dart';
import 'hero.dart';
import 'provider.dart';

class AnilistPageProfileBody extends StatefulWidget {
  const AnilistPageProfileBody({
    required this.provider,
    super.key,
  });

  final AnilistPageProvider provider;

  @override
  State<AnilistPageProfileBody> createState() => _AnilistPageProfileBodyState();
}

class _AnilistPageProfileBodyState extends State<AnilistPageProfileBody> {
  @override
  Widget build(final BuildContext context) =>
      ChangeNotifierProvider<AnilistPageProfileProvider>(
        create: (final _) =>
            AnilistPageProfileProvider(widget.provider)..initialize(),
        builder: (final BuildContext context, final _) =>
            Consumer<AnilistPageProfileProvider>(
          builder: (
            final BuildContext context,
            final AnilistPageProfileProvider provider,
            final _,
          ) =>
              NestedScrollView(
            headerSliverBuilder: (
              final BuildContext context,
              final bool innerBoxIsScrolled,
            ) =>
                <Widget>[
              AnilistPageProfileBodyHero(provider: provider),
              SliverOverlapAbsorber(
                handle:
                    NestedScrollView.sliverOverlapAbsorberHandleFor(context),
                sliver: SliverPersistentHeader(
                  pinned: true,
                  floating: true,
                  delegate: _AnilistControlsHeaderDelegate(provider),
                ),
              ),
            ],
            body: CustomScrollView(
              slivers: <Widget>[
                Builder(
                  builder: (final BuildContext context) =>
                      SliverOverlapInjector(
                    handle: NestedScrollView.sliverOverlapAbsorberHandleFor(
                      context,
                    ),
                  ),
                ),
                SliverToBoxAdapter(
                  child: AnilistPageProfileBodyBody(provider: provider),
                ),
              ],
            ),
          ),
        ),
      );
}

class _AnilistControlsHeaderDelegate extends SliverPersistentHeaderDelegate {
  const _AnilistControlsHeaderDelegate(this.provider);

  final AnilistPageProfileProvider provider;

  Future<void> showButtonOptionsModal<T>({
    required final BuildContext context,
    required final T value,
    required final List<T> values,
    required final Map<T, String> labels,
    required final void Function(T) onChange,
  }) async {
    await showModalBottomSheet(
      context: context,
      shape: RoundedRectangleBorder(
        borderRadius:
            BorderRadius.vertical(top: Radius.circular(context.r.scale(1))),
      ),
      builder: (final BuildContext context) => Padding(
        padding: EdgeInsets.symmetric(vertical: context.r.scale(0.5)),
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: values
              .map(
                (final T x) => RadioListTile<T>(
                  title: Text(labels[x]!),
                  value: x,
                  groupValue: value,
                  onChanged: (final T? type) {
                    if (type == null) return;
                    onChange(type);
                    Navigator.of(context).pop();
                  },
                ),
              )
              .toList(),
        ),
      ),
    );
  }

  Widget buildButton<T>({
    required final BuildContext context,
    required final T value,
    required final List<T> values,
    required final Map<T, String> labels,
    required final void Function(T) onChange,
  }) =>
      SizedBox(
        height: buttonHeight,
        child: TextButton(
          style: TextButton.styleFrom(
            backgroundColor: Theme.of(context).bottomAppBarTheme.color,
            shape: RoundedRectangleBorder(
              borderRadius: BorderRadius.circular(context.r.scale(0.25)),
            ),
          ),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              SizedBox(width: context.r.scale(0.5)),
              Text(labels[value]!),
              const Icon(Icons.arrow_drop_down_rounded),
            ],
          ),
          onPressed: () async {
            await showButtonOptionsModal(
              context: context,
              value: value,
              values: values,
              labels: labels,
              onChange: onChange,
            );
          },
        ),
      );

  @override
  Widget build(final BuildContext context, final _, final __) => ColoredBox(
        color: Theme.of(context).scaffoldBackgroundColor,
        child: Column(
          children: <Widget>[
            SizedBox(height: verticalPaddingSize),
            Padding(
              padding: EdgeInsets.symmetric(
                horizontal: verticalPaddingSize,
              ),
              child: Row(
                children: <Widget>[
                  Expanded(
                    child: buildButton<AnilistMediaType>(
                      context: context,
                      value: provider.category.type,
                      values: AnilistMediaType.values,
                      labels: AnilistMediaType.values.asMap().map(
                            (final _, final AnilistMediaType x) =>
                                MapEntry<AnilistMediaType, String>(
                              x,
                              x.asTenkaType.getTitleCase(context.t),
                            ),
                          ),
                      onChange: (final AnilistMediaType value) {
                        provider.change(
                          provider.category.copyWith(type: value),
                        );
                      },
                    ),
                  ),
                  SizedBox(width: verticalPaddingSize),
                  Expanded(
                    child: buildButton<AnilistMediaListStatus>(
                      context: context,
                      value: provider.category.status,
                      values: AnilistMediaListStatus.values,
                      labels: AnilistMediaListStatus.values.asMap().map(
                            (final _, final AnilistMediaListStatus x) =>
                                MapEntry<AnilistMediaListStatus, String>(
                              x,
                              x.getTitleCase(context.t),
                            ),
                          ),
                      onChange: (final AnilistMediaListStatus value) {
                        provider.change(
                          provider.category.copyWith(status: value),
                        );
                      },
                    ),
                  ),
                ],
              ),
            ),
            SizedBox(height: verticalPaddingSize),
            const Divider(height: 1, thickness: 1),
          ],
        ),
      );

  @override
  bool shouldRebuild(final _AnilistControlsHeaderDelegate oldDelegate) => true;

  @override
  double get minExtent => fixedHeight;

  @override
  double get maxExtent => fixedHeight;

  static double get buttonHeight =>
      RelativeScaleData.fromSettingsNoResponsive().scale(2);

  static double get verticalPaddingSize =>
      RelativeScaleData.fromSettingsNoResponsive().scale(0.3);

  static double get fixedHeight => buttonHeight + (verticalPaddingSize * 2) + 1;
}


================================================
FILE: lib/ui/pages/anilist/components/exports.dart
================================================
export 'body/exports.dart';


================================================
FILE: lib/ui/pages/anilist/provider.dart
================================================
import 'dart:async';
import 'package:kazahana/core/exports.dart';

class AnilistPageProvider extends StatedChangeNotifier {
  StreamSubscription<AppEvent>? appEventSubscription;

  void initialize() {
    fetch();

    appEventSubscription = AppEvents.stream.listen((final AppEvent event) {
      if (mounted && event == AppEvent.anilistStateChange) {
        notifyListeners();
        fetch();
      }
    });
  }

  @override
  void dispose() {
    appEventSubscription?.cancel();

    super.dispose();
  }

  Future<void> fetch() async {}

  AnilistUser? get user => AnilistAuth.user;
  bool get isLoggedIn => user != null;
}


================================================
FILE: lib/ui/pages/anilist/route.dart
================================================
import 'package:flutter/material.dart';
import '../../exports.dart';
import 'view.dart';

class AnilistPageRoute extends RoutePage {
  @override
  bool matches(final RouteInfo route) => route.name == routeName;

  @override
  Widget build(final RouteInfo route) => const AnilistPage();

  static const String routeName = '/anilist';
}

extension AnilistPageRouteUtils on RoutePusher {
  Future<void> pushToAnilistPage() =>
      navigator.pushNamed(AnilistPageRoute.routeName);
}


================================================
FILE: lib/ui/pages/anilist/view.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import 'components/exports.dart';
import 'provider.dart';

class AnilistPage extends StatelessWidget {
  const AnilistPage({
    super.key,
  });

  @override
  Widget build(final BuildContext context) =>
      ChangeNotifierProvider<AnilistPageProvider>(
        create: (final _) => AnilistPageProvider()..initialize(),
        child: Consumer<AnilistPageProvider>(
          builder: (
            final BuildContext context,
            final AnilistPageProvider provider,
            final _,
          ) =>
              Scaffold(
            appBar: AppBar(title: Text(context.t.anilist)),
            body: provider.isLoggedIn
                ? AnilistPageProfileBody(provider: provider)
                : const AnilistPageLoginBody(),
          ),
        ),
      );
}


================================================
FILE: lib/ui/pages/home/route.dart
================================================
import 'package:flutter/material.dart';
import '../../exports.dart';
import 'view.dart';

class HomePageRoute extends RoutePage {
  @override
  bool matches(final RouteInfo route) => route.name == routeName;

  @override
  Widget build(final RouteInfo route) => const HomePage();

  static const String routeName = '/';
}

extension HomePageRouteUtils on RoutePusher {
  Future<void> pushToViewPage() => navigator.pushNamed(HomePageRoute.routeName);
}


================================================
FILE: lib/ui/pages/home/view.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import '../_home/view.dart';
import '../_splash/view.dart';

class HomePage extends StatefulWidget {
  const HomePage({
    super.key,
  });

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  void initState() {
    super.initState();
    AppLoader.initialize().then((final _) async {
      if (mounted) {
        setState(() {});
      }
    });
  }

  @override
  Widget build(final BuildContext context) => PageTransitionSwitcher(
        duration: AnimationDurations.defaultLongAnimation,
        transitionBuilder: (
          final Widget child,
          final Animation<double> animation,
          final Animation<double> secondaryAnimation,
        ) =>
            FadeThroughTransition(
          animation: animation,
          secondaryAnimation: secondaryAnimation,
          child: child,
        ),
        child: AppLoader.ready
            ? const UnderScoreHomePage()
            : const UnderScoreSplashPage(),
      );
}


================================================
FILE: lib/ui/pages/modules/provider.dart
================================================
import 'package:kazahana/core/exports.dart';

class ModulesPageProvider extends StatedChangeNotifier {
  final Set<String> installing = <String>{};
  final Set<String> uninstalling = <String>{};

  Future<void> install(final TenkaMetadata metadata) async {
    installing.add(metadata.id);
    notifyListeners();
    await TenkaManager.repository.install(metadata);
    if (!mounted) return;
    installing.remove(metadata.id);
    notifyListeners();
  }

  Future<void> uninstall(final TenkaMetadata metadata) async {
    uninstalling.add(metadata.id);
    notifyListeners();
    await TenkaManager.repository.uninstall(metadata);
    if (!mounted) return;
    uninstalling.remove(metadata.id);
    notifyListeners();
  }
}


================================================
FILE: lib/ui/pages/modules/route.dart
================================================
import 'package:flutter/material.dart';
import '../../exports.dart';
import 'view.dart';

class ModulesPageRoute extends RoutePage {
  @override
  bool matches(final RouteInfo route) => route.name == routeName;

  @override
  Widget build(final RouteInfo route) => const ModulesPage();

  static const String routeName = '/modules';
}

extension ModulesPageRouteUtils on RoutePusher {
  Future<void> pushToModulesPage() => navigator.pushNamed(ModulesPageRoute.routeName);
}


================================================
FILE: lib/ui/pages/modules/view.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import 'provider.dart';

class ModulesPage extends StatelessWidget {
  const ModulesPage({
    super.key,
  });

  VoidCallback createOnPressed({
    required final ModulesPageProvider provider,
    required final TenkaMetadata metadata,
  }) =>
      () {
        if (TenkaManager.repository.isInstalled(metadata)) {
          provider.uninstall(metadata);
          return;
        }
        provider.install(metadata);
      };

  Widget buildModuleTile({
    required final BuildContext context,
    required final ModulesPageProvider provider,
    required final TenkaMetadata metadata,
  }) {
    final bool isInstalling = provider.installing.contains(metadata.id);
    final bool isUninstalling = provider.uninstalling.contains(metadata.id);
    final bool isInstalled = TenkaManager.repository.isInstalled(metadata);

    final IconData icon;
    Color? iconColor;
    if (isInstalling) {
      icon = Icons.hourglass_bottom_rounded;
    } else if (isUninstalling) {
      icon = Icons.hourglass_bottom_rounded;
    } else if (isInstalled) {
      icon = Icons.done_rounded;
      iconColor = Theme.of(context).colorScheme.primary;
    } else {
      icon = Icons.add_rounded;
      iconColor = Theme.of(context).colorScheme.primary;
    }

    final VoidCallback? onPressed = isInstalling || isUninstalling
        ? null
        : createOnPressed(provider: provider, metadata: metadata);

    return ListTile(
      contentPadding: EdgeInsets.only(
        left: context.r.scale(0.75),
        right: context.r.scale(0.25),
      ),
      leading: SizedBox(
        height: double.infinity,
        child: SizedBox.square(
          dimension: context.r.scale(1.5),
          child: Image.network(
            TenkaManager.repository.resolver
                .resolveURL((metadata.thumbnail as TenkaCloudDS).url),
          ),
        ),
      ),
      title: RichText(
        text: TextSpan(
          children: <InlineSpan>[
            TextSpan(text: metadata.name),
            if (metadata.nsfw)
              TextSpan(
                text: '  (${context.t.nsfw})',
                style: Theme.of(context)
                    .textTheme
                    .labelSmall
                    ?.copyWith(color: ForegroundColors.red),
              ),
          ],
          style: Theme.of(context).textTheme.titleSmall,
        ),
      ),
      subtitle: Text(
        <String>[
          metadata.type.getTitleCase(context.t),
          context.t.byX(metadata.author),
          'v${metadata.version}',
        ].join(' / '),
      ),
      trailing: IconButton(
        icon: Icon(icon, color: iconColor),
        onPressed: onPressed,
      ),
      onTap: onPressed,
    );
  }

  @override
  Widget build(final BuildContext context) =>
      ChangeNotifierProvider<ModulesPageProvider>(
        create: (final _) => ModulesPageProvider(),
        child: Consumer<ModulesPageProvider>(
          builder: (
            final BuildContext context,
            final ModulesPageProvider provider,
            final _,
          ) =>
              Scaffold(
            appBar: AppBar(title: Text(context.t.extensions)),
            body: SingleChildScrollView(
              child: Column(
                children: TenkaManager.repository.store.modules.values
                    .sortedBy((final TenkaMetadata x) => x.name)
                    .map(
                      (final TenkaMetadata x) => buildModuleTile(
                        context: context,
                        provider: provider,
                        metadata: x,
                      ),
                    )
                    .toList(),
              ),
            ),
          ),
        ),
      );
}


================================================
FILE: lib/ui/pages/search/components/exports.dart
================================================
export 'results_grid.dart';
export 'search_bar.dart';


================================================
FILE: lib/ui/pages/search/components/results_grid.dart
================================================
import 'package:kazahana/core/exports.dart';
import '../../../exports.dart';

class ResultsGrid extends StatelessWidget {
  const ResultsGrid(
    this.results, {
    super.key,
  });

  final List<AnilistMedia> results;

  Widget buildGridRow({
    required final BuildContext context,
    required final List<Widget> children,
  }) =>
      Padding(
        padding: EdgeInsets.only(bottom: context.r.scale(1)),
        child: Row(
          children: ListUtils.insertBetween(
            children.map((final Widget x) => Expanded(child: x)).toList(),
            SizedBox(width: context.r.scale(1)),
          ),
        ),
      );

  List<Widget> buildTiles({
    required final BuildContext context,
  }) =>
      results.map((final AnilistMedia x) => AnilistMediaTile(x)).toList();

  @override
  Widget build(final BuildContext context) => Column(
        children: ListUtils.chunk(buildTiles(context: context), 2)
            .map(
              (final List<Widget> x) =>
                  buildGridRow(context: context, children: x),
            )
            .toList(),
      );
}


================================================
FILE: lib/ui/pages/search/components/search_bar.dart
================================================
import 'dart:async';
import 'package:kazahana/core/exports.dart';
import '../../../exports.dart';
import '../provider.dart';

class SearchBar extends StatefulWidget implements PreferredSizeWidget {
  const SearchBar({
    super.key,
  });

  @override
  State<SearchBar> createState() => _SearchBarState();

  @override
  // TODO: Do something about this
  // Size get preferredSize => Size.fromHeight(context.r.size(2.5));
  Size get preferredSize => const Size.fromHeight(50);
}

class _SearchBarState extends State<SearchBar> {
  late final TextEditingController textEditingController;
  String? lastInputText;
  int? lastInputTime;
  Timer? searchTimer;

  @override
  void initState() {
    super.initState();
    textEditingController = TextEditingController();
  }

  @override
  void dispose() {
    super.dispose();
    searchTimer?.cancel();
    textEditingController.dispose();
  }

  void onInputChange(
    final String input, {
    required final SearchPageProvider provider,
  }) {
    if (lastInputText == input) return;

    searchTimer?.cancel();
    searchTimer = Timer(
      const Duration(milliseconds: defaultInputTimeInterval),
      () => provider.search(textEditingController.text),
    );
    lastInputTime = DateTime.now().millisecondsSinceEpoch;
    lastInputText = input;
  }

  void onCloseButtonTap(final SearchPageProvider provider) {
    if (textEditingController.text.isNotEmpty) {
      textEditingController.clear();
      provider.reset();
      return;
    }

    Navigator.of(context).pop();
  }

  @override
  Widget build(final BuildContext context) => Consumer<SearchPageProvider>(
        builder: (
          final BuildContext context,
          final SearchPageProvider provider,
          final _,
        ) =>
            SafeArea(
          child: Padding(
            padding: EdgeInsets.symmetric(
              horizontal: context.r.scale(0.75),
              vertical: context.r.scale(0.5),
            ),
            child: SizedBox(
              height: context.r.scale(1.5),
              child: DecoratedBox(
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(context.r.scale(0.25)),
                  // TODO
                  // color: Theme.of(context).appBarTheme.backgroundColor,
                ),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    SizedBox(width: context.r.scale(0.5)),
                    Icon(
                      Icons.search_rounded,
                      size: Theme.of(context).textTheme.bodyLarge?.fontSize,
                      color: Theme.of(context).textTheme.bodySmall?.color,
                    ),
                    SizedBox(width: context.r.scale(0.4)),
                    Expanded(
                      child: Padding(
                        padding: EdgeInsets.only(bottom: context.r.scale(0.2)),
                        child: TextField(
                          textAlignVertical: TextAlignVertical.center,
                          textCapitalization: TextCapitalization.words,
                          controller: textEditingController,
                          autofocus: true,
                          decoration: InputDecoration.collapsed(
                            hintText: context.t.searchAnAnimeOrManga,
                          ),
                          onChanged: (final String input) =>
                              onInputChange(input, provider: provider),
                        ),
                      ),
                    ),
                    SizedBox(width: context.r.scale(0.4)),
                    Material(
                      color: Colors.transparent,
                      child: InkWell(
                        borderRadius: BorderRadius.circular(context.r.scale(1)),
                        child: Padding(
                          padding: EdgeInsets.all(context.r.scale(0.2)),
                          child: Icon(
                            Icons.close_rounded,
                            size:
                                Theme.of(context).textTheme.bodyLarge?.fontSize,
                            color: Theme.of(context).textTheme.bodySmall?.color,
                          ),
                        ),
                        onTap: () => onCloseButtonTap(provider),
                      ),
                    ),
                    SizedBox(width: context.r.scale(0.2)),
                  ],
                ),
              ),
            ),
          ),
        ),
      );

  static const int defaultInputTimeInterval = 500;
}


================================================
FILE: lib/ui/pages/search/provider.dart
================================================
import 'package:kazahana/core/exports.dart';

class SearchPageProvider extends StatedChangeNotifier {
  final StatedValue<TwinTuple<String, List<AnilistMedia>>> results =
      StatedValue<TwinTuple<String, List<AnilistMedia>>>();

  void reset() {
    results.waiting();
    notifyListeners();
  }

  Future<void> search(final String terms) async {
    results.loading();
    notifyListeners();

    try {
      results.finish(
        TwinTuple<String, List<AnilistMedia>>(
          terms,
          await AnilistMediaEndpoints.search(terms),
        ),
      );
    } catch (err, trace) {
      results.fail(err, trace);
    }
    if (!mounted) return;
    notifyListeners();
  }
}


================================================
FILE: lib/ui/pages/search/route.dart
================================================
import 'package:flutter/material.dart';
import '../../exports.dart';
import 'view.dart';

class SearchPageRoute extends RoutePage {
  @override
  bool matches(final RouteInfo route) => route.name == routeName;

  @override
  Widget build(final RouteInfo route) => const SearchPage();

  static const String routeName = '/search';
}

extension SearchPageRouteUtils on RoutePusher {
  Future<void> pushToSearchPage() =>
      navigator.pushNamed(SearchPageRoute.routeName);
}


================================================
FILE: lib/ui/pages/search/view.dart
================================================
import 'package:kazahana/core/exports.dart' hide SearchBar;
import '../../exports.dart';
import 'components/exports.dart';
Download .txt
gitextract_eju0jcu_/

├── .github/
│   └── workflows/
│       └── code-analysis.yml
├── .gitignore
├── .metadata
├── .phrasey/
│   ├── config.toml
│   ├── hooks/
│   │   ├── dart-sync.js
│   │   └── utils.js
│   └── schema.toml
├── .prettierrc
├── .vscode/
│   └── settings.json
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android/
│   ├── .gitignore
│   ├── app/
│   │   ├── build.gradle
│   │   └── src/
│   │       ├── debug/
│   │       │   └── AndroidManifest.xml
│   │       ├── main/
│   │       │   ├── AndroidManifest.xml
│   │       │   ├── java/
│   │       │   │   └── io/
│   │       │   │       └── flutter/
│   │       │   │           └── app/
│   │       │   │               └── FlutterMultiDexApplication.java
│   │       │   ├── kotlin/
│   │       │   │   └── com/
│   │       │   │       └── example/
│   │       │   │           └── kazahana/
│   │       │   │               └── MainActivity.kt
│   │       │   └── res/
│   │       │       ├── drawable/
│   │       │       │   └── launch_background.xml
│   │       │       ├── drawable-v21/
│   │       │       │   └── launch_background.xml
│   │       │       ├── values/
│   │       │       │   └── styles.xml
│   │       │       └── values-night/
│   │       │           └── styles.xml
│   │       └── profile/
│   │           └── AndroidManifest.xml
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       └── gradle-wrapper.properties
│   ├── gradle.properties
│   └── settings.gradle
├── cli/
│   ├── code_analysis.dart
│   ├── prerequisites.dart
│   ├── run.dart
│   ├── tasks/
│   │   ├── build_runner.dart
│   │   ├── i18n.dart
│   │   ├── icon.dart
│   │   ├── meta.dart
│   │   └── version.dart
│   └── utils/
│       ├── exports.dart
│       ├── logger.dart
│       └── paths.dart
├── i18n/
│   └── en.toml
├── lib/
│   ├── core/
│   │   ├── anilist/
│   │   │   ├── auth.dart
│   │   │   ├── credentials.dart
│   │   │   ├── exports.dart
│   │   │   └── translations.dart
│   │   ├── app/
│   │   │   ├── events.dart
│   │   │   ├── exports.dart
│   │   │   ├── loader.dart
│   │   │   └── meta.dart
│   │   ├── database/
│   │   │   ├── cache/
│   │   │   │   ├── database.dart
│   │   │   │   └── exports.dart
│   │   │   ├── exports.dart
│   │   │   ├── secure/
│   │   │   │   ├── database.dart
│   │   │   │   ├── exports.dart
│   │   │   │   └── schema.dart
│   │   │   └── settings/
│   │   │       ├── database.dart
│   │   │       ├── exports.dart
│   │   │       └── schema.dart
│   │   ├── exports.dart
│   │   ├── internals/
│   │   │   ├── deeplink.dart
│   │   │   ├── exports.dart
│   │   │   └── router/
│   │   │       ├── exports.dart
│   │   │       ├── route.dart
│   │   │       ├── routes/
│   │   │       │   ├── anilist.dart
│   │   │       │   └── exports.dart
│   │   │       └── routes.dart
│   │   ├── packages.dart
│   │   ├── paths.dart
│   │   ├── player/
│   │   │   └── video_player.dart
│   │   ├── state/
│   │   │   ├── exports.dart
│   │   │   ├── states.dart
│   │   │   └── value.dart
│   │   ├── tenka/
│   │   │   ├── exports.dart
│   │   │   ├── manager.dart
│   │   │   └── utils.dart
│   │   ├── themes/
│   │   │   ├── colors.dart
│   │   │   ├── exports.dart
│   │   │   └── fonts.dart
│   │   ├── translator/
│   │   │   ├── exports.dart
│   │   │   └── translator.dart
│   │   └── utils/
│   │       ├── dates.dart
│   │       ├── durations.dart
│   │       ├── exports.dart
│   │       ├── kawaii_faces.dart
│   │       └── provider.dart
│   ├── main.dart
│   └── ui/
│       ├── base.dart
│       ├── components/
│       │   ├── anilist/
│       │   │   ├── exports.dart
│       │   │   ├── media_row.dart
│       │   │   ├── media_slide.dart
│       │   │   └── media_tile.dart
│       │   ├── body_padding.dart
│       │   ├── cross_draggable_scroll_behaviour.dart
│       │   ├── exports.dart
│       │   ├── kawaii_face.dart
│       │   ├── rounded_back_button.dart
│       │   ├── scrollable_row.dart
│       │   ├── slideshow.dart
│       │   ├── stated_builder.dart
│       │   ├── super_imposer.dart
│       │   └── toast.dart
│       ├── exports.dart
│       ├── keys.dart
│       ├── pages/
│       │   ├── _home/
│       │   │   ├── components/
│       │   │   │   ├── appbar.dart
│       │   │   │   ├── body.dart
│       │   │   │   ├── bottombar.dart
│       │   │   │   └── exports.dart
│       │   │   ├── provider.dart
│       │   │   └── view.dart
│       │   ├── _splash/
│       │   │   └── view.dart
│       │   ├── anilist/
│       │   │   ├── components/
│       │   │   │   ├── body/
│       │   │   │   │   ├── exports.dart
│       │   │   │   │   ├── login.dart
│       │   │   │   │   └── profile/
│       │   │   │   │       ├── body.dart
│       │   │   │   │       ├── exports.dart
│       │   │   │   │       ├── hero.dart
│       │   │   │   │       ├── provider.dart
│       │   │   │   │       └── wrapper.dart
│       │   │   │   └── exports.dart
│       │   │   ├── provider.dart
│       │   │   ├── route.dart
│       │   │   └── view.dart
│       │   ├── home/
│       │   │   ├── route.dart
│       │   │   └── view.dart
│       │   ├── modules/
│       │   │   ├── provider.dart
│       │   │   ├── route.dart
│       │   │   └── view.dart
│       │   ├── search/
│       │   │   ├── components/
│       │   │   │   ├── exports.dart
│       │   │   │   ├── results_grid.dart
│       │   │   │   └── search_bar.dart
│       │   │   ├── provider.dart
│       │   │   ├── route.dart
│       │   │   └── view.dart
│       │   ├── settings/
│       │   │   ├── components/
│       │   │   │   ├── appearance.dart
│       │   │   │   ├── exports.dart
│       │   │   │   └── tiles/
│       │   │   │       ├── choice.dart
│       │   │   │       ├── exports.dart
│       │   │   │       └── wrapper.dart
│       │   │   ├── route.dart
│       │   │   └── view.dart
│       │   └── view/
│       │       ├── components/
│       │       │   ├── appbar.dart
│       │       │   ├── body.dart
│       │       │   ├── content/
│       │       │   │   ├── content.dart
│       │       │   │   ├── exports.dart
│       │       │   │   └── provider.dart
│       │       │   ├── exports.dart
│       │       │   ├── hero.dart
│       │       │   └── overview.dart
│       │       ├── provider.dart
│       │       ├── route.dart
│       │       └── view.dart
│       ├── router/
│       │   ├── exports.dart
│       │   ├── navigator.dart
│       │   └── route/
│       │       ├── exports.dart
│       │       ├── info.dart
│       │       ├── page.dart
│       │       └── pages.dart
│       └── utils/
│           ├── animations.dart
│           ├── exports.dart
│           ├── placeholders.dart
│           ├── relative_scale.dart
│           ├── themer.dart
│           └── translations.dart
├── linux/
│   ├── .gitignore
│   ├── CMakeLists.txt
│   ├── flutter/
│   │   ├── CMakeLists.txt
│   │   ├── generated_plugin_registrant.cc
│   │   ├── generated_plugin_registrant.h
│   │   └── generated_plugins.cmake
│   ├── main.cc
│   ├── my_application.cc
│   └── my_application.h
├── package.json
├── packages/
│   ├── anilist/
│   │   ├── .gitignore
│   │   ├── .vscode/
│   │   │   └── settings.json
│   │   ├── README.md
│   │   ├── analysis_options.yaml
│   │   ├── lib/
│   │   │   ├── anilist.dart
│   │   │   ├── endpoints/
│   │   │   │   ├── exports.dart
│   │   │   │   ├── graphql.dart
│   │   │   │   ├── media.dart
│   │   │   │   ├── media_list.dart
│   │   │   │   ├── relation.dart
│   │   │   │   └── user.dart
│   │   │   ├── models/
│   │   │   │   ├── character.dart
│   │   │   │   ├── character_edge.dart
│   │   │   │   ├── character_role.dart
│   │   │   │   ├── exports.dart
│   │   │   │   ├── fuzzy_date.dart
│   │   │   │   ├── media.dart
│   │   │   │   ├── media_format.dart
│   │   │   │   ├── media_list_entry.dart
│   │   │   │   ├── media_list_sort.dart
│   │   │   │   ├── media_list_status.dart
│   │   │   │   ├── media_sort.dart
│   │   │   │   ├── media_status.dart
│   │   │   │   ├── media_type.dart
│   │   │   │   ├── relation_edge.dart
│   │   │   │   ├── relation_type.dart
│   │   │   │   ├── seasons.dart
│   │   │   │   ├── token.dart
│   │   │   │   └── user.dart
│   │   │   └── utils.dart
│   │   ├── pubspec.yaml
│   │   └── tests/
│   │       ├── _utils.dart
│   │       ├── search.dart
│   │       └── trends.dart
│   └── shared/
│       ├── .gitignore
│       ├── .vscode/
│       │   └── settings.json
│       ├── README.md
│       ├── analysis_options.yaml
│       ├── lib/
│       │   └── http.dart
│       └── pubspec.yaml
└── pubspec.yaml
Download .txt
SYMBOL INDEX (485 symbols across 130 files)

FILE: .phrasey/hooks/dart-sync.js
  function createTranslationDart (line 26) | async function createTranslationDart(phrasey, state, log) {
  function camel (line 89) | function camel(text) {

FILE: android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java
  class FlutterMultiDexApplication (line 18) | public class FlutterMultiDexApplication extends Application {
    method attachBaseContext (line 19) | @Override

FILE: cli/code_analysis.dart
  function main (line 6) | Future<void> main()
  function analyzeCode (line 20) | Future<void> analyzeCode()
  function checkCodeFormat (line 30) | Future<void> checkCodeFormat()

FILE: cli/prerequisites.dart
  function main (line 6) | Future<void> main(final List<String> args)

FILE: cli/run.dart
  function main (line 7) | Future<void> main(final List<String> args)

FILE: cli/tasks/build_runner.dart
  function main (line 6) | Future<void> main(final List<String> args)
  function runBuildRunner (line 12) | Future<void> runBuildRunner({

FILE: cli/tasks/i18n.dart
  function main (line 3) | Future<void> main(final List<String> args)

FILE: cli/tasks/icon.dart
  function getAndroidIconPath (line 19) | String getAndroidIconPath(final String code)
  function main (line 24) | Future<void> main()

FILE: cli/tasks/meta.dart
  function main (line 10) | Future<void> main()
  function getGeneratedAppMetaContent (line 16) | Future<String> getGeneratedAppMetaContent()

FILE: cli/tasks/version.dart
  function getVersion (line 7) | Future<String> getVersion()

FILE: cli/utils/logger.dart
  class Logger (line 3) | class Logger {
    method info (line 8) | void info(final Object text)
    method fatal (line 12) | void fatal(final Object text)
    method println (line 16) | void println()

FILE: cli/utils/paths.dart
  class Paths (line 4) | abstract class Paths {

FILE: lib/core/anilist/auth.dart
  class AnilistAuth (line 8) | abstract class AnilistAuth {
    method initialize (line 12) | Future<void> initialize()
    method authenticate (line 17) | Future<void> authenticate(final AnilistToken token)
    method unauthenticate (line 35) | Future<void> unauthenticate()
    method fetchUser (line 41) | Future<void> fetchUser()
    method updateAnilistClient (line 47) | void updateAnilistClient(final AnilistToken? token)

FILE: lib/core/anilist/credentials.dart
  class AnilistCredentials (line 1) | abstract class AnilistCredentials {

FILE: lib/core/anilist/translations.dart
  function getTitleCase (line 36) | String getTitleCase(final Translation translation)
  function getWatchtime (line 45) | String getWatchtime(final Translation translation)
  function getTitleCase (line 68) | String getTitleCase(final Translation translation)
  function getTitleCase (line 73) | String getTitleCase(final Translation translation)
  function getTitleCase (line 78) | String getTitleCase(final Translation translation)
  function getTitleCase (line 88) | String getTitleCase(final Translation translation)
  function getTitleCase (line 103) | String getTitleCase(final Translation translation)

FILE: lib/core/app/events.dart
  class AppEvent (line 3) | class AppEvent {
  class AppEvents (line 23) | abstract class AppEvents {

FILE: lib/core/app/loader.dart
  class AppLoader (line 9) | abstract class AppLoader {
    method initialize (line 12) | Future<void> initialize()
    method initializeAfterLoad (line 25) | Future<void> initializeAfterLoad()

FILE: lib/core/app/meta.dart
  class AppMeta (line 3) | abstract class AppMeta {

FILE: lib/core/database/cache/database.dart
  class CacheDatabase (line 7) | abstract class CacheDatabase {
    method initialize (line 18) | Future<void> initialize()
    method get (line 22) | Future<T?> get<T>(final String key)
    method set (line 38) | Future<void> set<T>(
    method delete (line 52) | Future<void> delete(final String key)
    method _removeExpiredData (line 54) | Future<void> _removeExpiredData()
    method _filterExpiredData (line 61) | void _filterExpiredData(

FILE: lib/core/database/secure/database.dart
  class SecureDatabase (line 9) | abstract class SecureDatabase {
    method initialize (line 19) | Future<void> initialize()
    method save (line 26) | Future<void> save()
    method encryptData (line 30) | String encryptData(final String data)
    method decryptData (line 33) | String decryptData(final String data)

FILE: lib/core/database/secure/schema.dart
  class SecureSchema (line 6) | @JsonSerializable()
    method toJson (line 18) | JsonMap toJson()
    method _anilistTokenFromJson (line 20) | AnilistToken? _anilistTokenFromJson(final dynamic value)
    method _anilistTokenToJson (line 22) | JsonMap? _anilistTokenToJson(final AnilistToken? value)

FILE: lib/core/database/settings/database.dart
  class SettingsDatabase (line 10) | abstract class SettingsDatabase {
    method initialize (line 17) | Future<void> initialize()
    method save (line 26) | Future<void> save()

FILE: lib/core/database/settings/schema.dart
  class SettingsSchema (line 7) | @JsonSerializable()
    method toJson (line 33) | JsonMap toJson()
    method _localeFromJson (line 35) | Locale? _localeFromJson(final String? value)
    method _localeToJson (line 37) | String? _localeToJson(final Locale? value)

FILE: lib/core/internals/deeplink.dart
  class Deeplink (line 7) | abstract class Deeplink {
    method initializeAfterLoad (line 8) | Future<void> initializeAfterLoad()
    method listen (line 14) | void listen()
    method handle (line 21) | void handle(final String path)

FILE: lib/core/internals/router/route.dart
  class InternalRoute (line 1) | abstract class InternalRoute {
    method matches (line 2) | bool matches(final String route)
    method handle (line 3) | Future<void> handle(final String route)

FILE: lib/core/internals/router/routes.dart
  class InternalRoutes (line 5) | abstract class InternalRoutes {
    method findMatch (line 8) | InternalRoute? findMatch(final String route)

FILE: lib/core/internals/router/routes/anilist.dart
  class AnilistAuthRoute (line 4) | class AnilistAuthRoute extends InternalRoute {
    method matches (line 6) | bool matches(final String route)
    method handle (line 9) | Future<void> handle(final String route)

FILE: lib/core/paths.dart
  class Paths (line 4) | abstract class Paths {
    method initialize (line 7) | Future<void> initialize()
  class AssetPaths (line 12) | abstract class AssetPaths {

FILE: lib/core/player/video_player.dart
  class PlayerPage (line 5) | class PlayerPage extends StatefulWidget {
    method createState (line 9) | _PlayerPageState createState()
  class _PlayerPageState (line 17) | class _PlayerPageState extends State<PlayerPage> {
    method initState (line 24) | void initState()
    method dispose (line 32) | void dispose()
    method _setDataSource (line 37) | Future<void> _setDataSource()
    method build (line 46) | Widget build(final BuildContext context)

FILE: lib/core/state/states.dart
  type States (line 1) | enum States {

FILE: lib/core/state/value.dart
  class StatedValue (line 4) | class StatedValue<T> {
    method _change (line 14) | void _change(
    method waiting (line 32) | void waiting([final T? value])
    method loading (line 36) | void loading([final T? value])
    method finish (line 40) | void finish(final T value)
    method fail (line 44) | void fail([
  class ListenableStatedValue (line 58) | class ListenableStatedValue<T> extends StatedValue<T> with ChangeNotifier {
    method _change (line 60) | void _change(

FILE: lib/core/tenka/manager.dart
  class TenkaManager (line 6) | abstract class TenkaManager {
    method initialize (line 10) | Future<void> initialize()
    method getExtractor (line 27) | Future<T> getExtractor<T>(final TenkaMetadata metadata)

FILE: lib/core/tenka/utils.dart
  function getTitleCase (line 5) | String getTitleCase(final Translation translation)

FILE: lib/core/themes/colors.dart
  class ForegroundColors (line 4) | abstract class ForegroundColors {
    method find (line 43) | Color? find(final String name)
    method names (line 45) | List<String> names()
    method getTitleCase (line 47) | String getTitleCase(

FILE: lib/core/themes/fonts.dart
  class Fonts (line 1) | abstract class Fonts {

FILE: lib/core/translator/translator.dart
  class Translator (line 10) | abstract class Translator {
    method initialize (line 15) | Future<void> initialize()
    method updateCurrentTranslation (line 24) | Future<void> updateCurrentTranslation()
    method hasTranslation (line 34) | bool hasTranslation(final Locale locale)
    method parseTranslation (line 37) | Future<Translation> parseTranslation(final Locale locale)

FILE: lib/core/utils/dates.dart
  class PrettyDates (line 1) | abstract class PrettyDates {
    method constructDateString (line 2) | String constructDateString({
    method toDateString (line 9) | String toDateString(final DateTime date)

FILE: lib/core/utils/durations.dart
  class PrettyDurations (line 3) | abstract class PrettyDurations {
    method prettyHoursMinutesShort (line 4) | String prettyHoursMinutesShort(

FILE: lib/core/utils/kawaii_faces.dart
  class KawaiiFaces (line 2) | abstract class KawaiiFaces {

FILE: lib/core/utils/provider.dart
  class StatedChangeNotifier (line 3) | class StatedChangeNotifier extends ChangeNotifier {
    method dispose (line 7) | void dispose()

FILE: lib/main.dart
  function main (line 4) | void main()

FILE: lib/ui/base.dart
  class BaseApp (line 4) | class BaseApp extends StatefulWidget {
    method createState (line 10) | State<BaseApp> createState()
  class _BaseAppState (line 13) | class _BaseAppState extends State<BaseApp> {
    method initState (line 19) | void initState()
    method build (line 51) | Widget build(final BuildContext context)
  class ClassicWrapper (line 86) | class ClassicWrapper extends StatelessWidget {
    method build (line 95) | Widget build(final BuildContext context)

FILE: lib/ui/components/anilist/media_row.dart
  class AnilistMediaRow (line 4) | class AnilistMediaRow extends StatelessWidget {
    method build (line 13) | Widget build(final BuildContext context)
    method getTileWidth (line 27) | double getTileWidth(final RelativeScaler r)

FILE: lib/ui/components/anilist/media_slide.dart
  class AnilistMediaSlide (line 4) | class AnilistMediaSlide extends StatefulWidget {
    method createState (line 13) | State<AnilistMediaSlide> createState()
  class _AnilistMediaSlideState (line 16) | class _AnilistMediaSlideState extends State<AnilistMediaSlide>
    method buildThumbnail (line 18) | Widget buildThumbnail(final BuildContext context)
    method buildContent (line 30) | Widget buildContent(final BuildContext context)
    method build (line 85) | Widget build(final BuildContext context)

FILE: lib/ui/components/anilist/media_tile.dart
  class AnilistMediaTile (line 4) | class AnilistMediaTile extends StatelessWidget {
    method build (line 15) | Widget build(final BuildContext context)
    method buildChip (line 93) | Widget buildChip({
    method buildFormatChip (line 138) | Widget buildFormatChip({
    method buildWatchtimeChip (line 154) | Widget buildWatchtimeChip({
    method buildRatingChip (line 167) | Widget buildRatingChip({
    method buildAirdateChip (line 181) | Widget buildAirdateChip({
    method buildNSFWChip (line 195) | Widget buildNSFWChip({

FILE: lib/ui/components/body_padding.dart
  class HorizontalBodyPadding (line 4) | class HorizontalBodyPadding extends StatelessWidget {
    method build (line 13) | Widget build(final BuildContext context)
    method paddingValue (line 19) | double paddingValue(final BuildContext context)
    method padding (line 22) | EdgeInsets padding(final BuildContext context)

FILE: lib/ui/components/cross_draggable_scroll_behaviour.dart
  class DraggableScrollBehavior (line 4) | class DraggableScrollBehavior extends MaterialScrollBehavior {
  class DraggableScrollConfiguration (line 12) | class DraggableScrollConfiguration extends StatelessWidget {
    method build (line 21) | Widget build(final BuildContext context)

FILE: lib/ui/components/kawaii_face.dart
  class KawaiiFace (line 3) | class KawaiiFace extends StatelessWidget {
    method build (line 16) | Widget build(final BuildContext context)

FILE: lib/ui/components/rounded_back_button.dart
  class RoundedBackButton (line 3) | class RoundedBackButton extends StatelessWidget {
    method build (line 9) | Widget build(final BuildContext context)

FILE: lib/ui/components/scrollable_row.dart
  class ScrollableRow (line 5) | class ScrollableRow extends StatefulWidget {
    method createState (line 14) | State<ScrollableRow> createState()
  class _ScrollableRowState (line 17) | class _ScrollableRowState extends State<ScrollableRow> {
    method initState (line 21) | void initState()
    method dispose (line 27) | void dispose()
    method buildSpacer (line 32) | SizedBox buildSpacer(final BuildContext context)
    method build (line 36) | Widget build(final BuildContext context)

FILE: lib/ui/components/slideshow.dart
  class Slideshow (line 5) | class Slideshow extends StatefulWidget {
    method createState (line 18) | State<Slideshow> createState()
  class _SlideshowState (line 21) | class _SlideshowState extends State<Slideshow>
    method initState (line 28) | void initState()
    method dispose (line 38) | void dispose()
    method scheduleSlideChange (line 44) | void scheduleSlideChange()
    method build (line 56) | Widget build(final BuildContext context)

FILE: lib/ui/components/stated_builder.dart
  class StatedBuilder (line 3) | class StatedBuilder extends StatelessWidget {
    method build (line 20) | Widget build(final BuildContext context)

FILE: lib/ui/components/super_imposer.dart
  class SuperImposerEntry (line 4) | class SuperImposerEntry {
  class SuperImposer (line 17) | class SuperImposer extends StatefulWidget {
    method createState (line 23) | State<SuperImposer> createState()
    method insert (line 33) | void insert(final SuperImposerEntry entry)
    method remove (line 38) | void remove(final SuperImposerEntry entry)
  class _SuperImposerState (line 44) | class _SuperImposerState extends State<SuperImposer> {
    method initState (line 48) | void initState()
    method dispose (line 57) | void dispose()
    method build (line 64) | Widget build(final BuildContext context)

FILE: lib/ui/components/toast.dart
  class Toast (line 5) | class Toast extends StatefulWidget {
    method createState (line 18) | State<Toast> createState()
    method show (line 20) | Future<void> show()
    method showToast (line 27) | Future<void> showToast(final Toast toast)
  class _ToastState (line 42) | class _ToastState extends State<Toast> {
    method initState (line 46) | void initState()
    method build (line 61) | Widget build(final BuildContext context)

FILE: lib/ui/pages/_home/components/appbar.dart
  class UnderScoreHomePageAppBar (line 5) | class UnderScoreHomePageAppBar extends StatefulWidget
    method createState (line 12) | State<UnderScoreHomePageAppBar> createState()
  class _UnderScoreHomePageAppBarState (line 19) | class _UnderScoreHomePageAppBarState extends State<UnderScoreHomePageApp...
    method initState (line 23) | void initState()
    method dispose (line 32) | void dispose()
    method build (line 38) | Widget build(final BuildContext context)

FILE: lib/ui/pages/_home/components/body.dart
  class UnderScoreHomePageBody (line 5) | class UnderScoreHomePageBody extends StatelessWidget {
    method buildOnWaiting (line 10) | Widget buildOnWaiting(final BuildContext context)
    method buildCarousel (line 15) | Widget buildCarousel({
    method buildText (line 30) | Widget buildText(
    method buildTrendsSlideshow (line 40) | Widget buildTrendsSlideshow(final StatedValue<List<AnilistMedia>> data)
    method buildBody (line 58) | Widget buildBody(final BuildContext context)
    method build (line 109) | Widget build(final BuildContext context)

FILE: lib/ui/pages/_home/components/bottombar.dart
  class UnderScoreHomePageBottomBar (line 5) | class UnderScoreHomePageBottomBar extends StatelessWidget {
    method showTypeModal (line 13) | Future<void> showTypeModal({
    method build (line 47) | Widget build(final BuildContext context)

FILE: lib/ui/pages/_home/provider.dart
  class UnderScoreHomePageProvider (line 3) | class UnderScoreHomePageProvider extends StatedChangeNotifier {
    method initialize (line 20) | Future<void> initialize()
    method setType (line 30) | Future<void> setType(final TenkaType type)
    method fetch (line 37) | void fetch(final TenkaType type)
    method fetchTrendingAnimes (line 51) | Future<void> fetchTrendingAnimes()
    method fetchTopOngoingAnimes (line 63) | Future<void> fetchTopOngoingAnimes()
    method fetchMostPopularAnimes (line 75) | Future<void> fetchMostPopularAnimes()
    method fetchTrendingMangas (line 87) | Future<void> fetchTrendingMangas()
    method fetchTopOngoingMangas (line 99) | Future<void> fetchTopOngoingMangas()
    method fetchMostPopularMangas (line 111) | Future<void> fetchMostPopularMangas()
    method getHomeLastVisited (line 125) | Future<TenkaType?> getHomeLastVisited()
    method setHomeLastVisited (line 130) | Future<void> setHomeLastVisited(final TenkaType type)

FILE: lib/ui/pages/_home/view.dart
  class UnderScoreHomePage (line 6) | class UnderScoreHomePage extends StatelessWidget {
    method build (line 12) | Widget build(final BuildContext context)

FILE: lib/ui/pages/_splash/view.dart
  class UnderScoreSplashPage (line 4) | class UnderScoreSplashPage extends StatelessWidget {
    method build (line 10) | Widget build(final BuildContext context)

FILE: lib/ui/pages/anilist/components/body/login.dart
  class AnilistPageLoginBody (line 4) | class AnilistPageLoginBody extends StatelessWidget {
    method build (line 10) | Widget build(final BuildContext context)

FILE: lib/ui/pages/anilist/components/body/profile/body.dart
  class AnilistPageProfileBodyBody (line 5) | class AnilistPageProfileBodyBody extends StatelessWidget {
    method buildOnWaiting (line 13) | Widget buildOnWaiting(final BuildContext context)
    method buildGridRow (line 18) | Widget buildGridRow({
    method getMediaProgressText (line 33) | String getMediaProgressText(final AnilistMedia media)
    method buildTiles (line 42) | List<Widget> buildTiles({
    method build (line 63) | Widget build(final BuildContext context)

FILE: lib/ui/pages/anilist/components/body/profile/hero.dart
  class AnilistPageProfileBodyHero (line 5) | class AnilistPageProfileBodyHero extends StatelessWidget {
    method buildStatisticsChild (line 13) | Widget buildStatisticsChild({
    method buildStatisticsTiles (line 37) | List<Widget> buildStatisticsTiles(final BuildContext context)
    method buildHeroContent (line 96) | Widget buildHeroContent(final BuildContext context)
    method build (line 133) | Widget build(final BuildContext context)

FILE: lib/ui/pages/anilist/components/body/profile/provider.dart
  class AnilistProfileCategory (line 5) | class AnilistProfileCategory {
    method copyWith (line 19) | AnilistProfileCategory copyWith({
  class AnilistPageProfileProvider (line 37) | class AnilistPageProfileProvider extends StatedChangeNotifier {
    method initialize (line 50) | Future<void> initialize()
    method change (line 61) | Future<void> change(final AnilistProfileCategory nCategory)
    method fetch (line 68) | Future<void> fetch()
    method getAnilistLastVisitedCategory (line 94) | Future<AnilistProfileCategory?> getAnilistLastVisitedCategory()
    method setAnilistLastVisitedCategory (line 100) | Future<void> setAnilistLastVisitedCategory(

FILE: lib/ui/pages/anilist/components/body/profile/wrapper.dart
  class AnilistPageProfileBody (line 8) | class AnilistPageProfileBody extends StatefulWidget {
    method createState (line 17) | State<AnilistPageProfileBody> createState()
  class _AnilistPageProfileBodyState (line 20) | class _AnilistPageProfileBodyState extends State<AnilistPageProfileBody> {
    method build (line 22) | Widget build(final BuildContext context)
  class _AnilistControlsHeaderDelegate (line 70) | class _AnilistControlsHeaderDelegate extends SliverPersistentHeaderDeleg...
    method showButtonOptionsModal (line 75) | Future<void> showButtonOptionsModal<T>({
    method buildButton (line 111) | Widget buildButton<T>({
    method build (line 148) | Widget build(final BuildContext context, final _, final __)
    method shouldRebuild (line 208) | bool shouldRebuild(final _AnilistControlsHeaderDelegate oldDelegate)

FILE: lib/ui/pages/anilist/provider.dart
  class AnilistPageProvider (line 4) | class AnilistPageProvider extends StatedChangeNotifier {
    method initialize (line 7) | void initialize()
    method dispose (line 19) | void dispose()
    method fetch (line 25) | Future<void> fetch()

FILE: lib/ui/pages/anilist/route.dart
  class AnilistPageRoute (line 5) | class AnilistPageRoute extends RoutePage {
    method matches (line 7) | bool matches(final RouteInfo route)
    method build (line 10) | Widget build(final RouteInfo route)
  function pushToAnilistPage (line 16) | Future<void> pushToAnilistPage()

FILE: lib/ui/pages/anilist/view.dart
  class AnilistPage (line 6) | class AnilistPage extends StatelessWidget {
    method build (line 12) | Widget build(final BuildContext context)

FILE: lib/ui/pages/home/route.dart
  class HomePageRoute (line 5) | class HomePageRoute extends RoutePage {
    method matches (line 7) | bool matches(final RouteInfo route)
    method build (line 10) | Widget build(final RouteInfo route)
  function pushToViewPage (line 16) | Future<void> pushToViewPage()

FILE: lib/ui/pages/home/view.dart
  class HomePage (line 6) | class HomePage extends StatefulWidget {
    method createState (line 12) | State<HomePage> createState()
  class _HomePageState (line 15) | class _HomePageState extends State<HomePage> {
    method initState (line 17) | void initState()
    method build (line 27) | Widget build(final BuildContext context)

FILE: lib/ui/pages/modules/provider.dart
  class ModulesPageProvider (line 3) | class ModulesPageProvider extends StatedChangeNotifier {
    method install (line 7) | Future<void> install(final TenkaMetadata metadata)
    method uninstall (line 16) | Future<void> uninstall(final TenkaMetadata metadata)

FILE: lib/ui/pages/modules/route.dart
  class ModulesPageRoute (line 5) | class ModulesPageRoute extends RoutePage {
    method matches (line 7) | bool matches(final RouteInfo route)
    method build (line 10) | Widget build(final RouteInfo route)
  function pushToModulesPage (line 16) | Future<void> pushToModulesPage()

FILE: lib/ui/pages/modules/view.dart
  class ModulesPage (line 5) | class ModulesPage extends StatelessWidget {
    method createOnPressed (line 10) | VoidCallback createOnPressed({
    method buildModuleTile (line 22) | Widget buildModuleTile({
    method build (line 96) | Widget build(final BuildContext context)

FILE: lib/ui/pages/search/components/results_grid.dart
  class ResultsGrid (line 4) | class ResultsGrid extends StatelessWidget {
    method buildGridRow (line 12) | Widget buildGridRow({
    method buildTiles (line 26) | List<Widget> buildTiles({
    method build (line 32) | Widget build(final BuildContext context)

FILE: lib/ui/pages/search/components/search_bar.dart
  class SearchBar (line 6) | class SearchBar extends StatefulWidget implements PreferredSizeWidget {
    method createState (line 12) | State<SearchBar> createState()
  class _SearchBarState (line 20) | class _SearchBarState extends State<SearchBar> {
    method initState (line 27) | void initState()
    method dispose (line 33) | void dispose()
    method onInputChange (line 39) | void onInputChange(
    method onCloseButtonTap (line 54) | void onCloseButtonTap(final SearchPageProvider provider)
    method build (line 65) | Widget build(final BuildContext context)

FILE: lib/ui/pages/search/provider.dart
  class SearchPageProvider (line 3) | class SearchPageProvider extends StatedChangeNotifier {
    method reset (line 7) | void reset()
    method search (line 12) | Future<void> search(final String terms)

FILE: lib/ui/pages/search/route.dart
  class SearchPageRoute (line 5) | class SearchPageRoute extends RoutePage {
    method matches (line 7) | bool matches(final RouteInfo route)
    method build (line 10) | Widget build(final RouteInfo route)
  function pushToSearchPage (line 16) | Future<void> pushToSearchPage()

FILE: lib/ui/pages/search/view.dart
  class SearchPage (line 6) | class SearchPage extends StatefulWidget {
    method createState (line 12) | State<SearchPage> createState()
  class _SearchPageState (line 15) | class _SearchPageState extends State<SearchPage> {
    method build (line 17) | Widget build(final BuildContext context)

FILE: lib/ui/pages/settings/components/appearance.dart
  class ApperanceSettings (line 5) | class ApperanceSettings extends StatefulWidget {
    method createState (line 11) | State<ApperanceSettings> createState()
  class _ApperanceSettingsState (line 14) | class _ApperanceSettingsState extends State<ApperanceSettings> {
    method saveSettings (line 15) | Future<void> saveSettings()
    method build (line 22) | Widget build(final BuildContext context)

FILE: lib/ui/pages/settings/components/tiles/choice.dart
  class MultiChoiceListTile (line 4) | class MultiChoiceListTile<T> extends StatefulWidget {
    method createState (line 21) | State<MultiChoiceListTile<T>> createState()
  class _MultiChoiceListTileState (line 24) | class _MultiChoiceListTileState<T> extends State<MultiChoiceListTile<T>> {
    method build (line 28) | Widget build(final BuildContext context)

FILE: lib/ui/pages/settings/components/tiles/wrapper.dart
  class SettingsBodyWrapper (line 3) | class SettingsBodyWrapper extends StatelessWidget {
    method build (line 12) | Widget build(final BuildContext context)

FILE: lib/ui/pages/settings/route.dart
  class SettingsPageRoute (line 5) | class SettingsPageRoute extends RoutePage {
    method matches (line 7) | bool matches(final RouteInfo route)
    method build (line 10) | Widget build(final RouteInfo route)
  function pushToSettingsPage (line 16) | Future<void> pushToSettingsPage()

FILE: lib/ui/pages/settings/view.dart
  class SettingsPage (line 5) | class SettingsPage extends StatefulWidget {
    method createState (line 11) | State<SettingsPage> createState()
  type _SettingsCategory (line 14) | enum _SettingsCategory {
  function getTitleCase (line 19) | String getTitleCase(final Translation translation)
  class _SettingsPageState (line 24) | class _SettingsPageState extends State<SettingsPage> {
    method buildAppBar (line 27) | PreferredSizeWidget buildAppBar(final BuildContext context)
    method buildBody (line 80) | Widget buildBody(final BuildContext context)
    method build (line 85) | Widget build(final BuildContext context)

FILE: lib/ui/pages/view/components/appbar.dart
  class ViewPageAppBar (line 5) | class ViewPageAppBar extends StatelessWidget implements PreferredSizeWid...
    method buildAppBarButton (line 10) | Widget buildAppBarButton({
    method build (line 52) | Widget build(final BuildContext context)

FILE: lib/ui/pages/view/components/body.dart
  type _ViewPageTabs (line 8) | enum _ViewPageTabs {
  function getTitleCase (line 14) | String getTitleCase(final Translation translation, final TenkaType type)
  class ViewPageBody (line 24) | class ViewPageBody extends StatefulWidget {
    method createState (line 30) | State<ViewPageBody> createState()
  class _ViewPageBodyState (line 33) | class _ViewPageBodyState extends State<ViewPageBody>
    method initState (line 44) | void initState()
    method dispose (line 59) | void dispose()
    method buildTabBarViewPage (line 65) | Widget buildTabBarViewPage({
    method build (line 81) | Widget build(final BuildContext context)
  class _SliverTabBarHeaderDelegate (line 152) | class _SliverTabBarHeaderDelegate extends SliverPersistentHeaderDelegate {
    method build (line 158) | Widget build(final BuildContext context, final _, final __)
    method shouldRebuild (line 165) | bool shouldRebuild(final _SliverTabBarHeaderDelegate oldDelegate)

FILE: lib/ui/pages/view/components/content/content.dart
  class ViewPageContent (line 7) | class ViewPageContent extends StatelessWidget {
    method build (line 17) | Widget build(final BuildContext context)
  class EpisodeList (line 76) | class EpisodeList extends StatefulWidget {
    method createState (line 80) | _EpisodeListState createState()
  class _EpisodeListState (line 83) | class _EpisodeListState extends State<EpisodeList> {
    method build (line 87) | Widget build(final BuildContext context)

FILE: lib/ui/pages/view/components/content/provider.dart
  class ViewPageContentProvider (line 3) | class ViewPageContentProvider extends StatedChangeNotifier {
    method initialize (line 16) | Future<void> initialize()
    method change (line 24) | Future<void> change(final TenkaMetadata nMetadata)
    method search (line 33) | Future<List<SearchInfo>> search(final String terms)
    method fetch (line 45) | Future<void> fetch()
    method fetchAnime (line 56) | Future<void> fetchAnime()
    method getCastedExtractor (line 104) | T getCastedExtractor<T>()
    method getLastUsedExtractorKey (line 112) | String getLastUsedExtractorKey(final TenkaType type)
    method getLastUsedExtractor (line 115) | Future<String?> getLastUsedExtractor(final TenkaType type)
    method setLastUsedExtractor (line 121) | Future<void> setLastUsedExtractor(
    method getLastComputedKey (line 128) | String getLastComputedKey({
    method getLastComputed (line 135) | Future<String?> getLastComputed({
    method setLastComputed (line 148) | Future<void> setLastComputed({

FILE: lib/ui/pages/view/components/hero.dart
  class ViewPageHero (line 4) | class ViewPageHero extends StatelessWidget {
    method build (line 13) | Widget build(final BuildContext context)

FILE: lib/ui/pages/view/components/overview.dart
  class ViewPageOverview (line 4) | class ViewPageOverview extends StatelessWidget {
    method buildCharacterTile (line 12) | Widget buildCharacterTile({
    method build (line 77) | Widget build(final BuildContext context)

FILE: lib/ui/pages/view/provider.dart
  class ViewPageViewProvider (line 3) | class ViewPageViewProvider extends ChangeNotifier {
    method setFloatingAppBarVisibility (line 6) | void setFloatingAppBarVisibility({
  class ViewPageProvider (line 16) | class ViewPageProvider extends StatedChangeNotifier {
    method initialize (line 20) | Future<void> initialize({
    method fetch (line 36) | Future<void> fetch()

FILE: lib/ui/pages/view/route.dart
  class ViewPageRoute (line 5) | class ViewPageRoute extends RoutePage {
    method matches (line 9) | bool matches(final RouteInfo route)
    method parseId (line 11) | int parseId(final String name)
    method build (line 15) | Widget build(final RouteInfo route)
  function pushToViewPage (line 23) | Future<void> pushToViewPage({
  function pushToViewPageFromMedia (line 29) | Future<void> pushToViewPageFromMedia(final AnilistMedia media)

FILE: lib/ui/pages/view/view.dart
  class ViewPage (line 6) | class ViewPage extends StatelessWidget {
    method build (line 17) | Widget build(final BuildContext context)

FILE: lib/ui/router/navigator.dart
  class RoutePusher (line 10) | class RoutePusher {

FILE: lib/ui/router/route/info.dart
  class RouteInfo (line 3) | class RouteInfo {

FILE: lib/ui/router/route/page.dart
  class RoutePage (line 4) | abstract class RoutePage {
    method matches (line 7) | bool matches(final RouteInfo route)
    method build (line 8) | Widget build(final RouteInfo route)
    method buildRoutePage (line 10) | Route<dynamic> buildRoutePage(final RouteInfo route)
    method defaultTransitionBuilder (line 13) | Widget defaultTransitionBuilder(
    method defaultRoutePageBuilder (line 27) | Route<dynamic> defaultRoutePageBuilder({

FILE: lib/ui/router/route/pages.dart
  class RoutePages (line 11) | abstract class RoutePages {
    method findMatch (line 19) | RoutePage? findMatch(final RouteInfo route)

FILE: lib/ui/utils/animations.dart
  class AnimationDurations (line 3) | abstract class AnimationDurations {
    method onlyIfEnabled (line 8) | Duration onlyIfEnabled(final Duration duration)

FILE: lib/ui/utils/placeholders.dart
  class Placeholders (line 4) | abstract class Placeholders {

FILE: lib/ui/utils/relative_scale.dart
  class RelativeScaler (line 3) | class RelativeScaler extends InheritedWidget {
    method updateShouldNotify (line 16) | bool updateShouldNotify(final RelativeScaler oldWidget)
    method scale (line 19) | double scale(
    method responsive (line 28) | T responsive<T>(
    method responsiveBuilder (line 37) | T responsiveBuilder<T>(
  class RelativeScaleData (line 47) | class RelativeScaleData {
    method scale (line 59) | double scale(
    method responsive (line 68) | T responsive<T>(
    method responsiveBuilder (line 83) | T responsiveBuilder<T>(
    method copyWith (line 98) | RelativeScaleData copyWith({
    method getScaleMultiplier (line 115) | double getScaleMultiplier()
    method getScreenSize (line 119) | Size getScreenSize(final BuildContext context)

FILE: lib/ui/utils/themer.dart
  class Themer (line 5) | abstract class Themer {
    method _findColor (line 6) | Color _findColor(final String? color, final Color fallback)
    method getCurrentTheme (line 11) | ThemerThemeData getCurrentTheme()
    method defaultTheme (line 25) | ThemerThemeData defaultTheme()
  class ThemerThemeData (line 28) | class ThemerThemeData {
    method getThemeData (line 39) | ThemeData getThemeData(final BuildContext context)

FILE: lib/ui/utils/translations.dart
  class TranslationWrapper (line 3) | class TranslationWrapper extends InheritedWidget {
    method updateShouldNotify (line 13) | bool updateShouldNotify(final TranslationWrapper oldWidget)
    method of (line 18) | TranslationWrapper of(final BuildContext context)

FILE: linux/flutter/generated_plugin_registrant.cc
  function fl_register_plugins (line 13) | void fl_register_plugins(FlPluginRegistry* registry) {

FILE: linux/main.cc
  function main (line 3) | int main(int argc, char** argv) {

FILE: linux/my_application.cc
  type _MyApplication (line 10) | struct _MyApplication {
  function my_application_activate (line 18) | static void my_application_activate(GApplication* application) {
  function gboolean (line 66) | static gboolean my_application_local_command_line(GApplication* applicat...
  function my_application_dispose (line 85) | static void my_application_dispose(GObject* object) {
  function my_application_class_init (line 91) | static void my_application_class_init(MyApplicationClass* klass) {
  function my_application_init (line 97) | static void my_application_init(MyApplication* self) {}
  function MyApplication (line 99) | MyApplication* my_application_new() {

FILE: packages/anilist/lib/endpoints/graphql.dart
  class AnilistGraphQLRequest (line 6) | class AnilistGraphQLRequest {
  class AnilistGraphQLResponse (line 21) | class AnilistGraphQLResponse {
  class AnilistGraphQL (line 40) | abstract class AnilistGraphQL {
    method updateClient (line 51) | void updateClient({
    method request (line 63) | Future<AnilistGraphQLResponse> request(

FILE: packages/anilist/lib/endpoints/media.dart
  class AnilistMediaEndpoints (line 5) | abstract class AnilistMediaEndpoints {
    method fetchId (line 6) | Future<AnilistMedia> fetchId(
    method search (line 30) | Future<List<AnilistMedia>> search(
    method trendingAnimes (line 43) | Future<List<AnilistMedia>> trendingAnimes()
    method topOngoingAnimes (line 72) | Future<List<AnilistMedia>> topOngoingAnimes()
    method mostPopularAnimes (line 94) | Future<List<AnilistMedia>> mostPopularAnimes()
    method trendingMangas (line 110) | Future<List<AnilistMedia>> trendingMangas()
    method topOngoingMangas (line 127) | Future<List<AnilistMedia>> topOngoingMangas()
    method mostPopularMangas (line 149) | Future<List<AnilistMedia>> mostPopularMangas()
    method fetchBulk (line 165) | Future<List<AnilistMedia>> fetchBulk(

FILE: packages/anilist/lib/endpoints/media_list.dart
  class AnilistMediaListEndpoints (line 5) | abstract class AnilistMediaListEndpoints {
    method fetch (line 6) | Future<List<AnilistMedia>> fetch({

FILE: packages/anilist/lib/endpoints/relation.dart
  class AnilistMediaRelationEndpoints (line 5) | abstract class AnilistMediaRelationEndpoints {
    method fetchRelations (line 6) | Future<List<AnilistRelationEdge>> fetchRelations(

FILE: packages/anilist/lib/endpoints/user.dart
  class AnilistUserEndpoints (line 5) | abstract class AnilistUserEndpoints {
    method getAuthenticatedUser (line 6) | Future<AnilistUser> getAuthenticatedUser()
    method search (line 28) | Future<List<AnilistMedia>> search(
    method trendingAnimes (line 41) | Future<List<AnilistMedia>> trendingAnimes()
    method topOngoingAnimes (line 70) | Future<List<AnilistMedia>> topOngoingAnimes()
    method mostPopularAnimes (line 92) | Future<List<AnilistMedia>> mostPopularAnimes()
    method trendingMangas (line 108) | Future<List<AnilistMedia>> trendingMangas()
    method topOngoingMangas (line 125) | Future<List<AnilistMedia>> topOngoingMangas()
    method mostPopularMangas (line 147) | Future<List<AnilistMedia>> mostPopularMangas()
    method fetchBulk (line 163) | Future<List<AnilistMedia>> fetchBulk(

FILE: packages/anilist/lib/models/character.dart
  class AnilistCharacter (line 5) | class AnilistCharacter {

FILE: packages/anilist/lib/models/character_edge.dart
  class AnilistCharacterEdge (line 5) | class AnilistCharacterEdge {

FILE: packages/anilist/lib/models/character_role.dart
  type AnilistCharacterRole (line 3) | enum AnilistCharacterRole {
  function parseAnilistCharacterRole (line 13) | AnilistCharacterRole parseAnilistCharacterRole(final String value)

FILE: packages/anilist/lib/models/fuzzy_date.dart
  class AnilistFuzzyDate (line 3) | class AnilistFuzzyDate {

FILE: packages/anilist/lib/models/media.dart
  class AnilistMedia (line 13) | class AnilistMedia {
    method fetchAll (line 72) | Future<void> fetchAll()

FILE: packages/anilist/lib/models/media_format.dart
  type AnilistMediaFormat (line 1) | enum AnilistMediaFormat {
  function parseAnilistMediaFormat (line 32) | AnilistMediaFormat parseAnilistMediaFormat(final String value)

FILE: packages/anilist/lib/models/media_list_entry.dart
  class AnilistMediaListEntry (line 5) | class AnilistMediaListEntry {

FILE: packages/anilist/lib/models/media_list_sort.dart
  type AnilistMediaListSort (line 3) | enum AnilistMediaListSort {

FILE: packages/anilist/lib/models/media_list_status.dart
  type AnilistMediaListStatus (line 3) | enum AnilistMediaListStatus {
  function parseAnilistMediaListStatus (line 16) | AnilistMediaListStatus parseAnilistMediaListStatus(final String value)

FILE: packages/anilist/lib/models/media_sort.dart
  type AnilistMediaSort (line 3) | enum AnilistMediaSort {

FILE: packages/anilist/lib/models/media_status.dart
  type AnilistMediaStatus (line 3) | enum AnilistMediaStatus {
  function parseAnilistMediaStatus (line 24) | AnilistMediaStatus parseAnilistMediaStatus(final String value)

FILE: packages/anilist/lib/models/media_type.dart
  type AnilistMediaType (line 3) | enum AnilistMediaType {
  function parseAnilistMediaType (line 12) | AnilistMediaType parseAnilistMediaType(final String value)

FILE: packages/anilist/lib/models/relation_edge.dart
  class AnilistRelationEdge (line 5) | class AnilistRelationEdge {

FILE: packages/anilist/lib/models/relation_type.dart
  type AnilistRelationType (line 3) | enum AnilistRelationType {
  function parseAnilistRelationType (line 32) | AnilistRelationType parseAnilistRelationType(final String value)

FILE: packages/anilist/lib/models/seasons.dart
  type AnimeSeasons (line 3) | enum AnimeSeasons {
  function parseAnimeSeason (line 14) | AnimeSeasons parseAnimeSeason(final String code)
  function getAnimeSeasonFromMonth (line 17) | AnimeSeasons getAnimeSeasonFromMonth(final int month)

FILE: packages/anilist/lib/models/token.dart
  class AnilistToken (line 1) | class AnilistToken {

FILE: packages/anilist/lib/models/user.dart
  class AnilistUserStatistics (line 3) | class AnilistUserStatistics {
  class AnilistUser (line 17) | class AnilistUser {

FILE: packages/anilist/lib/utils.dart
  function stripHtmlTags (line 1) | String stripHtmlTags(final String text)
  function replaceHtmlEntities (line 19) | String replaceHtmlEntities(final String text)
  function cleanHtml (line 27) | String cleanHtml(final String text)

FILE: packages/anilist/tests/_utils.dart
  function stringifyAnilistCharacterEdge (line 3) | String stringifyAnilistCharacterEdge(final AnilistCharacterEdge edge)
  function stringifyAnilistCharacter (line 10) | String stringifyAnilistCharacter(final AnilistCharacter character)
  function stringifyAnilistMedia (line 31) | String stringifyAnilistMedia(final AnilistMedia media)
  function padLeftMultilineString (line 71) | String padLeftMultilineString(final String text, [final int spaces = 1])

FILE: packages/anilist/tests/search.dart
  function main (line 7) | Future<void> main()

FILE: packages/anilist/tests/trends.dart
  type _TrendingFn (line 7) | typedef _TrendingFn = Future<List<AnilistMedia>> Function();
  function main (line 9) | Future<void> main()
Condensed preview — 211 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (318K chars).
[
  {
    "path": ".github/workflows/code-analysis.yml",
    "chars": 767,
    "preview": "name: Code Analysis\n\non:\n    push:\n        branches:\n            - main\n            - next\n        paths:\n            - "
  },
  {
    "path": ".gitignore",
    "chars": 384,
    "preview": "*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\nmigrate_working_dir/\n*.iml\n*.ipr\n*.iws\n.idea/\n**/do"
  },
  {
    "path": ".metadata",
    "chars": 964,
    "preview": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrade"
  },
  {
    "path": ".phrasey/config.toml",
    "chars": 278,
    "preview": "[input]\nfiles = [\"../i18n/**.toml\"]\nformat = \"toml\"\nfallback = \"../i18n/en.toml\"\n\n[schema]\nfile = \"./schema.toml\"\nformat"
  },
  {
    "path": ".phrasey/hooks/dart-sync.js",
    "chars": 2640,
    "preview": "const p = require(\"path\");\nconst fs = require(\"fs-extra\");\nconst { rootDir, appI18nDir } = require(\"./utils\");\n\n/**\n * @"
  },
  {
    "path": ".phrasey/hooks/utils.js",
    "chars": 248,
    "preview": "const p = require(\"path\");\n\nconst rootDir = p.resolve(__dirname, \"../..\");\nconst rootI18nDir = p.join(rootDir, \"i18n\");\n"
  },
  {
    "path": ".phrasey/schema.toml",
    "chars": 4014,
    "preview": "[[keys]]\nname = \"Anime\"\ndescription = \"Anime\"\n\n[[keys]]\nname = \"Manga\"\ndescription = \"Manga\"\n\n[[keys]]\nname = \"SearchAnA"
  },
  {
    "path": ".prettierrc",
    "chars": 44,
    "preview": "{\n    \"tabWidth\": 4,\n    \"useTabs\": false\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "chars": 258,
    "preview": "{\n    \"editor.formatOnSave\": true,\n    \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n    \"[dart]\": {\n        \"edi"
  },
  {
    "path": "LICENSE",
    "chars": 35134,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "README.md",
    "chars": 1789,
    "preview": "<p align=\"center\">\n    <img src=\"https://github.com/yukino-org/media/blob/main/images/subbanners/gh-kazahana-banner.png?"
  },
  {
    "path": "analysis_options.yaml",
    "chars": 103,
    "preview": "include: package:devx/analysis_options.yaml\n\nlinter:\n    rules:\n        prefer_relative_imports: false\n"
  },
  {
    "path": "android/.gitignore",
    "chars": 285,
    "preview": "gradle-wrapper.jar\n/.gradle\n/captures/\n/gradlew\n/gradlew.bat\n/local.properties\nGeneratedPluginRegistrant.java\n\n# Remembe"
  },
  {
    "path": "android/app/build.gradle",
    "chars": 1907,
    "preview": "def localProperties = new Properties()\ndef localPropertiesFile = rootProject.file('local.properties')\nif (localPropertie"
  },
  {
    "path": "android/app/src/debug/AndroidManifest.xml",
    "chars": 183,
    "preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.example.kazahana\">\n    <uses-permi"
  },
  {
    "path": "android/app/src/main/AndroidManifest.xml",
    "chars": 1599,
    "preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.example.kazahana\">\n   <application"
  },
  {
    "path": "android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java",
    "chars": 670,
    "preview": "// Generated file.\n//\n// If you wish to remove Flutter's multidex support, delete this entire file.\n//\n// Modifications "
  },
  {
    "path": "android/app/src/main/kotlin/com/example/kazahana/MainActivity.kt",
    "chars": 125,
    "preview": "package com.example.kazahana\n\nimport io.flutter.embedding.android.FlutterActivity\n\nclass MainActivity: FlutterActivity()"
  },
  {
    "path": "android/app/src/main/res/drawable/launch_background.xml",
    "chars": 434,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmln"
  },
  {
    "path": "android/app/src/main/res/drawable-v21/launch_background.xml",
    "chars": 438,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmln"
  },
  {
    "path": "android/app/src/main/res/values/styles.xml",
    "chars": 996,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- Theme applied to the Android Window while the process is sta"
  },
  {
    "path": "android/app/src/main/res/values-night/styles.xml",
    "chars": 995,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- Theme applied to the Android Window while the process is sta"
  },
  {
    "path": "android/app/src/profile/AndroidManifest.xml",
    "chars": 413,
    "preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.example.kazahana\">\n    <!-- The IN"
  },
  {
    "path": "android/build.gradle",
    "chars": 600,
    "preview": "buildscript {\n    ext.kotlin_version = \"1.9.10\"\n\n    repositories {\n        google()\n        mavenCentral()\n    }\n\n    d"
  },
  {
    "path": "android/gradle/wrapper/gradle-wrapper.properties",
    "chars": 200,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dist"
  },
  {
    "path": "android/gradle.properties",
    "chars": 82,
    "preview": "org.gradle.jvmargs=-Xmx1536M\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n"
  },
  {
    "path": "android/settings.gradle",
    "chars": 462,
    "preview": "include ':app'\n\ndef localPropertiesFile = new File(rootProject.projectDir, \"local.properties\")\ndef properties = new Prop"
  },
  {
    "path": "cli/code_analysis.dart",
    "chars": 1452,
    "preview": "import 'dart:io';\nimport 'utils/exports.dart';\n\nconst Logger _logger = Logger('code-analysis');\n\nFuture<void> main() asy"
  },
  {
    "path": "cli/prerequisites.dart",
    "chars": 306,
    "preview": "import 'tasks/build_runner.dart' as build_runner;\nimport 'tasks/i18n.dart' as i18n;\nimport 'tasks/icon.dart' as icon;\nim"
  },
  {
    "path": "cli/run.dart",
    "chars": 545,
    "preview": "import 'dart:io';\nimport 'prerequisites.dart' as prerequisites;\nimport 'utils/exports.dart';\n\nconst Logger _logger = Log"
  },
  {
    "path": "cli/tasks/build_runner.dart",
    "chars": 1180,
    "preview": "import 'dart:io';\nimport '../utils/exports.dart';\n\nconst Logger _logger = Logger('build_runner');\n\nFuture<void> main(fin"
  },
  {
    "path": "cli/tasks/i18n.dart",
    "chars": 277,
    "preview": "import 'dart:io';\n\nFuture<void> main(final List<String> args) async {\n  final ProcessResult result = await Process.run(\n"
  },
  {
    "path": "cli/tasks/icon.dart",
    "chars": 1917,
    "preview": "import 'dart:io';\nimport 'dart:typed_data';\nimport 'package:image/image.dart';\nimport 'package:path/path.dart' as path;\n"
  },
  {
    "path": "cli/tasks/meta.dart",
    "chars": 669,
    "preview": "import 'dart:io';\nimport 'package:path/path.dart' as path;\nimport '../utils/exports.dart';\nimport 'version.dart';\n\nconst"
  },
  {
    "path": "cli/tasks/version.dart",
    "chars": 346,
    "preview": "import 'dart:io';\nimport 'package:path/path.dart' as path;\nimport '../utils/exports.dart';\n\nfinal String pubspecYamlPath"
  },
  {
    "path": "cli/utils/exports.dart",
    "chars": 43,
    "preview": "export 'logger.dart';\nexport 'paths.dart';\n"
  },
  {
    "path": "cli/utils/logger.dart",
    "chars": 416,
    "preview": "// ignore_for_file: avoid_print\n\nclass Logger {\n  const Logger(this.name);\n\n  final String name;\n\n  void info(final Obje"
  },
  {
    "path": "cli/utils/paths.dart",
    "chars": 384,
    "preview": "import 'dart:io';\nimport 'package:path/path.dart' as path;\n\nabstract class Paths {\n  static final String rootDir = Direc"
  },
  {
    "path": "i18n/en.toml",
    "chars": 1736,
    "preview": "locale = \"en\"\n\n[keys]\nAnime = \"Anime\"\nManga = \"Manga\"\nSearchAnAnimeOrManga = \"Search an anime or manga\"\nMostPopularAnime"
  },
  {
    "path": "lib/core/anilist/auth.dart",
    "chars": 1780,
    "preview": "import 'package:anilist/anilist.dart';\nimport 'package:kazahana/ui/exports.dart';\nimport '../app/exports.dart';\nimport '"
  },
  {
    "path": "lib/core/anilist/credentials.dart",
    "chars": 79,
    "preview": "abstract class AnilistCredentials {\n  static const String clientId = '6444';\n}\n"
  },
  {
    "path": "lib/core/anilist/exports.dart",
    "chars": 87,
    "preview": "export 'package:anilist/anilist.dart';\nexport 'auth.dart';\nexport 'translations.dart';\n"
  },
  {
    "path": "lib/core/anilist/translations.dart",
    "chars": 4245,
    "preview": "import 'package:anilist/anilist.dart';\nimport 'package:tenka/tenka.dart';\nimport '../translator/exports.dart';\nimport '."
  },
  {
    "path": "lib/core/app/events.dart",
    "chars": 846,
    "preview": "import 'dart:async';\n\nclass AppEvent {\n  const AppEvent(this.name, [this.data]);\n\n  final String name;\n  final dynamic d"
  },
  {
    "path": "lib/core/app/exports.dart",
    "chars": 64,
    "preview": "export 'events.dart';\nexport 'loader.dart';\nexport 'meta.dart';\n"
  },
  {
    "path": "lib/core/app/loader.dart",
    "chars": 836,
    "preview": "import '../anilist/exports.dart';\nimport '../database/exports.dart';\nimport '../internals/exports.dart';\nimport '../path"
  },
  {
    "path": "lib/core/app/meta.dart",
    "chars": 371,
    "preview": "part 'meta.g.dart';\n\nabstract class AppMeta {\n  static const String name = 'Kazahana';\n  static const String code = 'kaz"
  },
  {
    "path": "lib/core/database/cache/database.dart",
    "chars": 2016,
    "preview": "import 'package:flutter/foundation.dart';\nimport 'package:path/path.dart' as path;\nimport 'package:perks/perks.dart';\nim"
  },
  {
    "path": "lib/core/database/cache/exports.dart",
    "chars": 24,
    "preview": "export 'database.dart';\n"
  },
  {
    "path": "lib/core/database/exports.dart",
    "chars": 91,
    "preview": "export 'cache/exports.dart';\nexport 'secure/exports.dart';\nexport 'settings/exports.dart';\n"
  },
  {
    "path": "lib/core/database/secure/database.dart",
    "chars": 1144,
    "preview": "import 'dart:convert';\nimport 'package:encrypt/encrypt.dart';\nimport 'package:path/path.dart' as path;\nimport 'package:p"
  },
  {
    "path": "lib/core/database/secure/exports.dart",
    "chars": 46,
    "preview": "export 'database.dart';\nexport 'schema.dart';\n"
  },
  {
    "path": "lib/core/database/secure/schema.dart",
    "chars": 695,
    "preview": "import 'package:json_annotation/json_annotation.dart';\nimport '../../exports.dart';\n\npart 'schema.g.dart';\n\n@JsonSeriali"
  },
  {
    "path": "lib/core/database/settings/database.dart",
    "chars": 907,
    "preview": "import 'dart:async';\nimport 'dart:convert';\nimport 'package:path/path.dart' as path;\nimport 'package:perks/perks.dart';\n"
  },
  {
    "path": "lib/core/database/settings/exports.dart",
    "chars": 46,
    "preview": "export 'database.dart';\nexport 'schema.dart';\n"
  },
  {
    "path": "lib/core/database/settings/schema.dart",
    "chars": 1127,
    "preview": "import 'package:json_annotation/json_annotation.dart';\nimport 'package:kazahana/ui/utils/relative_scale.dart';\nimport '."
  },
  {
    "path": "lib/core/exports.dart",
    "chars": 286,
    "preview": "export 'anilist/exports.dart';\nexport 'app/exports.dart';\nexport 'database/exports.dart';\nexport 'packages.dart';\nexport"
  },
  {
    "path": "lib/core/internals/deeplink.dart",
    "chars": 1067,
    "preview": "import 'package:kazahana/ui/exports.dart';\nimport 'package:uni_links/uni_links.dart' as uni_links;\nimport '../app/export"
  },
  {
    "path": "lib/core/internals/exports.dart",
    "chars": 24,
    "preview": "export 'deeplink.dart';\n"
  },
  {
    "path": "lib/core/internals/router/exports.dart",
    "chars": 43,
    "preview": "export 'route.dart';\nexport 'routes.dart';\n"
  },
  {
    "path": "lib/core/internals/router/route.dart",
    "chars": 112,
    "preview": "abstract class InternalRoute {\n  bool matches(final String route);\n  Future<void> handle(final String route);\n}\n"
  },
  {
    "path": "lib/core/internals/router/routes/anilist.dart",
    "chars": 416,
    "preview": "import '../../../anilist/exports.dart';\nimport '../route.dart';\n\nclass AnilistAuthRoute extends InternalRoute {\n  @overr"
  },
  {
    "path": "lib/core/internals/router/routes/exports.dart",
    "chars": 23,
    "preview": "export 'anilist.dart';\n"
  },
  {
    "path": "lib/core/internals/router/routes.dart",
    "chars": 383,
    "preview": "import '../../utils/exports.dart';\nimport 'route.dart';\nimport 'routes/exports.dart';\n\nabstract class InternalRoutes {\n "
  },
  {
    "path": "lib/core/packages.dart",
    "chars": 319,
    "preview": "export 'dart:ui' show ImageFilter;\nexport 'package:animations/animations.dart';\nexport 'package:flutter/material.dart' h"
  },
  {
    "path": "lib/core/paths.dart",
    "chars": 370,
    "preview": "import 'dart:io';\nimport 'package:path_provider/path_provider.dart' as path_provider;\n\nabstract class Paths {\n  static l"
  },
  {
    "path": "lib/core/player/video_player.dart",
    "chars": 2896,
    "preview": "import 'package:flutter/material.dart';\nimport 'package:media_kit/media_kit.dart' as media_kit;\nimport 'package:media_ki"
  },
  {
    "path": "lib/core/state/exports.dart",
    "chars": 43,
    "preview": "export 'states.dart';\nexport 'value.dart';\n"
  },
  {
    "path": "lib/core/state/states.dart",
    "chars": 63,
    "preview": "enum States {\n  waiting,\n  processing,\n  finished,\n  failed,\n}\n"
  },
  {
    "path": "lib/core/state/value.dart",
    "chars": 1551,
    "preview": "import 'package:flutter/material.dart';\nimport 'states.dart';\n\nclass StatedValue<T> {\n  StatedValue({\n    this.state = S"
  },
  {
    "path": "lib/core/tenka/exports.dart",
    "chars": 79,
    "preview": "export 'package:tenka/tenka.dart';\nexport 'manager.dart';\nexport 'utils.dart';\n"
  },
  {
    "path": "lib/core/tenka/manager.dart",
    "chars": 1497,
    "preview": "import 'package:path/path.dart' as path;\nimport 'package:tenka/tenka.dart';\nimport '../database/exports.dart';\nimport '."
  },
  {
    "path": "lib/core/tenka/utils.dart",
    "chars": 288,
    "preview": "import 'package:tenka/tenka.dart';\nimport '../translator/exports.dart';\n\nextension TenkaTypeUtils on TenkaType {\n  Strin"
  },
  {
    "path": "lib/core/themes/colors.dart",
    "chars": 2237,
    "preview": "import 'package:flutter/material.dart';\nimport '../translator/exports.dart';\n\nabstract class ForegroundColors {\n  static"
  },
  {
    "path": "lib/core/themes/exports.dart",
    "chars": 43,
    "preview": "export 'colors.dart';\nexport 'fonts.dart';\n"
  },
  {
    "path": "lib/core/themes/fonts.dart",
    "chars": 113,
    "preview": "abstract class Fonts {\n  static const String inter = 'Inter';\n  static const String greatVibes = 'GreatVibes';\n}\n"
  },
  {
    "path": "lib/core/translator/exports.dart",
    "chars": 26,
    "preview": "export 'translator.dart';\n"
  },
  {
    "path": "lib/core/translator/translator.dart",
    "chars": 1520,
    "preview": "import 'dart:convert';\nimport 'package:flutter/services.dart' show rootBundle;\nimport 'package:utilx/locale.dart';\nimpor"
  },
  {
    "path": "lib/core/utils/dates.dart",
    "chars": 392,
    "preview": "abstract class PrettyDates {\n  static String constructDateString({\n    required final String day,\n    required final Str"
  },
  {
    "path": "lib/core/utils/durations.dart",
    "chars": 415,
    "preview": "import '../translator/exports.dart';\n\nabstract class PrettyDurations {\n  static String prettyHoursMinutesShort(\n    fina"
  },
  {
    "path": "lib/core/utils/exports.dart",
    "chars": 186,
    "preview": "export 'package:collection/collection.dart';\nexport 'package:utilx/locale.dart';\nexport 'package:utilx/utilx.dart';\nexpo"
  },
  {
    "path": "lib/core/utils/kawaii_faces.dart",
    "chars": 3488,
    "preview": "// ? Source: https://kawaiiface.net (how pensive)\nabstract class KawaiiFaces {\n  static const List<String> sad = <String"
  },
  {
    "path": "lib/core/utils/provider.dart",
    "chars": 197,
    "preview": "import 'package:flutter/material.dart';\n\nclass StatedChangeNotifier extends ChangeNotifier {\n  bool mounted = true;\n\n  @"
  },
  {
    "path": "lib/main.dart",
    "chars": 172,
    "preview": "import 'package:flutter/material.dart';\nimport 'package:kazahana/ui/exports.dart';\n\nvoid main() {\n  WidgetsFlutterBindin"
  },
  {
    "path": "lib/ui/base.dart",
    "chars": 2743,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport 'exports.dart';\n\nclass BaseApp extends StatefulWidget {\n  const Base"
  },
  {
    "path": "lib/ui/components/anilist/exports.dart",
    "chars": 78,
    "preview": "export 'media_row.dart';\nexport 'media_slide.dart';\nexport 'media_tile.dart';\n"
  },
  {
    "path": "lib/ui/components/anilist/media_row.dart",
    "chars": 724,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\n\nclass AnilistMediaRow extends StatelessWidget"
  },
  {
    "path": "lib/ui/components/anilist/media_slide.dart",
    "chars": 5919,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\n\nclass AnilistMediaSlide extends StatefulWidge"
  },
  {
    "path": "lib/ui/components/anilist/media_tile.dart",
    "chars": 7199,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\n\nclass AnilistMediaTile extends StatelessWidge"
  },
  {
    "path": "lib/ui/components/body_padding.dart",
    "chars": 649,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../exports.dart';\n\nclass HorizontalBodyPadding extends StatelessWid"
  },
  {
    "path": "lib/ui/components/cross_draggable_scroll_behaviour.dart",
    "chars": 609,
    "preview": "import 'dart:ui';\nimport 'package:kazahana/core/exports.dart';\n\nclass DraggableScrollBehavior extends MaterialScrollBeha"
  },
  {
    "path": "lib/ui/components/exports.dart",
    "chars": 277,
    "preview": "export 'anilist/exports.dart';\nexport 'body_padding.dart';\nexport 'cross_draggable_scroll_behaviour.dart';\nexport 'round"
  },
  {
    "path": "lib/ui/components/kawaii_face.dart",
    "chars": 621,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass KawaiiFace extends StatelessWidget {\n  const KawaiiFace({\n    requir"
  },
  {
    "path": "lib/ui/components/rounded_back_button.dart",
    "chars": 353,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass RoundedBackButton extends StatelessWidget {\n  const RoundedBackButto"
  },
  {
    "path": "lib/ui/components/scrollable_row.dart",
    "chars": 1389,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport 'package:kazahana/ui/components/exports.dart';\nimport 'body_padding."
  },
  {
    "path": "lib/ui/components/slideshow.dart",
    "chars": 1884,
    "preview": "import 'dart:async';\nimport 'package:flutter/material.dart';\nimport 'package:kazahana/ui/components/exports.dart';\n\nclas"
  },
  {
    "path": "lib/ui/components/stated_builder.dart",
    "chars": 689,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass StatedBuilder extends StatelessWidget {\n  const StatedBuilder(\n    t"
  },
  {
    "path": "lib/ui/components/super_imposer.dart",
    "chars": 1623,
    "preview": "import 'dart:async';\nimport 'package:kazahana/core/exports.dart';\n\nclass SuperImposerEntry {\n  const SuperImposerEntry._"
  },
  {
    "path": "lib/ui/components/toast.dart",
    "chars": 2734,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../utils/exports.dart';\nimport 'super_imposer.dart';\n\nclass Toast e"
  },
  {
    "path": "lib/ui/exports.dart",
    "chars": 133,
    "preview": "export 'base.dart';\nexport 'components/exports.dart';\nexport 'keys.dart';\nexport 'router/exports.dart';\nexport 'utils/ex"
  },
  {
    "path": "lib/ui/keys.dart",
    "chars": 123,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nfinal GlobalKey<NavigatorState> gNavigatorKey = GlobalKey<NavigatorState>("
  },
  {
    "path": "lib/ui/pages/_home/components/appbar.dart",
    "chars": 2243,
    "preview": "import 'dart:async';\nimport 'package:kazahana/core/exports.dart';\nimport '../../../exports.dart';\n\nclass UnderScoreHomeP"
  },
  {
    "path": "lib/ui/pages/_home/components/body.dart",
    "chars": 4489,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../exports.dart';\nimport '../provider.dart';\n\nclass UnderScor"
  },
  {
    "path": "lib/ui/pages/_home/components/bottombar.dart",
    "chars": 4374,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../exports.dart';\nimport '../provider.dart';\n\nclass UnderScor"
  },
  {
    "path": "lib/ui/pages/_home/components/exports.dart",
    "chars": 67,
    "preview": "export 'appbar.dart';\nexport 'body.dart';\nexport 'bottombar.dart';\n"
  },
  {
    "path": "lib/ui/pages/_home/provider.dart",
    "chars": 3805,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass UnderScoreHomePageProvider extends StatedChangeNotifier {\n  TenkaTyp"
  },
  {
    "path": "lib/ui/pages/_home/view.dart",
    "chars": 1070,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\nimport 'components/exports.dart';\nimport 'prov"
  },
  {
    "path": "lib/ui/pages/_splash/view.dart",
    "chars": 1400,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\n\nclass UnderScoreSplashPage extends StatelessW"
  },
  {
    "path": "lib/ui/pages/anilist/components/body/exports.dart",
    "chars": 52,
    "preview": "export 'login.dart';\nexport 'profile/exports.dart';\n"
  },
  {
    "path": "lib/ui/pages/anilist/components/body/login.dart",
    "chars": 3423,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../../exports.dart';\n\nclass AnilistPageLoginBody extends Stat"
  },
  {
    "path": "lib/ui/pages/anilist/components/body/profile/body.dart",
    "chars": 2907,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../../../exports.dart';\nimport 'provider.dart';\n\nclass Anilis"
  },
  {
    "path": "lib/ui/pages/anilist/components/body/profile/exports.dart",
    "chars": 23,
    "preview": "export 'wrapper.dart';\n"
  },
  {
    "path": "lib/ui/pages/anilist/components/body/profile/hero.dart",
    "chars": 6123,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../../../exports.dart';\nimport 'provider.dart';\n\nclass Anilis"
  },
  {
    "path": "lib/ui/pages/anilist/components/body/profile/provider.dart",
    "chars": 3101,
    "preview": "import 'dart:async';\nimport 'package:kazahana/core/exports.dart';\nimport '../../../provider.dart';\n\nclass AnilistProfile"
  },
  {
    "path": "lib/ui/pages/anilist/components/body/profile/wrapper.dart",
    "chars": 7571,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../../../exports.dart';\nimport '../../../provider.dart';\nimpo"
  },
  {
    "path": "lib/ui/pages/anilist/components/exports.dart",
    "chars": 28,
    "preview": "export 'body/exports.dart';\n"
  },
  {
    "path": "lib/ui/pages/anilist/provider.dart",
    "chars": 630,
    "preview": "import 'dart:async';\nimport 'package:kazahana/core/exports.dart';\n\nclass AnilistPageProvider extends StatedChangeNotifie"
  },
  {
    "path": "lib/ui/pages/anilist/route.dart",
    "chars": 480,
    "preview": "import 'package:flutter/material.dart';\nimport '../../exports.dart';\nimport 'view.dart';\n\nclass AnilistPageRoute extends"
  },
  {
    "path": "lib/ui/pages/anilist/view.dart",
    "chars": 853,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\nimport 'components/exports.dart';\nimport 'prov"
  },
  {
    "path": "lib/ui/pages/home/route.dart",
    "chars": 452,
    "preview": "import 'package:flutter/material.dart';\nimport '../../exports.dart';\nimport 'view.dart';\n\nclass HomePageRoute extends Ro"
  },
  {
    "path": "lib/ui/pages/home/view.dart",
    "chars": 1095,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\nimport '../_home/view.dart';\nimport '../_splas"
  },
  {
    "path": "lib/ui/pages/modules/provider.dart",
    "chars": 725,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass ModulesPageProvider extends StatedChangeNotifier {\n  final Set<Strin"
  },
  {
    "path": "lib/ui/pages/modules/route.dart",
    "chars": 474,
    "preview": "import 'package:flutter/material.dart';\nimport '../../exports.dart';\nimport 'view.dart';\n\nclass ModulesPageRoute extends"
  },
  {
    "path": "lib/ui/pages/modules/view.dart",
    "chars": 3778,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\nimport 'provider.dart';\n\nclass ModulesPage ext"
  },
  {
    "path": "lib/ui/pages/search/components/exports.dart",
    "chars": 54,
    "preview": "export 'results_grid.dart';\nexport 'search_bar.dart';\n"
  },
  {
    "path": "lib/ui/pages/search/components/results_grid.dart",
    "chars": 1092,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../exports.dart';\n\nclass ResultsGrid extends StatelessWidget "
  },
  {
    "path": "lib/ui/pages/search/components/search_bar.dart",
    "chars": 4651,
    "preview": "import 'dart:async';\nimport 'package:kazahana/core/exports.dart';\nimport '../../../exports.dart';\nimport '../provider.da"
  },
  {
    "path": "lib/ui/pages/search/provider.dart",
    "chars": 686,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass SearchPageProvider extends StatedChangeNotifier {\n  final StatedValu"
  },
  {
    "path": "lib/ui/pages/search/route.dart",
    "chars": 474,
    "preview": "import 'package:flutter/material.dart';\nimport '../../exports.dart';\nimport 'view.dart';\n\nclass SearchPageRoute extends "
  },
  {
    "path": "lib/ui/pages/search/view.dart",
    "chars": 1548,
    "preview": "import 'package:kazahana/core/exports.dart' hide SearchBar;\nimport '../../exports.dart';\nimport 'components/exports.dart"
  },
  {
    "path": "lib/ui/pages/settings/components/appearance.dart",
    "chars": 3007,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../exports.dart';\nimport 'tiles/exports.dart';\n\nclass Apperan"
  },
  {
    "path": "lib/ui/pages/settings/components/exports.dart",
    "chars": 26,
    "preview": "export 'appearance.dart';\n"
  },
  {
    "path": "lib/ui/pages/settings/components/tiles/choice.dart",
    "chars": 3247,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../../exports.dart';\n\nclass MultiChoiceListTile<T> extends St"
  },
  {
    "path": "lib/ui/pages/settings/components/tiles/exports.dart",
    "chars": 45,
    "preview": "export 'choice.dart';\nexport 'wrapper.dart';\n"
  },
  {
    "path": "lib/ui/pages/settings/components/tiles/wrapper.dart",
    "chars": 375,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass SettingsBodyWrapper extends StatelessWidget {\n  const SettingsBodyWr"
  },
  {
    "path": "lib/ui/pages/settings/route.dart",
    "chars": 486,
    "preview": "import 'package:flutter/material.dart';\nimport '../../exports.dart';\nimport 'view.dart';\n\nclass SettingsPageRoute extend"
  },
  {
    "path": "lib/ui/pages/settings/view.dart",
    "chars": 3087,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\nimport 'components/exports.dart';\n\nclass Setti"
  },
  {
    "path": "lib/ui/pages/view/components/appbar.dart",
    "chars": 2755,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../exports.dart';\nimport '../provider.dart';\n\nclass ViewPageA"
  },
  {
    "path": "lib/ui/pages/view/components/body.dart",
    "chars": 4970,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../exports.dart';\nimport '../provider.dart';\nimport 'content/"
  },
  {
    "path": "lib/ui/pages/view/components/content/content.dart",
    "chars": 3633,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport 'package:kazahana/core/player/video_player.dart';\nimport 'provider.d"
  },
  {
    "path": "lib/ui/pages/view/components/content/exports.dart",
    "chars": 23,
    "preview": "export 'content.dart';\n"
  },
  {
    "path": "lib/ui/pages/view/components/content/provider.dart",
    "chars": 4572,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass ViewPageContentProvider extends StatedChangeNotifier {\n  ViewPageCon"
  },
  {
    "path": "lib/ui/pages/view/components/exports.dart",
    "chars": 117,
    "preview": "export 'appbar.dart';\nexport 'body.dart';\nexport 'content/exports.dart';\nexport 'hero.dart';\nexport 'overview.dart';\n"
  },
  {
    "path": "lib/ui/pages/view/components/hero.dart",
    "chars": 5621,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../exports.dart';\n\nclass ViewPageHero extends StatelessWidget"
  },
  {
    "path": "lib/ui/pages/view/components/overview.dart",
    "chars": 5458,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../../exports.dart';\n\nclass ViewPageOverview extends StatelessWi"
  },
  {
    "path": "lib/ui/pages/view/provider.dart",
    "chars": 1096,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass ViewPageViewProvider extends ChangeNotifier {\n  bool showFloatingApp"
  },
  {
    "path": "lib/ui/pages/view/route.dart",
    "chars": 895,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\nimport 'view.dart';\n\nclass ViewPageRoute exten"
  },
  {
    "path": "lib/ui/pages/view/view.dart",
    "chars": 1420,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\nimport 'components/exports.dart';\nimport 'prov"
  },
  {
    "path": "lib/ui/router/exports.dart",
    "chars": 54,
    "preview": "export 'navigator.dart';\nexport 'route/exports.dart';\n"
  },
  {
    "path": "lib/ui/router/navigator.dart",
    "chars": 458,
    "preview": "import 'package:flutter/material.dart';\n\nexport '../pages/anilist/route.dart';\nexport '../pages/home/route.dart';\nexport"
  },
  {
    "path": "lib/ui/router/route/exports.dart",
    "chars": 61,
    "preview": "export 'info.dart';\nexport 'page.dart';\nexport 'pages.dart';\n"
  },
  {
    "path": "lib/ui/router/route/info.dart",
    "chars": 213,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass RouteInfo {\n  const RouteInfo(this.settings);\n\n  final RouteSettings"
  },
  {
    "path": "lib/ui/router/route/page.dart",
    "chars": 1313,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../exports.dart';\n\nabstract class RoutePage {\n  RouteTransitions"
  },
  {
    "path": "lib/ui/router/route/pages.dart",
    "chars": 991,
    "preview": "import 'package:kazahana/core/exports.dart';\nimport '../../pages/anilist/route.dart';\nimport '../../pages/home/route.dar"
  },
  {
    "path": "lib/ui/utils/animations.dart",
    "chars": 809,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nabstract class AnimationDurations {\n  static const Duration _defaultQuickA"
  },
  {
    "path": "lib/ui/utils/exports.dart",
    "chars": 134,
    "preview": "export 'animations.dart';\nexport 'placeholders.dart';\nexport 'relative_scale.dart';\nexport 'themer.dart';\nexport 'transl"
  },
  {
    "path": "lib/ui/utils/placeholders.dart",
    "chars": 330,
    "preview": "import 'dart:convert';\nimport 'dart:typed_data';\n\nabstract class Placeholders {\n  static const String transparent1x1Imag"
  },
  {
    "path": "lib/ui/utils/relative_scale.dart",
    "chars": 3150,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass RelativeScaler extends InheritedWidget {\n  const RelativeScaler({\n  "
  },
  {
    "path": "lib/ui/utils/themer.dart",
    "chars": 3758,
    "preview": "import 'package:flutter/scheduler.dart';\nimport 'package:kazahana/core/exports.dart';\nimport 'relative_scale.dart';\n\nabs"
  },
  {
    "path": "lib/ui/utils/translations.dart",
    "chars": 621,
    "preview": "import 'package:kazahana/core/exports.dart';\n\nclass TranslationWrapper extends InheritedWidget {\n  const TranslationWrap"
  },
  {
    "path": "linux/.gitignore",
    "chars": 18,
    "preview": "flutter/ephemeral\n"
  },
  {
    "path": "linux/CMakeLists.txt",
    "chars": 5438,
    "preview": "# Project-level configuration.\ncmake_minimum_required(VERSION 3.10)\nproject(runner LANGUAGES CXX)\n\n# The name of the exe"
  },
  {
    "path": "linux/flutter/CMakeLists.txt",
    "chars": 2815,
    "preview": "# This file controls Flutter-level build steps. It should not be edited.\ncmake_minimum_required(VERSION 3.10)\n\nset(EPHEM"
  },
  {
    "path": "linux/flutter/generated_plugin_registrant.cc",
    "chars": 1007,
    "preview": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#include \"generated_plugin_registrant.h\"\n\n#include <media_k"
  },
  {
    "path": "linux/flutter/generated_plugin_registrant.h",
    "chars": 303,
    "preview": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#ifndef GENERATED_PLUGIN_REGISTRANT_\n#define GENERATED_PLUG"
  },
  {
    "path": "linux/flutter/generated_plugins.cmake",
    "chars": 831,
    "preview": "#\n# Generated file, do not edit.\n#\n\nlist(APPEND FLUTTER_PLUGIN_LIST\n  media_kit_libs_linux\n  media_kit_video\n  url_launc"
  },
  {
    "path": "linux/main.cc",
    "chars": 180,
    "preview": "#include \"my_application.h\"\n\nint main(int argc, char** argv) {\n  g_autoptr(MyApplication) app = my_application_new();\n  "
  },
  {
    "path": "linux/my_application.cc",
    "chars": 3714,
    "preview": "#include \"my_application.h\"\n\n#include <flutter_linux/flutter_linux.h>\n#ifdef GDK_WINDOWING_X11\n#include <gdk/gdkx.h>\n#en"
  },
  {
    "path": "linux/my_application.h",
    "chars": 388,
    "preview": "#ifndef FLUTTER_MY_APPLICATION_H_\n#define FLUTTER_MY_APPLICATION_H_\n\n#include <gtk/gtk.h>\n\nG_DECLARE_FINAL_TYPE(MyApplic"
  },
  {
    "path": "package.json",
    "chars": 475,
    "preview": "{\n    \"name\": \"@yukino-org/kazahana\",\n    \"description\": \"\",\n    \"private\": true,\n    \"version\": \"0.0.0\",\n    \"author\": "
  },
  {
    "path": "packages/anilist/.gitignore",
    "chars": 113,
    "preview": "# Files and directories created by pub.\n.dart_tool/\n.packages\n\n# Conventional directory for build output.\nbuild/\n"
  },
  {
    "path": "packages/anilist/.vscode/settings.json",
    "chars": 35,
    "preview": "{\n    \"editor.formatOnSave\": true\n}"
  },
  {
    "path": "packages/anilist/README.md",
    "chars": 122,
    "preview": "A sample command-line application with an entrypoint in `bin/`, library code\nin `lib/`, and example unit test in `test/`"
  },
  {
    "path": "packages/anilist/analysis_options.yaml",
    "chars": 44,
    "preview": "include: package:devx/analysis_options.yaml\n"
  },
  {
    "path": "packages/anilist/lib/anilist.dart",
    "chars": 63,
    "preview": "export 'endpoints/exports.dart';\nexport 'models/exports.dart';\n"
  },
  {
    "path": "packages/anilist/lib/endpoints/exports.dart",
    "chars": 114,
    "preview": "export 'graphql.dart';\nexport 'media.dart';\nexport 'media_list.dart';\nexport 'relation.dart';\nexport 'user.dart';\n"
  },
  {
    "path": "packages/anilist/lib/endpoints/graphql.dart",
    "chars": 2681,
    "preview": "import 'dart:convert';\nimport 'package:shared/http.dart' as http;\nimport 'package:utilx/utilx.dart';\nimport '../models/e"
  },
  {
    "path": "packages/anilist/lib/endpoints/media.dart",
    "chars": 5773,
    "preview": "import 'package:utilx/utilx.dart';\nimport '../models/exports.dart';\nimport 'graphql.dart';\n\nabstract class AnilistMediaE"
  },
  {
    "path": "packages/anilist/lib/endpoints/media_list.dart",
    "chars": 1402,
    "preview": "import 'package:utilx/utilx.dart';\nimport '../models/exports.dart';\nimport 'graphql.dart';\n\nabstract class AnilistMediaL"
  },
  {
    "path": "packages/anilist/lib/endpoints/relation.dart",
    "chars": 870,
    "preview": "import 'package:utilx/utilx.dart';\nimport '../models/exports.dart';\nimport 'graphql.dart';\n\nabstract class AnilistMediaR"
  },
  {
    "path": "packages/anilist/lib/endpoints/user.dart",
    "chars": 5783,
    "preview": "import 'package:utilx/utilx.dart';\nimport '../models/exports.dart';\nimport 'graphql.dart';\n\nabstract class AnilistUserEn"
  },
  {
    "path": "packages/anilist/lib/models/character.dart",
    "chars": 1437,
    "preview": "import 'package:utilx/utilx.dart';\nimport '../utils.dart';\nimport 'fuzzy_date.dart';\n\nclass AnilistCharacter {\n  const A"
  },
  {
    "path": "packages/anilist/lib/models/character_edge.dart",
    "chars": 477,
    "preview": "import 'package:utilx/utilx.dart';\nimport 'character.dart';\nimport 'character_role.dart';\n\nclass AnilistCharacterEdge {\n"
  },
  {
    "path": "packages/anilist/lib/models/character_role.dart",
    "chars": 354,
    "preview": "import 'package:utilx/utilx.dart';\n\nenum AnilistCharacterRole {\n  main,\n  supporting,\n  background,\n}\n\nextension Anilist"
  },
  {
    "path": "packages/anilist/lib/models/exports.dart",
    "chars": 458,
    "preview": "export 'character.dart';\nexport 'character_edge.dart';\nexport 'character_role.dart';\nexport 'fuzzy_date.dart';\nexport 'm"
  },
  {
    "path": "packages/anilist/lib/models/fuzzy_date.dart",
    "chars": 481,
    "preview": "import 'package:utilx/utilx.dart';\n\nclass AnilistFuzzyDate {\n  const AnilistFuzzyDate(this.json);\n\n  final JsonMap json;"
  },
  {
    "path": "packages/anilist/lib/models/media.dart",
    "chars": 3896,
    "preview": "import 'package:utilx/utilx.dart';\nimport '../endpoints/exports.dart';\nimport '../utils.dart';\nimport 'character_edge.da"
  },
  {
    "path": "packages/anilist/lib/models/media_format.dart",
    "chars": 958,
    "preview": "enum AnilistMediaFormat {\n  tv,\n  tvShort,\n  movie,\n  special,\n  ova,\n  ona,\n  music,\n  manga,\n  novel,\n  oneshot,\n}\n\nco"
  },
  {
    "path": "packages/anilist/lib/models/media_list_entry.dart",
    "chars": 1177,
    "preview": "import 'package:utilx/utilx.dart';\nimport 'fuzzy_date.dart';\nimport 'media_list_status.dart';\n\nclass AnilistMediaListEnt"
  },
  {
    "path": "packages/anilist/lib/models/media_list_sort.dart",
    "chars": 695,
    "preview": "import 'package:utilx/utilx.dart';\n\nenum AnilistMediaListSort {\n  mediaId,\n  mediaIdDesc,\n  score,\n  scoreDesc,\n  status"
  },
  {
    "path": "packages/anilist/lib/models/media_list_status.dart",
    "chars": 400,
    "preview": "import 'package:utilx/utilx.dart';\n\nenum AnilistMediaListStatus {\n  current,\n  planning,\n  completed,\n  dropped,\n  pause"
  },
  {
    "path": "packages/anilist/lib/models/media_sort.dart",
    "chars": 700,
    "preview": "import 'package:utilx/utilx.dart';\n\nenum AnilistMediaSort {\n  id,\n  idDesc,\n  titleRomaji,\n  titleRomajiDesc,\n  titleEng"
  },
  {
    "path": "packages/anilist/lib/models/media_status.dart",
    "chars": 805,
    "preview": "import 'package:utilx/utilx.dart';\n\nenum AnilistMediaStatus {\n  finished,\n  releasing,\n  notYetReleased,\n  cancelled,\n  "
  },
  {
    "path": "packages/anilist/lib/models/media_type.dart",
    "chars": 312,
    "preview": "import 'package:utilx/utilx.dart';\n\nenum AnilistMediaType {\n  anime,\n  manga,\n}\n\nextension AnilistMediaTypeUtils on Anil"
  },
  {
    "path": "packages/anilist/lib/models/relation_edge.dart",
    "chars": 512,
    "preview": "import 'package:utilx/utilx.dart';\nimport 'media.dart';\nimport 'relation_type.dart';\n\nclass AnilistRelationEdge {\n  cons"
  },
  {
    "path": "packages/anilist/lib/models/relation_type.dart",
    "chars": 903,
    "preview": "import 'package:utilx/utilx.dart';\n\nenum AnilistRelationType {\n  adaptation,\n  prequel,\n  sequel,\n  parent,\n  sideStory,"
  },
  {
    "path": "packages/anilist/lib/models/seasons.dart",
    "chars": 617,
    "preview": "import 'package:utilx/utilx.dart';\n\nenum AnimeSeasons {\n  winter,\n  spring,\n  summer,\n  fall,\n}\n\nextension AnimeSeasonsU"
  },
  {
    "path": "packages/anilist/lib/models/token.dart",
    "chars": 700,
    "preview": "class AnilistToken {\n  const AnilistToken(this.json);\n\n  factory AnilistToken.parseURL(final String url) {\n    final Map"
  },
  {
    "path": "packages/anilist/lib/models/user.dart",
    "chars": 1870,
    "preview": "import 'package:utilx/utilx.dart';\n\nclass AnilistUserStatistics {\n  const AnilistUserStatistics(this.json);\n\n  final Jso"
  },
  {
    "path": "packages/anilist/lib/utils.dart",
    "chars": 647,
    "preview": "String stripHtmlTags(final String text) =>\n    text.replaceAll(RegExp('<[^>]+>'), '');\n\nconst Map<String, String> htmlEn"
  }
]

// ... and 11 more files (download for full content)

About this extraction

This page contains the full source code of the yukino-app/yukino GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 211 files (286.0 KB), approximately 71.4k tokens, and a symbol index with 485 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!