awh property

EdgeInsets get awh

Scales horizontal values by width ratio, vertical by height ratio.

Implementation

EdgeInsets get awh {
  final context = AdaptiveContext.maybeContext;
  if (context == null) return this;
  final data = AdaptiveData.maybeOf(context);
  if (data == null) return this;
  final info = data.getDeviceInfo(context);
  return EdgeInsets.only(
    left: info.setWidth(left),
    top: info.setHeight(top),
    right: info.setWidth(right),
    bottom: info.setHeight(bottom),
  );
}