@@ -17,11 +17,19 @@ class HomeScreen extends StatelessWidget {
17
17
children: < Widget > [
18
18
_buildWidgetAppBar (),
19
19
SizedBox (height: 24.0 ),
20
- _buildWidgetBanner (mediaQuery),
21
- SizedBox (height: 24.0 ),
22
- _buildWidgetCategories (mediaQuery),
23
- SizedBox (height: 24.0 ),
24
- _buildWidgetMyList (mediaQuery, context),
20
+ Expanded (
21
+ child: ListView (
22
+ children: [
23
+ _buildWidgetBanner (mediaQuery),
24
+ SizedBox (height: 24.0 ),
25
+ _buildWidgetCategories (mediaQuery),
26
+ SizedBox (height: 24.0 ),
27
+ _buildWidgetMyList (mediaQuery, context),
28
+ SizedBox (height: 24.0 ),
29
+ _buildWidgetPopular (mediaQuery, context),
30
+ ],
31
+ ),
32
+ ),
25
33
],
26
34
),
27
35
),
@@ -267,4 +275,62 @@ class HomeScreen extends StatelessWidget {
267
275
),
268
276
);
269
277
}
278
+
279
+ Widget _buildWidgetPopular (MediaQueryData mediaQuery, BuildContext context) {
280
+ var listPosterPopular = [
281
+ 'assets/images/movie_1_popular_backdrop_path.jpeg' ,
282
+ 'assets/images/movie_2_popular_backdrop_path.jpeg' ,
283
+ 'assets/images/movie_3_popular_backdrop_path.jpeg' ,
284
+ 'assets/images/movie_4_popular_backdrop_path.jpeg' ,
285
+ 'assets/images/movie_5_popular_backdrop_path.jpeg' ,
286
+ ];
287
+ return Container (
288
+ width: mediaQuery.size.width,
289
+ child: Column (
290
+ children: < Widget > [
291
+ Padding (
292
+ padding: const EdgeInsets .symmetric (horizontal: 16.0 ),
293
+ child: Row (
294
+ crossAxisAlignment: CrossAxisAlignment .center,
295
+ children: < Widget > [
296
+ Expanded (
297
+ child: Text (
298
+ 'Popular on Netflix' ,
299
+ style: Theme .of (context).textTheme.subhead.merge (
300
+ TextStyle (
301
+ color: Colors .black,
302
+ ),
303
+ ),
304
+ ),
305
+ ),
306
+ Icon (Icons .chevron_right),
307
+ ],
308
+ ),
309
+ ),
310
+ SizedBox (height: 8.0 ),
311
+ Container (
312
+ height: 200.0 ,
313
+ child: ListView .builder (
314
+ scrollDirection: Axis .horizontal,
315
+ itemBuilder: (BuildContext context, int index) {
316
+ return Padding (
317
+ padding: EdgeInsets .only (
318
+ left: 16.0 ,
319
+ right: index == listPosterPopular.length - 1 ? 16.0 : 0.0 ,
320
+ ),
321
+ child: ClipRRect (
322
+ borderRadius: BorderRadius .circular (8.0 ),
323
+ child: Image .asset (
324
+ listPosterPopular[index],
325
+ fit: BoxFit .cover,
326
+ ),
327
+ ),
328
+ );
329
+ },
330
+ ),
331
+ ),
332
+ ],
333
+ ),
334
+ );
335
+ }
270
336
}
0 commit comments