toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> jsonData = <String, dynamic>{};
  jsonData['pixelFormat'] = pixelFormat;
  jsonData['bufferType'] = bufferType;
  jsonData['width'] = width;
  jsonData['height'] = height;
  jsonData['rotation'] = rotation.index;
  if (data != null) {
    jsonData['data'] = data;
  }
  if (textureId != null) {
    jsonData['textureId'] = textureId;
  }
  return jsonData;
}