getContentView method
Implementation
Widget getContentView() {
if (widget.videoLoader.state == LoadState.success &&
playerController!.value.isInitialized) {
return Center(
child: AspectRatio(
aspectRatio: playerController!.value.aspectRatio,
child: VideoPlayer(playerController!),
),
);
}
return widget.videoLoader.state == LoadState.loading
? Center(
child: widget.loadingWidget?? Container(
width: 70,
height: 70,
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(Colors.white),
strokeWidth: 3,
),
),
)
: Center(
child: widget.errorWidget?? Text(
"Media failed to load.",
style: TextStyle(
color: Colors.white,
),
));
}