chore: Apply dart analyze fixes

This commit is contained in:
2026-07-26 22:14:18 +02:00
parent 18f0d55e00
commit 06da4dbb16
11 changed files with 567 additions and 395 deletions

View File

@@ -125,8 +125,9 @@ class AnimeListBloc extends Bloc<AnimeListEvent, AnimeListState> {
final anime = state.animes[index];
if (anime.episodesTotal != null &&
anime.episodesWatched + 1 > anime.episodesTotal!)
anime.episodesWatched + 1 > anime.episodesTotal!) {
return;
}
final newAnime = await GetIt.I
.get<DatabaseService>()
@@ -226,8 +227,9 @@ class AnimeListBloc extends Bloc<AnimeListEvent, AnimeListState> {
final manga = state.mangas[index];
if (manga.chaptersTotal != null &&
manga.chaptersRead + 1 > manga.chaptersTotal!)
manga.chaptersRead + 1 > manga.chaptersTotal!) {
return;
}
final newManga = await GetIt.I
.get<DatabaseService>()

View File

@@ -115,10 +115,8 @@ class DetailsBloc extends Bloc<DetailsEvent, DetailsState> {
switch (event.trackingType) {
case TrackingMediumType.anime:
bloc.add(AnimeRemovedEvent(event.id));
break;
case TrackingMediumType.manga:
bloc.add(MangaRemovedEvent(event.id));
break;
}
// Navigate back

View File

@@ -250,7 +250,7 @@ class SettingsBloc extends Bloc<SettingsEvent, SettingsState> {
Emitter<SettingsState> emit,
) async {
final al = GetIt.I.get<AnimeListBloc>();
final exportArchive = archive.GZipDecoder().decodeBytes(
final exportArchive = const archive.GZipDecoder().decodeBytes(
await File(event.path).readAsBytes(),
);
final json = jsonDecode(utf8.decode(exportArchive)) as Map<String, dynamic>;