getResourceVideo function

Widget getResourceVideo(
  1. VideoDetail videoDetail, [
  2. BuildContext? context,
  3. int index = 0
])

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,
            );
          },
        );
      },
    ),
  );
}