showVideoAsset method
Future<void>
showVideoAsset(
{ - required BuildContext context,
- required String videoAsset,
- required String userName,
- required String companyTitle,
- required Function onVideoEndAction,
- required bool animateOnVideoEnd,
- Function? onClose,
- Function? onExpand,
- String? avatarUrl,
- Widget? child,
- Function? onSkip,
})
Implementation
Future<void> showVideoAsset({
required BuildContext context,
required String videoAsset,
required String userName,
required String companyTitle,
required Function onVideoEndAction,
required bool animateOnVideoEnd,
Function? onClose,
Function? onExpand,
String? avatarUrl,
Widget? child,
Function? onSkip,
}) async {
_overlayHelper.showHelper(
context,
(ctx) => Material(
color: Colors.transparent,
type: MaterialType.transparency,
child: SafeArea(
child: Align(
alignment: Alignment.bottomLeft,
child: Padding(
padding: const EdgeInsets.only(left: 32.0),
child: BouncingCircleBg(
radius: 40,
child: VideoMiniature(
videoAsset: videoAsset,
radius: 80,
onTap: () {
if (onExpand != null) {
onExpand();
}
_overlayHelper.popHelper();
showExpandedVideoAsset(
context: ctx,
videoAsset: videoAsset,
userName: userName,
companyTitle: companyTitle,
animateOnVideoEnd: animateOnVideoEnd,
child: child,
onVideoEndAction: onVideoEndAction,
close: () {
_overlayHelper.popHelper();
if (onClose != null) {
onClose();
}
},
onSkip: () {
_overlayHelper.popHelper();
if (onSkip != null) {
onSkip();
}
},
);
},
),
),
),
),
),
),
);
}