diff options
Diffstat (limited to 'lib/widgets/popular_item.dart')
-rw-r--r-- | lib/widgets/popular_item.dart | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/widgets/popular_item.dart b/lib/widgets/popular_item.dart new file mode 100644 index 0000000..7e8cc2c --- /dev/null +++ b/lib/widgets/popular_item.dart @@ -0,0 +1,18 @@ +import 'package:flutter/material.dart'; +import 'package:pmsna1/models/popular.dart'; + +class PopularItem extends StatelessWidget { + final Popular popular; + + const PopularItem(this.popular, {super.key}); + + @override + Widget build(BuildContext context) { + return FadeInImage( + placeholder: const AssetImage('assets/loading.gif'), + image: NetworkImage( + 'https://image.tmdb.org/t/p/w500/${popular.posterPath!}', + ), + ); + } +} |