wrapIf method

Widget wrapIf(
  1. bool test,
  2. Widget func(
    1. Widget wrappedChild
    )
)

wrap a widget using a Function if test is true

Implementation

Widget wrapIf(bool test, Widget Function(Widget wrappedChild) func) => test ? func(this) : this;