toJson method

Map<String, dynamic> toJson()

Allows you to serialize object.

Implementation

Map<String, dynamic> toJson() => {
      "name": name,
      "size": size,
      "style": style?.value,
    }.clearNulls();