pw property

double get pw

Percentage of screen width.

50.pw returns 50% of the screen width.

Implementation

double get pw {
  final context = AdaptiveContext.maybeContext;
  if (context == null) return toDouble();
  final data = AdaptiveData.maybeOf(context);
  if (data == null) return toDouble();
  final info = data.getDeviceInfo(context);
  return info.screenWidth * (this / 100);
}