toJson method

  1. @override
Map<String, Object?> toJson(
  1. TraceBlobWriter blob
)
override

Returns the event as the JSON object a trace file holds, without its kind key, with every byte payload handed to blob and written as the reference it returns.

Implementation

@override
Map<String, Object?> toJson(TraceBlobWriter blob) => <String, Object?>{
  'texture': texture,
  'rgba': blob.add(rgba),
  'region': region == null ? null : screenRectToJson(region!),
  'mipLevel': mipLevel,
};