fromResponsiveWrapper static method
Creates data based on the ResponsiveWrapper state.
Implementation
static ResponsiveWrapperData fromResponsiveWrapper(
ResponsiveWrapperState state) {
return ResponsiveWrapperData(
screenWidth: state.screenWidth,
screenHeight: state.screenHeight,
scaledWidth: state.scaledWidth,
scaledHeight: state.scaledHeight,
breakpoints: state.breakpoints,
breakpointSegments: state.breakpointSegments,
activeBreakpoint: state.activeBreakpointSegment.responsiveBreakpoint,
isMobile:
state.activeBreakpointSegment.responsiveBreakpoint.name == MOBILE,
isPhone: state.activeBreakpointSegment.responsiveBreakpoint.name == PHONE,
isTablet:
state.activeBreakpointSegment.responsiveBreakpoint.name == TABLET,
isDesktop:
state.activeBreakpointSegment.responsiveBreakpoint.name == DESKTOP,
orientation: state.orientation,
);
}