Use better way to handle gallery with no images and page with no images

This commit is contained in:
2024-06-02 07:49:03 +00:00
committed by GitHub
parent 9e0aa9ca84
commit f5666a8c46
7 changed files with 54 additions and 14 deletions

View File

@@ -23,7 +23,7 @@ class ThumbnailGridView extends StatelessWidget {
itemBuilder: (context, index) {
final page = npages[index]!;
final fileId =
files != null ? files!.files[page.token]!.first.id : null;
files != null ? files!.files[page.token]!.firstOrNull?.id : null;
final key = Key("thumbnail$gid-${page.index}");
return Container(
padding: const EdgeInsets.all(4),