fromWidgetState static method

Creates data based on the ResponsiveBreakpoints state.

Implementation

static ResponsiveBreakpointsData fromWidgetState(
    ResponsiveBreakpointsState state) {
  return ResponsiveBreakpointsData(
    screenWidth: state.screenWidth,
    screenHeight: state.screenHeight,
    breakpoint: state.breakpoint,
    breakpoints: state.breakpoints,
    isMobile: state.breakpoint.name == MOBILE,
    isPhone: state.breakpoint.name == PHONE,
    isTablet: state.breakpoint.name == TABLET,
    isDesktop: state.breakpoint.name == DESKTOP,
    orientation: state.orientation,
  );
}