mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-18 11:46:33 -07:00
chore: Fix dart deprecation messages
This commit is contained in:
parent
607dea3de1
commit
39a7537116
81 changed files with 258 additions and 195 deletions
|
|
@ -26,7 +26,7 @@ class BookProviderModel {
|
|||
ImagesData? get cover => parentModel?.getPosters ?? book?.getPosters;
|
||||
|
||||
List<BookModel> get allBooks {
|
||||
if (chapters.isEmpty) return [book].whereNotNull().toList();
|
||||
if (chapters.isEmpty) return [book].nonNulls.toList();
|
||||
return chapters;
|
||||
}
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ class BookDetailsProviderNotifier extends StateNotifier<BookProviderModel> {
|
|||
|
||||
state = state.copyWith(
|
||||
parentModel: !parentIsView ? () => parentResponse.bodyOrThrow : null,
|
||||
chapters: (siblingsResponse?.body?.items ?? [openedBook]).whereType<BookModel>().whereNotNull().toList(),
|
||||
chapters: (siblingsResponse?.body?.items ?? [openedBook]).whereType<BookModel>().nonNulls.toList(),
|
||||
);
|
||||
|
||||
return response;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue