callBackWhenVideoEnd method

void callBackWhenVideoEnd({
  1. required dynamic onVideoEnd()?,
})

Implementation

void callBackWhenVideoEnd({
  required Function()? onVideoEnd,
}) {
  controller.addJavaScriptHandler(
    handlerName: 'onVideoEnd',
    callback: (args) {
      onVideoEnd?.call();
      print('<<< Video ended >>>');
      return null;
    },
  );
}