AdaptiveVisibility constructor

const AdaptiveVisibility({
  1. Key? key,
  2. required Widget child,
  3. List<DeviceType>? visibleOn,
  4. List<DeviceType>? hiddenOn,
  5. Widget? replacement,
  6. bool maintainState = false,
})

Creates an AdaptiveVisibility widget.

Implementation

const AdaptiveVisibility({
  super.key,
  required this.child,
  this.visibleOn,
  this.hiddenOn,
  this.replacement,
  this.maintainState = false,
}) : assert(
       visibleOn != null || hiddenOn != null,
       'Either visibleOn or hiddenOn must be specified',
     );