getSize method

int getSize(
  1. FSBreakpoint breakpoint
)

Get the size for a specific breakpoint with proper fallback

Implementation

int getSize(FSBreakpoint breakpoint) {
  switch (breakpoint) {
    case FSBreakpoint.xs:
      return xs;
    case FSBreakpoint.sm:
      return sm ?? xs;
    case FSBreakpoint.md:
      return md ?? sm ?? xs;
    case FSBreakpoint.lg:
      return lg ?? md ?? sm ?? xs;
    case FSBreakpoint.xl:
      return xl ?? lg ?? md ?? sm ?? xs;
    case FSBreakpoint.xxl:
      return xxl ?? xl ?? lg ?? md ?? sm ?? xs;
  }
}