Created
December 14, 2019 16:53
-
-
Save rrifafauzikomara/275c745574a0f886636b16ded3a14ef4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Widget getListMovie() { | |
return Container( | |
child: Center( | |
child: StreamBuilder( | |
stream: bloc.allMovie, | |
builder: (context, AsyncSnapshot<Movie> snapshot) { | |
if (snapshot.hasData) { | |
return showListMovie(snapshot); | |
} else if (snapshot.hasError) { | |
return Text(snapshot.error.toString(), style: TextStyle(color: Color.fromRGBO(58, 66, 86, 1.0)),); | |
} | |
return Center( | |
child: CircularProgressIndicator( | |
valueColor: AlwaysStoppedAnimation<Color>( | |
Color.fromRGBO(58, 66, 86, 1.0), | |
), | |
), | |
); | |
}, | |
), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment