valueByBreakpoint<T> method
Returns a value based on custom breakpoint Returns the value associated with the current active breakpoint Returns defaultValue if no matching breakpoint is found
Implementation
T valueByBreakpoint<T>({
required Map<String, T> breakpointValues,
required T defaultValue,
}) {
final current = currentBreakpoint;
return breakpointValues[current] ?? defaultValue;
}