minor change
This commit is contained in:
parent
9bd9332ae6
commit
2dc4cd6fe9
2 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||||
|
|
|
@ -107,13 +107,13 @@ class _ScalableThumbnailCollection extends StatelessWidget {
|
||||||
// when there is no content and we use `SliverFillRemaining`
|
// when there is no content and we use `SliverFillRemaining`
|
||||||
physics: collection.isEmpty ? const NeverScrollableScrollPhysics() : null,
|
physics: collection.isEmpty ? const NeverScrollableScrollPhysics() : null,
|
||||||
slivers: [
|
slivers: [
|
||||||
appBar,
|
appBar,
|
||||||
collection.isEmpty
|
collection.isEmpty
|
||||||
? SliverFillRemaining(
|
? SliverFillRemaining(
|
||||||
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,
|
||||||
|
|
Loading…
Reference in a new issue