margin property

EdgeInsetsGeometry? get margin

Implementation

EdgeInsetsGeometry? get margin {
  if (_margin != null) {
    final resolvedMargin = _margin!.resolve(textDirection);
    if (mustRotate) {
      return EdgeInsets.fromLTRB(
        resolvedMargin.bottom,
        resolvedMargin.left,
        resolvedMargin.top,
        resolvedMargin.right,
      );
    } else {
      return _margin;
    }
  }

  if (mustRotate) {
    return EdgeInsets.fromLTRB(pageFormat.marginBottom, pageFormat.marginLeft,
        pageFormat.marginTop, pageFormat.marginRight);
  } else {
    return EdgeInsets.fromLTRB(pageFormat.marginLeft, pageFormat.marginTop,
        pageFormat.marginRight, pageFormat.marginBottom);
  }
}