minor change

This commit is contained in:
Thibault Deckers 2020-05-08 15:28:32 +09:00
parent 9bd9332ae6
commit 2dc4cd6fe9
2 changed files with 4 additions and 2 deletions

View file

@ -12,6 +12,8 @@ import 'package:provider/provider.dart';
// with the multiple `SliverGrid` solution, thumbnails at the beginning of each sections are built even though they are offscreen // with the multiple `SliverGrid` solution, thumbnails at the beginning of each sections are built even though they are offscreen
// because of `RenderSliverMultiBoxAdaptor.addInitialChild` called by `RenderSliverGrid.performLayout` (line 547), as of Flutter v1.17.0 // because of `RenderSliverMultiBoxAdaptor.addInitialChild` called by `RenderSliverGrid.performLayout` (line 547), as of Flutter v1.17.0
class CollectionListSliver extends StatelessWidget { class CollectionListSliver extends StatelessWidget {
const CollectionListSliver();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final sectionLayouts = Provider.of<SectionedListLayout>(context).sectionLayouts; final sectionLayouts = Provider.of<SectionedListLayout>(context).sectionLayouts;

View file

@ -113,7 +113,7 @@ class _ScalableThumbnailCollection extends StatelessWidget {
child: _buildEmptyCollectionPlaceholder(collection), child: _buildEmptyCollectionPlaceholder(collection),
hasScrollBody: false, hasScrollBody: false,
) )
: CollectionListSliver(), : const CollectionListSliver(),
SliverToBoxAdapter( SliverToBoxAdapter(
child: Selector<MediaQueryData, double>( child: Selector<MediaQueryData, double>(
selector: (context, mq) => mq.viewInsets.bottom, selector: (context, mq) => mq.viewInsets.bottom,