CommonLayoutWidget.withResponsiveSpacings constructor

const CommonLayoutWidget.withResponsiveSpacings({
  1. required Widget child,
  2. CommonLayout resolverBuilder(
    1. BoxConstraints deviceConstraints
    )?,
  3. RawSpacings? desktopSpacings,
  4. RawSpacings? tabletSpacings,
  5. RawSpacings? phoneSpacings,
  6. RawSpacings? tinyHardwareSpacings,
})

Creates a CommonLayoutWidget with specified breakpoints spacings

If not all spacings are provided, it uses the same CommonLayout.value logic to pick the closest and most suitable. If you want to a single spacing for all breakpoints, use the default constructor.

To override with your own CommonLayout, use the resolverBuilder argument.

Implementation

const CommonLayoutWidget.withResponsiveSpacings({
  required this.child,
  this.resolverBuilder,
  this.desktopSpacings,
  this.tabletSpacings,
  this.phoneSpacings,
  this.tinyHardwareSpacings,
});