FSResponsive.of constructor

FSResponsive.of(
  1. double width, {
  2. FSCustomBreakpoints? breakpoints,
})

Factory constructor that creates responsive instance from screen width

Implementation

factory FSResponsive.of(double width, {FSCustomBreakpoints? breakpoints}) {
  assert(width >= 0, 'Screen width cannot be negative');

  return FSResponsive(
    screenWidth: width,
    breakpoints: breakpoints ?? const FSCustomBreakpoints(),
  );
}