wrap a widget using a Function if test is true
test
Widget wrapIf(bool test, Widget Function(Widget wrappedChild) func) => test ? func(this) : this;