conditional method

Widget conditional(
  1. bool condition,
  2. XWidgetBuilder ifTrue
)

Implementation

Widget conditional(bool condition, XWidgetBuilder ifTrue) {
  if (condition) {
    return ifTrue(this);
  }
  return this;
}