visible method
Shows this widget when isVisible, otherwise replacement.
The default replacement takes no space, unlike Opacity(opacity: 0)
which still lays out and still absorbs hit tests.
Implementation
Widget visible(
// ignore: avoid_positional_boolean_parameters
bool isVisible, {
Widget replacement = const SizedBox.shrink(),
}) => isVisible ? this : replacement;