pProps property

Map<String, String> get pProps

Converts padding attributes to a CSS style map.

Implementation

Map<String, String> get pProps => {
  if (top != null &&
      top == right &&
      bottom == left &&
      top == bottom &&
      right == left) ...{
    'padding': top!.cssText,
  } else if (top != null &&
      right != null &&
      top == bottom &&
      right == left) ...{
    'padding': '${top!.cssText} ${right!.cssText}',
  } else ...{
    'padding-top': ?top?.cssText,
    'padding-right': ?right?.cssText,
    'padding-bottom': ?bottom?.cssText,
    'padding-left': ?left?.cssText,
  },
};