ResponsiveVisibility constructor

const ResponsiveVisibility({
  1. Key? key,
  2. required Widget child,
  3. Widget replacement = const SizedBox.shrink(),
  4. List<ScreenType>? visibleOn,
  5. List<ScreenType>? hiddenOn,
})

Creates a ResponsiveVisibility widget.

Implementation

const ResponsiveVisibility({
  super.key,
  required this.child,
  this.replacement = const SizedBox.shrink(),
  this.visibleOn,
  this.hiddenOn,
}) : assert(visibleOn == null || hiddenOn == null,
          'Provide either visibleOn or hiddenOn, not both.');