activeOrOpacity static method

Widget activeOrOpacity({
  1. required Widget child,
  2. required bool active,
  3. required bool anyActive,
  4. Key? key,
  5. double opacity = 0.4,
})

Implementation

static Widget activeOrOpacity({
  required Widget child,
  required bool active,
  required bool anyActive,
  Key? key,
  double opacity = 0.4,
}) {
  if (anyActive && !active) {
    return RepaintBoundary(
      child: Opacity(
        opacity: opacity,
        child: IgnorePointer(child: child),
      ),
    );
  } else if (active) {
    return TScrollTop(key: key, child: child);
  }
  return child;
}