gone method

Widget gone(
  1. bool gone
)

Hides the widget and removes it from the layout if gone is true.

Similar to display: none in CSS.

Implementation

Widget gone(bool gone) => Visibility(
      visible: !gone,
      maintainState: false,
      child: this,
    );