pathEntityListBackdrop method

  1. @override
Widget pathEntityListBackdrop(
  1. BuildContext context
)
override

While the picker is switching path, this will displayed. If the user tapped on it, it'll collapse the list widget.

当选择器正在选择路径时,它会出现。用户点击它时,列表会折叠收起。

Implementation

@override
Widget pathEntityListBackdrop(BuildContext context) {
  return Positioned.fill(
    child: Selector<DefaultAssetPickerProvider, bool>(
      selector: (_, DefaultAssetPickerProvider p) => p.isSwitchingPath,
      builder: (_, bool isSwitchingPath, __) => IgnorePointer(
        ignoring: !isSwitchingPath,
        child: GestureDetector(
          onTap: () => provider.isSwitchingPath = false,
          child: AnimatedOpacity(
            duration: switchingPathDuration,
            opacity: isSwitchingPath ? .75 : 0,
            child: const ColoredBox(color: Colors.black),
          ),
        ),
      ),
    ),
  );
}