renderViewForWeb function
Widget
renderViewForWeb(
- EnxController enxController,
- RxList<
ActiveList> activeTalkerList, - MediaQueryData mediaQueryData,
- BuildContext context,
Implementation
Widget renderViewForWeb(EnxController enxController, RxList<ActiveList> activeTalkerList,
MediaQueryData mediaQueryData, BuildContext context){
var screenSize = MediaQuery.of(context).size;
int itemCount = activeTalkerList.value.length;
if (itemCount == 1) {
return Center(child: videoView(activeTalkerList[0].streamId!,mediaQueryData,context));
} else if (itemCount == 2) {
return Row(
children: activeTalkerList.map((item) => Expanded(child: videoView(item.streamId!,mediaQueryData,context))).toList(),
);
} else {
return GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: getCrossAxisCount(itemCount),
childAspectRatio: getAspectRatio(itemCount),
),
itemCount: itemCount,
itemBuilder: (context, index) {
return videoView(activeTalkerList[index].streamId!,mediaQueryData,context);
},
);
}
}