hide method

Widget hide({
  1. required Widget child,
  2. bool hideOnXs = false,
  3. bool hideOnSm = false,
  4. bool hideOnMd = false,
  5. bool hideOnLg = false,
  6. bool hideOnXl = false,
  7. bool hideOnXxl = false,
  8. Widget? fallback,
})

Hide widget based on breakpoint (inverse of show)

Hides child when the condition is met based on breakpoint. Returns fallback widget when condition is met.

Implementation

Widget hide({
  required Widget child,
  bool hideOnXs = false,
  bool hideOnSm = false,
  bool hideOnMd = false,
  bool hideOnLg = false,
  bool hideOnXl = false,
  bool hideOnXxl = false,
  Widget? fallback,
}) {
  return show(
    child: child,
    showOnXs: !hideOnXs,
    showOnSm: !hideOnSm,
    showOnMd: !hideOnMd,
    showOnLg: !hideOnLg,
    showOnXl: !hideOnXl,
    showOnXxl: !hideOnXxl,
    fallback: fallback,
  );
}