Remove hardcoded cacheExtent to use Flutter's default value

This commit is contained in:
ashilkn
2025-08-28 16:58:31 +05:30
parent f72c9fa068
commit 23dc809589

View File

@@ -604,7 +604,6 @@ class GalleryState extends State<Gallery> {
? const NeverScrollableScrollPhysics()
: const ExponentialBouncingScrollPhysics(),
controller: _scrollController,
cacheExtent: 1000,
slivers: [
SliverToBoxAdapter(
child: SizeChangedLayoutNotifier(
@@ -642,25 +641,6 @@ class GalleryState extends State<Gallery> {
),
);
}
double get galleryCacheExtent {
final int photoGridSize = localSettings.getPhotoGridSize();
switch (photoGridSize) {
case 2:
case 3:
return 1000;
case 4:
return 850;
case 5:
return 600;
case 6:
return 300;
default:
throw StateError(
'Invalid photo grid size configuration: $photoGridSize',
);
}
}
}
class PinnedGroupHeader extends StatefulWidget {