Add hero animation to videos

This commit is contained in:
Vishnu Mohandas 2020-06-23 20:35:48 +05:30
parent 42a1471c58
commit d042d0dc2e

View file

@ -52,10 +52,14 @@ class _VideoWidgetState extends State<VideoWidget> {
@override
Widget build(BuildContext context) {
return _videoPlayerController != null &&
final content = _videoPlayerController != null &&
_videoPlayerController.value.initialized
? _getVideoPlayer()
: _getLoadingWidget();
return Hero(
tag: widget.file.generatedId.toString(),
child: content,
);
}
Widget _getLoadingWidget() {