When uploading a video, applying indicator (#469)

pull/470/head
Develeste 3 years ago committed by GitHub
parent 7c7ab448e3
commit 6782a49b4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      lib/src/widgets/video_app.dart

@ -35,13 +35,15 @@ class _VideoAppState extends State<VideoApp> {
// Ensure the first frame is shown after the video is initialized,
// even before the play button has been pressed.
setState(() {});
});
}).catchError((error) {
setState(() {});
});;
}
@override
Widget build(BuildContext context) {
final defaultStyles = DefaultStyles.getInstance(context);
if (!_controller.value.isInitialized || _controller.value.hasError) {
if (_controller.value.hasError) {
if (widget.readOnly) {
return RichText(
text: TextSpan(
@ -54,6 +56,11 @@ class _VideoAppState extends State<VideoApp> {
return RichText(
text: TextSpan(text: widget.videoUrl, style: defaultStyles.link));
} else if (!_controller.value.isInitialized) {
return VideoProgressIndicator(_controller,
allowScrubbing: true,
colors: VideoProgressColors(playedColor: Colors.blue),
);
}
return Container(

Loading…
Cancel
Save