Remove hardcoded cacheExtent to use Flutter's default value
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user