Initial commit

This commit is contained in:
2023-02-03 23:33:21 +01:00
commit ee4458d613
147 changed files with 5860 additions and 0 deletions

50
lib/src/data/anime.dart Normal file
View File

@@ -0,0 +1,50 @@
/// The watch state of an anime
enum AnimeTrackingState {
watching,
completed,
planToWatch,
dropped,
}
/// Data about a tracked anime
class AnimeTrackingData {
const AnimeTrackingData(
this.id,
this.state,
this.title,
this.episodesWatched,
this.episodesTotal,
this.thumbnailUrl,
);
/// The ID of the anime
final String id;
/// The state of the anime
final AnimeTrackingState state;
/// The title of the anime
final String title;
/// Episodes in total.
final int? episodesTotal;
/// Episodes watched.
final int episodesWatched;
/// URL to the thumbnail/cover art for the anime.
final String thumbnailUrl;
AnimeTrackingData copyWith(
int episodesWatched,
) {
return AnimeTrackingData(
id,
state,
title,
episodesWatched,
episodesTotal,
thumbnailUrl,
);
}
}