spacing property

String spacing

Implementation

String get spacing => _spacing;
void spacing=(String _newVal)

Implementation

set spacing(String _newVal) {
  if (_spacing == _newVal && _spacing == '0px') {
    return;
  }
  _spacing = _newVal;
  for (var i = 0; i < children.length; i++) {
    final child = children[i];
    final isLast = i == (children.length - 1);
    if (_vertical) {
      if (!isLast) {
        child.element.style.marginBottom = _spacing;
      } else {
        child.element.style.marginBottom = '';
      }
      if (wrap) {
        child.element.style.marginRight = _spacing;
      } else {
        child.element.style.marginRight = '';
      }
    } else {
      if (!isLast) {
        child.element.style.marginRight = _spacing;
      } else {
        child.element.style.marginRight = '';
      }

      if (wrap) {
        child.element.style.marginBottom = _spacing;
      } else {
        child.element.style.marginBottom = '';
      }
    }
  }
}