TRTCImageBuffer.fromJson constructor

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

解析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'],
  );
}