showExpandedVideoAsset method

Future<void> showExpandedVideoAsset({
  1. required BuildContext context,
  2. required String videoAsset,
  3. required String userName,
  4. required String companyTitle,
  5. required Function onVideoEndAction,
  6. required Function close,
  7. required bool animateOnVideoEnd,
  8. Function? onSkip,
  9. String? avatarUrl,
  10. Widget? child,
})

Implementation

Future<void> showExpandedVideoAsset({
  required BuildContext context,
  required String videoAsset,
  required String userName,
  required String companyTitle,
  required Function onVideoEndAction,
  required Function close,
  required bool animateOnVideoEnd,
  Function? onSkip,
  String? avatarUrl,
  Widget? child,
}) async {
  _overlayHelper.showHelper(
    context,
    (context) => Material(
      color: Colors.transparent,
      type: MaterialType.transparency,
      child: VideoExpanded(
        videoAsset: videoAsset,
        companyTitle: companyTitle,
        userName: userName,
        avatarUrl: avatarUrl,
        onEndAction: onVideoEndAction,
        animateOnVideoEnd: animateOnVideoEnd,
        triggerEndRemaining: const Duration(seconds: 1),
        onSkip: onSkip,
        close: close,
        bgColor: const Color(0xFF191E26).withOpacity(.82),
        child: child,
      ),
    ),
  );
}