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 ValueListenableBuilder<bool>(
    valueListenable: isSwitchingPath,
    builder: (_, bool isSwitchingPath, __) => Positioned.fill(
      child: IgnorePointer(
        ignoring: !isSwitchingPath,
        child: ExcludeSemantics(
          child: GestureDetector(
            onTap: () {
              this.isSwitchingPath.value = false;
            },
            child: AnimatedOpacity(
              duration: switchingPathDuration,
              opacity: isSwitchingPath ? .75 : 0,
              child: const ColoredBox(color: Colors.black),
            ),
          ),
        ),
      ),
    ),
  );
}