padding property
The amount to pad the child in each dimension.
If this is set to an EdgeInsetsDirectional object, then textDirection
must not be null.
Implementation
@override
EdgeInsets get padding {
if (renderBoxModelInLayoutStack.isNotEmpty &&
_layoutPassPaddingCachePassId == renderBoxModelLayoutPassId &&
_layoutPassPadding != null) {
return _layoutPassPadding!;
}
final EdgeInsets insets = EdgeInsets.only(
left: _nonNegativePaddingComputedValue(paddingLeft),
right: _nonNegativePaddingComputedValue(paddingRight),
bottom: _nonNegativePaddingComputedValue(paddingBottom),
top: _nonNegativePaddingComputedValue(paddingTop),
);
assert(insets.isNonNegative);
if (renderBoxModelInLayoutStack.isNotEmpty) {
_layoutPassPaddingCachePassId = renderBoxModelLayoutPassId;
_layoutPassPadding = insets;
}
return insets;
}