wrapIf method

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

Implementation

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

  return this;
}