props property

  1. @override
Map<String, String> get props

Convert radius attributes to CSS styles.

Implementation

@override
Map<String, String> get props => {
  if (topLeft == topRight &&
      bottomLeft == bottomRight &&
      topLeft == bottomLeft &&
      topRight == bottomRight) ...{
    'border-radius': ?topLeft?.cssText,
  } else if (topLeft != null &&
      topRight != null &&
      bottomLeft != null &&
      bottomRight != null) ...{
    'border-radius':
        '${topLeft!.cssText} ${topRight!.cssText} ${bottomRight!.cssText} ${bottomLeft!.cssText}',
  } else ...{
    'border-top-left-radius': ?topLeft?.cssText,
    'border-top-right-radius': ?topRight?.cssText,
    'border-bottom-right-radius': ?bottomRight?.cssText,
    'border-bottom-left-radius': ?bottomLeft?.cssText,
  },
};