responsiveWidth method

double responsiveWidth({
  1. required double forUnInitialDevices,
  2. double? forPortraitMobileScreen,
  3. double? forLandscapeMobileScreen,
  4. double? forPortraitTabletScreen,
  5. double? forLandscapeTabletScreen,
  6. double? forDesktopScreen,
  7. double? forTVScreen,
})

return a responsive value calculated in percentage

Implementation

double responsiveWidth(
    {required double forUnInitialDevices,
    double? forPortraitMobileScreen,
    double? forLandscapeMobileScreen,
    double? forPortraitTabletScreen,
    double? forLandscapeTabletScreen,
    double? forDesktopScreen,
    double? forTVScreen}) {
  return _responsiveHandler.responsiveLength(
      screenType == ScreenType.desktop || screenType == ScreenType.TV
          ? _responsiveHandler._size.height
          : _responsiveHandler._size.width,
      _responsiveHandler._responsiveForChangeableOrientation ==
              ResponsiveForChangeableOrientation.fromPhysicalDimension
          ? _responsiveHandler._size.width
          : _responsiveHandler._size.height,
      forPortraitMobileScreen ?? forUnInitialDevices,
      forLandscapeMobileScreen ?? forUnInitialDevices,
      forPortraitTabletScreen ?? forUnInitialDevices,
      forLandscapeTabletScreen ?? forUnInitialDevices,
      forDesktopScreen ?? forUnInitialDevices,
      forTVScreen ?? forUnInitialDevices);
}