getResourceVideo function
Implementation
Widget getResourceVideo(VideoDetail videoDetail,
[BuildContext? context, int index = 0]) {
return Container(
width: double.infinity,
height: 300.0,
alignment: Alignment.center,
margin: const EdgeInsets.symmetric(vertical: 50.0),
child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return InViewNotifierWidget(
id: '$index',
builder: (BuildContext context, bool isInView, Widget? child) {
return VideoDetailView(
videoDetail,
onPlay: isInView,
);
},
);
},
),
);
}