wrapIf method

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

Implementation

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

  return this;
}