AdaptiveBuilder constructor

const AdaptiveBuilder({
  1. Key? key,
  2. Widget phone(
    1. BuildContext context,
    2. AdaptiveDeviceInfo info
    )?,
  3. Widget tablet(
    1. BuildContext context,
    2. AdaptiveDeviceInfo info
    )?,
  4. Widget desktop(
    1. BuildContext context,
    2. AdaptiveDeviceInfo info
    )?,
  5. Widget foldable(
    1. BuildContext context,
    2. AdaptiveDeviceInfo info
    )?,
  6. Widget builder(
    1. BuildContext context,
    2. AdaptiveDeviceInfo info
    )?,
})

Creates an AdaptiveBuilder widget.

At least one of phone, tablet, desktop, foldable, or builder must be provided.

Implementation

const AdaptiveBuilder({
  super.key,
  this.phone,
  this.tablet,
  this.desktop,
  this.foldable,
  this.builder,
}) : assert(
       phone != null ||
           tablet != null ||
           desktop != null ||
           foldable != null ||
           builder != null,
       'At least one builder must be provided',
     );