wrapIfElse method

Widget wrapIfElse(
  1. bool condition,
  2. Widget wrapper(
    1. Widget
    ), {
  3. required Widget elseWrapper(
    1. Widget
    ),
})

Implementation

Widget wrapIfElse(
  bool condition,
  Widget Function(Widget) wrapper, {
  required Widget Function(Widget) elseWrapper,
}) {
  if (condition) {
    return wrapper(this);
  }

  return elseWrapper(this);
}