toMap method

Map<String, dynamic> toMap()

Converts the container style to a map for the MethodChannel.

Implementation

Map<String, dynamic> toMap() {
  return {
    'backgroundColor': backgroundColor.toARGB32(),
    'shape': shape.name,
    'borderRadius': borderRadius,
    'position': position.name,
    'xOffset': xOffset,
    'yOffset': yOffset,
    'paddingLeft': padding.left,
    'paddingTop': padding.top,
    'paddingRight': padding.right,
    'paddingBottom': padding.bottom,
    if (width != null) 'width': width,
    if (height != null) 'height': height,
  };
}