TRTCScreenCaptureSourceList.fromJson constructor

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

Parse the corresponding structure from Json

Implementation

factory TRTCScreenCaptureSourceList.fromJson(Map<String?, dynamic> json) {
  return TRTCScreenCaptureSourceList(
    count: json['count'],
    sourceInfo: List<TRTCScreenCaptureSourceInfo>.from(
      json['sourceInfo'].map(
        (x) {
          Map<String, dynamic> xMap = (x as Map<Object?, Object?>).cast<String, dynamic>();
          return TRTCScreenCaptureSourceInfo.fromJson(xMap);
        },
      ),
    ),
  );
}