-
-
Save TechieBlossom/c51300d84426ec11c6cbb8a4f48a3f7f 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
class MovieDataWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
//1 | |
return BlocBuilder<MovieBackdropBloc, MovieBackdropState>( | |
builder: (context, state) { | |
//2 | |
if (state is MovieBackdropChanged) { | |
//3 | |
return Text( | |
state.movie.title, | |
textAlign: TextAlign.center, | |
maxLines: 1, | |
//3 | |
overflow: TextOverflow.fade, | |
//4 | |
style: Theme.of(context).textTheme.headline6, | |
); | |
} | |
return const SizedBox.shrink(); | |
}, | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment