Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zyrouge committed Nov 15, 2023
1 parent 691878b commit 25a0e47
Show file tree
Hide file tree
Showing 60 changed files with 137 additions and 139 deletions.
6 changes: 1 addition & 5 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
include: package:devx/analysis_options.yaml

linter:
rules:
prefer_relative_imports: false
include: package:devx/analysis_options_flutter.yaml
8 changes: 4 additions & 4 deletions lib/core/anilist/auth.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:anilist/anilist.dart';
import 'package:kazahana/core/anilist/credentials.dart';
import 'package:kazahana/core/app/exports.dart';
import 'package:kazahana/core/database/exports.dart';
import 'package:kazahana/core/packages.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';
Expand Down
4 changes: 2 additions & 2 deletions lib/core/anilist/translations.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:anilist/anilist.dart';
import 'package:kazahana/core/translator/exports.dart';
import 'package:kazahana/core/utils/exports.dart';
import 'package:tenka/tenka.dart';
import '../translator/exports.dart';
import '../utils/exports.dart';

extension AnilistFuzzyDateTUtils on AnilistFuzzyDate {
String get pretty => PrettyDates.constructDateString(
Expand Down
14 changes: 7 additions & 7 deletions lib/core/app/loader.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
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';
import 'package:kazahana/core/anilist/exports.dart';
import 'package:kazahana/core/app/events.dart';
import 'package:kazahana/core/database/exports.dart';
import 'package:kazahana/core/internals/exports.dart';
import 'package:kazahana/core/paths.dart';
import 'package:kazahana/core/tenka/exports.dart';
import 'package:kazahana/core/translator/exports.dart';

abstract class AppLoader {
static bool ready = false;
Expand Down
4 changes: 2 additions & 2 deletions lib/core/database/cache/database.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter/foundation.dart';
import 'package:kazahana/core/paths.dart';
import 'package:kazahana/core/utils/exports.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';
Expand Down
7 changes: 4 additions & 3 deletions lib/core/database/secure/database.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import 'dart:convert';

import 'package:encrypt/encrypt.dart';
import 'package:kazahana/core/database/secure/schema.dart';
import 'package:kazahana/core/paths.dart';
import 'package:kazahana/core/utils/exports.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');
Expand Down
2 changes: 1 addition & 1 deletion lib/core/database/secure/schema.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:json_annotation/json_annotation.dart';
import '../../exports.dart';
import 'package:kazahana/core/exports.dart';

part 'schema.g.dart';

Expand Down
9 changes: 5 additions & 4 deletions lib/core/database/settings/database.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import 'dart:async';
import 'dart:convert';

import 'package:kazahana/core/app/events.dart';
import 'package:kazahana/core/database/settings/schema.dart';
import 'package:kazahana/core/paths.dart';
import 'package:kazahana/core/utils/exports.dart';
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 =
Expand Down
2 changes: 1 addition & 1 deletion lib/core/database/settings/schema.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:kazahana/core/utils/exports.dart';
import 'package:kazahana/ui/utils/relative_scale.dart';
import '../../utils/exports.dart';

part 'schema.g.dart';

Expand Down
6 changes: 3 additions & 3 deletions lib/core/internals/deeplink.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:kazahana/core/app/exports.dart';
import 'package:kazahana/core/internals/router/exports.dart';
import 'package:kazahana/core/packages.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 {
Expand Down
6 changes: 3 additions & 3 deletions lib/core/internals/router/routes.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '../../utils/exports.dart';
import 'route.dart';
import 'routes/exports.dart';
import 'package:kazahana/core/internals/router/route.dart';
import 'package:kazahana/core/internals/router/routes/exports.dart';
import 'package:kazahana/core/utils/exports.dart';

abstract class InternalRoutes {
static AnilistAuthRoute anilistAuth = AnilistAuthRoute();
Expand Down
4 changes: 2 additions & 2 deletions lib/core/internals/router/routes/anilist.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../../../anilist/exports.dart';
import '../route.dart';
import 'package:kazahana/core/anilist/exports.dart';
import 'package:kazahana/core/internals/router/route.dart';

class AnilistAuthRoute extends InternalRoute {
@override
Expand Down
2 changes: 1 addition & 1 deletion lib/core/state/value.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'states.dart';
import 'package:kazahana/core/state/states.dart';

class StatedValue<T> {
StatedValue({
Expand Down
4 changes: 2 additions & 2 deletions lib/core/tenka/manager.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:kazahana/core/database/exports.dart';
import 'package:kazahana/core/paths.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;
Expand Down
2 changes: 1 addition & 1 deletion lib/core/tenka/utils.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:kazahana/core/translator/exports.dart';
import 'package:tenka/tenka.dart';
import '../translator/exports.dart';

extension TenkaTypeUtils on TenkaType {
String getTitleCase(final Translation translation) => switch (this) {
Expand Down
2 changes: 1 addition & 1 deletion lib/core/themes/colors.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import '../translator/exports.dart';
import 'package:kazahana/core/translator/exports.dart';

abstract class ForegroundColors {
static const Color red = Color(0xffef4444);
Expand Down
5 changes: 3 additions & 2 deletions lib/core/translator/translator.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import 'dart:convert';

import 'package:flutter/services.dart' show rootBundle;
import 'package:kazahana/core/app/exports.dart';
import 'package:kazahana/core/database/exports.dart';
import 'package:utilx/locale.dart';
import 'package:utilx/utilx.dart';
import '../app/exports.dart';
import '../database/exports.dart';

part 'translation.g.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/core/utils/durations.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../translator/exports.dart';
import 'package:kazahana/core/translator/exports.dart';

abstract class PrettyDurations {
static String prettyHoursMinutesShort(
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/base.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:kazahana/core/exports.dart';
import 'exports.dart';
import 'package:kazahana/ui/exports.dart';

class BaseApp extends StatefulWidget {
const BaseApp({
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/components/anilist/media_row.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import 'package:kazahana/ui/exports.dart';

class AnilistMediaRow extends StatelessWidget {
const AnilistMediaRow(
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/components/anilist/media_slide.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import 'package:kazahana/ui/exports.dart';

class AnilistMediaSlide extends StatefulWidget {
const AnilistMediaSlide(
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/components/anilist/media_tile.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import 'package:kazahana/ui/exports.dart';

class AnilistMediaTile extends StatelessWidget {
const AnilistMediaTile(
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/components/body_padding.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:kazahana/core/exports.dart';
import '../exports.dart';
import 'package:kazahana/ui/exports.dart';

class HorizontalBodyPadding extends StatelessWidget {
const HorizontalBodyPadding(
Expand Down
1 change: 0 additions & 1 deletion lib/ui/components/scrollable_row.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:kazahana/core/exports.dart';
import 'package:kazahana/ui/components/exports.dart';
import 'body_padding.dart';

class ScrollableRow extends StatefulWidget {
const ScrollableRow(
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/components/toast.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:kazahana/core/exports.dart';
import '../utils/exports.dart';
import 'super_imposer.dart';
import 'package:kazahana/ui/components/super_imposer.dart';
import 'package:kazahana/ui/utils/exports.dart';

class Toast extends StatefulWidget {
const Toast({
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/pages/_home/components/appbar.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';
import 'package:kazahana/core/exports.dart';
import '../../../exports.dart';
import 'package:kazahana/ui/exports.dart';

class UnderScoreHomePageAppBar extends StatefulWidget
implements PreferredSizeWidget {
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/pages/_home/components/body.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:kazahana/core/exports.dart';
import '../../../exports.dart';
import '../provider.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/_home/provider.dart';

class UnderScoreHomePageBody extends StatelessWidget {
const UnderScoreHomePageBody({
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/pages/_home/components/bottombar.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:kazahana/core/exports.dart';
import '../../../exports.dart';
import '../provider.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/_home/provider.dart';

class UnderScoreHomePageBottomBar extends StatelessWidget {
const UnderScoreHomePageBottomBar({
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/pages/_home/view.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import 'components/exports.dart';
import 'provider.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/_home/components/exports.dart';
import 'package:kazahana/ui/pages/_home/provider.dart';

class UnderScoreHomePage extends StatelessWidget {
const UnderScoreHomePage({
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/pages/_splash/view.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import 'package:kazahana/ui/exports.dart';

class UnderScoreSplashPage extends StatelessWidget {
const UnderScoreSplashPage({
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/pages/anilist/components/body/login.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:kazahana/core/exports.dart';
import '../../../../exports.dart';
import 'package:kazahana/ui/exports.dart';

class AnilistPageLoginBody extends StatelessWidget {
const AnilistPageLoginBody({
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/pages/anilist/components/body/profile/body.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:kazahana/core/exports.dart';
import '../../../../../exports.dart';
import 'provider.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/anilist/components/body/profile/provider.dart';

class AnilistPageProfileBodyBody extends StatelessWidget {
const AnilistPageProfileBodyBody({
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/pages/anilist/components/body/profile/hero.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:kazahana/core/exports.dart';
import '../../../../../exports.dart';
import 'provider.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/anilist/components/body/profile/provider.dart';

class AnilistPageProfileBodyHero extends StatelessWidget {
const AnilistPageProfileBodyHero({
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/pages/anilist/components/body/profile/provider.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';
import 'package:kazahana/core/exports.dart';
import '../../../provider.dart';
import 'package:kazahana/ui/pages/anilist/provider.dart';

class AnilistProfileCategory {
const AnilistProfileCategory(this.type, this.status);
Expand Down
10 changes: 5 additions & 5 deletions lib/ui/pages/anilist/components/body/profile/wrapper.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:kazahana/core/exports.dart';
import '../../../../../exports.dart';
import '../../../provider.dart';
import 'body.dart';
import 'hero.dart';
import 'provider.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/anilist/components/body/profile/body.dart';
import 'package:kazahana/ui/pages/anilist/components/body/profile/hero.dart';
import 'package:kazahana/ui/pages/anilist/components/body/profile/provider.dart';
import 'package:kazahana/ui/pages/anilist/provider.dart';

class AnilistPageProfileBody extends StatefulWidget {
const AnilistPageProfileBody({
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/pages/anilist/route.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import '../../exports.dart';
import 'view.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/anilist/view.dart';

class AnilistPageRoute extends RoutePage {
@override
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/pages/anilist/view.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import 'components/exports.dart';
import 'provider.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/anilist/components/exports.dart';
import 'package:kazahana/ui/pages/anilist/provider.dart';

class AnilistPage extends StatelessWidget {
const AnilistPage({
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/pages/home/route.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import '../../exports.dart';
import 'view.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/home/view.dart';

class HomePageRoute extends RoutePage {
@override
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/pages/home/view.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import '../_home/view.dart';
import '../_splash/view.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/_home/view.dart';
import 'package:kazahana/ui/pages/_splash/view.dart';

class HomePage extends StatefulWidget {
const HomePage({
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/pages/modules/route.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import '../../exports.dart';
import 'view.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/modules/view.dart';

class ModulesPageRoute extends RoutePage {
@override
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/pages/modules/view.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:kazahana/core/exports.dart';
import '../../exports.dart';
import 'provider.dart';
import 'package:kazahana/ui/exports.dart';
import 'package:kazahana/ui/pages/modules/provider.dart';

class ModulesPage extends StatelessWidget {
const ModulesPage({
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/pages/search/components/results_grid.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:kazahana/core/exports.dart';
import '../../../exports.dart';
import 'package:kazahana/ui/exports.dart';

class ResultsGrid extends StatelessWidget {
const ResultsGrid(
Expand Down
Loading

0 comments on commit 25a0e47

Please sign in to comment.