wrapIf method

Widget wrapIf(
  1. bool condition,
  2. Widget wrapper(
    1. Widget
    )
)

Implementation

Widget wrapIf(bool condition, Widget Function(Widget) wrapper) {
  return condition ? wrapper(this) : this;
}