-
-
Save TechieBlossom/7f575f9717a0f17aa5182d16ab273394 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 MovieCardWidget extends StatelessWidget { | |
//1 | |
final int movieId; | |
//2 | |
final String posterPath; | |
const MovieCardWidget({ | |
Key key, | |
@required this.movieId, | |
@required this.posterPath, | |
}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
//6 | |
return Material( | |
elevation: 32, | |
borderRadius: BorderRadius.circular(Sizes.dimen_16.w), | |
//5 | |
child: GestureDetector( | |
onTap: () {}, | |
//4 | |
child: ClipRRect( | |
borderRadius: BorderRadius.circular(Sizes.dimen_16.w), | |
//3 | |
child: CachedNetworkImage( | |
imageUrl: '${ApiConstants.BASE_IMAGE_URL}$posterPath', | |
fit: BoxFit.cover, | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment