getContentView method

Widget getContentView()

Implementation

Widget getContentView() {
  switch (widget.imageLoader.state) {
    case LoadState.success:
      return RawImage(
        image: this.currentFrame,
        fit: widget.fit,
      );
    case LoadState.failure:
      return Center(
          child: widget.errorWidget?? Text(
        "Image failed to load.",
        style: TextStyle(
          color: Colors.white,
        ),
      ));
    default:
      return Center(
        child: widget.loadingWidget?? Container(
          width: 70,
          height: 70,
          child: CircularProgressIndicator(
            valueColor: AlwaysStoppedAnimation<Color>(Colors.white),
            strokeWidth: 3,
          ),
        ),
      );
  }
}