responsiveType property

ResponsiveType responsiveType

Returns the responsive type depending of the screen size.

Implementation

ResponsiveType get responsiveType {
  final double deviceWidth = _deviceWidth;
  if (deviceWidth >= changePoints.desktopChangePoint) {
    return ResponsiveType.desktop;
  }
  if (deviceWidth >= changePoints.tabletChangePoint) {
    return ResponsiveType.tablet;
  }
  if (deviceWidth < changePoints.watchChangePoint) {
    return ResponsiveType.watch;
  }
  return ResponsiveType.phone;
}