aw property

EdgeInsets get aw

Scales all values by the width ratio.

Implementation

EdgeInsets get aw {
  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.setWidth(top),
    right: info.setWidth(right),
    bottom: info.setWidth(bottom),
  );
}