deviceWidth property

double get deviceWidth

deviceWidth

represent the device height, check if current display in landscape mode then return its height as total width instead of its size width

Implementation

double get deviceWidth {
  final Size size = mediaQueryData.size;
  if (DeviceService.isMobile) {
    return mediaQueryData.orientation == Orientation.landscape
        ? size.height
        : size.width;
  }
  return size.width;
}