File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
example/lib/customs/pickers Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -494,20 +494,20 @@ class MultiTabAssetPickerBuilder extends DefaultAssetPickerBuilderDelegate {
494
494
Widget appleOSLayout (BuildContext context) => androidLayout (context);
495
495
496
496
Widget _buildGrid (BuildContext context) {
497
- return Selector <DefaultAssetPickerProvider , bool >(
498
- selector: (_, DefaultAssetPickerProvider p) => p.hasAssetsToDisplay,
499
- builder: (_, bool hasAssetsToDisplay, __) {
497
+ return Consumer <DefaultAssetPickerProvider >(
498
+ builder: (BuildContext context, DefaultAssetPickerProvider p, __) {
499
+ final bool shouldDisplayAssets =
500
+ p.hasAssetsToDisplay || shouldBuildSpecialItem;
500
501
return AnimatedSwitcher (
501
502
duration: const Duration (milliseconds: 300 ),
502
- child: hasAssetsToDisplay
503
+ child: shouldDisplayAssets
503
504
? Stack (
504
505
children: < Widget > [
505
506
RepaintBoundary (
506
507
child: Column (
507
508
children: < Widget > [
508
509
Expanded (child: assetsGridBuilder (context)),
509
- if (isPreviewEnabled)
510
- bottomActionBar (context),
510
+ if (isPreviewEnabled) bottomActionBar (context),
511
511
],
512
512
),
513
513
),
You can’t perform that action at this time.
0 commit comments