valueByBreakpoint<T> method

T valueByBreakpoint<T>({
  1. required Map<double, T> breakpoints,
  2. Axis direction = Axis.horizontal,
})

returns a specific value according to the current screen width or height or the next lower value if omitted

Implementation

T valueByBreakpoint<T>({required Map<double, T> breakpoints, Axis direction = Axis.horizontal}) => getBreakpointValue(direction == Axis.horizontal ? width : height, breakpoints);