TRTCImageBuffer.fromJson constructor

TRTCImageBuffer.fromJson(
  1. Map<String, dynamic> json
)

Parse the corresponding structure from Json

Implementation

factory TRTCImageBuffer.fromJson(Map<String, dynamic> json) {
  return TRTCImageBuffer(
    buffer: Uint8List.fromList(json['buffer'].cast<int>()),
    length: json['length'],
    width: json['width'],
    height: json['height'],
  );
}