setDefaults static method

dynamic setDefaults({
  1. Breakpoints? globalBreakpoints,
  2. SpacingCollection? globalSpacing,
  3. GigaSpacingCollection? globalGigaSpacing,
  4. ResponsiveCollection? globalBody,
  5. ResponsiveCollection? globalMargin,
  6. ResponsiveCollection? globalPadding,
  7. ResponsiveCollection? globalGutter,
  8. ResponsiveLayoutColumnCollection? globalColumns,
})

Overwrite the default values if needed.

An Example of SimpleSpacing would be

An Example of globalGutter would be:

class MyResponsiveGutters extends ResponsiveCollection {

  @override
  ScaledSize lg(double width) => const ScaledSize(size: 8);

  @override
  ScaledSize md(double width) => const ScaledSize(size: 8);

  @override
  ScaledSize sm1(double width) => const ScaledSize(size: 8);

  @override
  ScaledSize sm2(double width) => const ScaledSize(size: 8);

  @override
  ScaledSize xl(double width) => const ScaledSize(size: 8);

  @override
  ScaledSize xs(double width) => const ScaledSize(size: 8);
}

Implementation

static setDefaults({
  Breakpoints? globalBreakpoints,
  SpacingCollection? globalSpacing,
  GigaSpacingCollection? globalGigaSpacing,
  ResponsiveCollection? globalBody,
  ResponsiveCollection? globalMargin,
  ResponsiveCollection? globalPadding,
  ResponsiveCollection? globalGutter,
  ResponsiveLayoutColumnCollection? globalColumns,
}) {
  if (globalBreakpoints != null) {
    ResponsiveSpacing.globalBreakpoints = globalBreakpoints;
  }
  if (globalGigaSpacing != null) {
    ResponsiveSpacing.globalGigaSpacing = globalGigaSpacing;
  }
  if (globalSpacing != null) {
    ResponsiveSpacing.globalSpacing = globalSpacing;
  }
  if (globalBody != null) {
    ResponsiveSpacing.globalBody = globalBody;
  }
  if (globalMargin != null) {
    ResponsiveSpacing.globalMargin = globalMargin;
  }
  if (globalPadding != null) {
    ResponsiveSpacing.globalPadding = globalPadding;
  }
  if (globalGutter != null) {
    ResponsiveSpacing.globalGutter = globalGutter;
  }
  if (globalColumns != null) {
    ResponsiveSpacing.globalColumns = globalColumns;
  }
}