toJson method

Map toJson()

Implementation

Map toJson(){
  Map result = {};

  if (width != null) result.addAll({"width": width});
  if (height != null) result.addAll({"height": height});
  if (type != null) result.addAll({"type": type});

  return result;
}