toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    // radius
    'topRightRadius': borderRadius?.topRight,
    'topLeftRadius': borderRadius?.topLeft,
    'bottomRightRadius': borderRadius?.bottomRight,
    'bottomLeftRadius': borderRadius?.bottomLeft,
    // border
    'borderWidth': border?.width ?? 0,
    'borderColor': border?.color.toHex(),
    // other
    'backgroundColor': backgroundColor?.toHex(),
    'gradient': gradient?.toJson(),
  };
}