getContentView method

Widget getContentView()

Implementation

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