find method

GigaSpacing find(
  1. double width
)

Implementation

GigaSpacing find(double width) {
  if (any != null) {
    return any!;
  }
  Breakpoints globalBreakpoints = ResponsiveSpacing.globalBreakpoints;
  if (globalBreakpoints.xl.enabled && width >= globalBreakpoints.xl.width) {
    return xl;
  }
  if (globalBreakpoints.lg.enabled && width >= globalBreakpoints.lg.width) {
    return lg;
  }
  if (globalBreakpoints.md.enabled && width >= globalBreakpoints.md.width) {
    return md;
  }
  if (globalBreakpoints.sm2.enabled && width >= globalBreakpoints.sm2.width) {
    return sm2;
  }
  if (globalBreakpoints.sm1.enabled && width >= globalBreakpoints.sm1.width) {
    return sm1;
  }
  return xs;
}