1
+ import 'package:animate_do/animate_do.dart' ;
2
+ import 'package:flutter/material.dart' ;
3
+ import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart' ;
4
+ import 'package:salomon_bottom_bar/salomon_bottom_bar.dart' ;
5
+
6
+ class DiscoverPage extends StatefulWidget {
7
+ const DiscoverPage ({ Key ? key }) : super (key: key);
8
+
9
+ @override
10
+ _DiscoverPageState createState () => _DiscoverPageState ();
11
+ }
12
+
13
+ class _DiscoverPageState extends State <DiscoverPage > {
14
+ List <String > images = [
15
+ 'https://images.unsplash.com/photo-1633177317976-3f9bc45e1d1d?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
16
+ 'https://images.unsplash.com/photo-1633113093730-47449a1a9c6e?ixid=MnwxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwxMXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
17
+ 'https://images.unsplash.com/photo-1633209942287-701d44019290?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw3N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
18
+ 'https://images.unsplash.com/photo-1633287387306-f08b4b3671c6?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
19
+ 'https://images.unsplash.com/photo-1633269540827-728aabbb7646?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw1OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
20
+ 'https://images.unsplash.com/photo-1633183601291-ec3ddf252825?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
21
+ 'https://images.unsplash.com/photo-1633267538438-2d49aeb844f7?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
22
+ 'https://images.unsplash.com/photo-1633172905740-2eb6730c95b4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4MXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
23
+ 'https://images.unsplash.com/photo-1633277194892-c5e2bba2d40f?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw3OHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
24
+ 'https://images.unsplash.com/photo-1633212752699-93d095d7727e?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
25
+ 'https://images.unsplash.com/photo-1633177031940-61beb547f15e?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4Nnx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
26
+ 'https://images.unsplash.com/photo-1633190206143-e618bc3c0e8b?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw5N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
27
+ 'https://images.unsplash.com/photo-1633186710895-309db2eca9e4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw5OHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
28
+ 'https://images.unsplash.com/photo-1531204420596-d4e8af13de95?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMTN8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
29
+ 'https://images.unsplash.com/photo-1633245091570-cd62f7f116a3?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMjd8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
30
+ 'https://images.unsplash.com/photo-1633247835403-f7fde396f4ab?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMzB8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
31
+ 'https://images.unsplash.com/photo-1633260676663-eb70faaa8805?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNDB8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60'
32
+ 'https://images.unsplash.com/photo-1633211387371-88c4838cbfb4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNDJ8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
33
+ 'https://images.unsplash.com/photo-1633177317976-3f9bc45e1d1d?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
34
+ 'https://images.unsplash.com/photo-1633113093730-47449a1a9c6e?ixid=MnwxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwxMXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
35
+ 'https://images.unsplash.com/photo-1633209942287-701d44019290?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw3N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
36
+ 'https://images.unsplash.com/photo-1633287387306-f08b4b3671c6?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
37
+ 'https://images.unsplash.com/photo-1633269540827-728aabbb7646?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw1OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
38
+ 'https://images.unsplash.com/photo-1633183601291-ec3ddf252825?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
39
+ 'https://images.unsplash.com/photo-1633177317976-3f9bc45e1d1d?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
40
+ 'https://images.unsplash.com/photo-1633113093730-47449a1a9c6e?ixid=MnwxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwxMXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
41
+ 'https://images.unsplash.com/photo-1633209942287-701d44019290?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw3N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
42
+ 'https://images.unsplash.com/photo-1633287387306-f08b4b3671c6?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
43
+ 'https://images.unsplash.com/photo-1633269540827-728aabbb7646?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw1OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
44
+ 'https://images.unsplash.com/photo-1633183601291-ec3ddf252825?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
45
+ 'https://images.unsplash.com/photo-1633267538438-2d49aeb844f7?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
46
+ 'https://images.unsplash.com/photo-1633172905740-2eb6730c95b4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4MXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
47
+ 'https://images.unsplash.com/photo-1633277194892-c5e2bba2d40f?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw3OHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
48
+ 'https://images.unsplash.com/photo-1633212752699-93d095d7727e?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
49
+ 'https://images.unsplash.com/photo-1633177031940-61beb547f15e?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4Nnx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
50
+ 'https://images.unsplash.com/photo-1633190206143-e618bc3c0e8b?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw5N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
51
+ 'https://images.unsplash.com/photo-1633186710895-309db2eca9e4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw5OHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
52
+ 'https://images.unsplash.com/photo-1531204420596-d4e8af13de95?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMTN8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
53
+ 'https://images.unsplash.com/photo-1633245091570-cd62f7f116a3?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMjd8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
54
+ 'https://images.unsplash.com/photo-1633247835403-f7fde396f4ab?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMzB8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
55
+ 'https://images.unsplash.com/photo-1633260676663-eb70faaa8805?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNDB8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60'
56
+ 'https://images.unsplash.com/photo-1633211387371-88c4838cbfb4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNDJ8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
57
+ 'https://images.unsplash.com/photo-1633267538438-2d49aeb844f7?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
58
+ 'https://images.unsplash.com/photo-1633172905740-2eb6730c95b4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4MXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
59
+ 'https://images.unsplash.com/photo-1633277194892-c5e2bba2d40f?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw3OHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
60
+ 'https://images.unsplash.com/photo-1633212752699-93d095d7727e?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
61
+ 'https://images.unsplash.com/photo-1633177031940-61beb547f15e?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4Nnx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
62
+ 'https://images.unsplash.com/photo-1633190206143-e618bc3c0e8b?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw5N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
63
+ 'https://images.unsplash.com/photo-1633186710895-309db2eca9e4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw5OHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
64
+ 'https://images.unsplash.com/photo-1531204420596-d4e8af13de95?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMTN8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
65
+ 'https://images.unsplash.com/photo-1633245091570-cd62f7f116a3?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMjd8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
66
+ 'https://images.unsplash.com/photo-1633247835403-f7fde396f4ab?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMzB8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
67
+ 'https://images.unsplash.com/photo-1633260676663-eb70faaa8805?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNDB8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60'
68
+ 'https://images.unsplash.com/photo-1633211387371-88c4838cbfb4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNDJ8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
69
+ 'https://images.unsplash.com/photo-1633177317976-3f9bc45e1d1d?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
70
+ 'https://images.unsplash.com/photo-1633113093730-47449a1a9c6e?ixid=MnwxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwxMXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
71
+ 'https://images.unsplash.com/photo-1633209942287-701d44019290?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw3N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
72
+ 'https://images.unsplash.com/photo-1633287387306-f08b4b3671c6?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
73
+ 'https://images.unsplash.com/photo-1633269540827-728aabbb7646?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw1OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
74
+ 'https://images.unsplash.com/photo-1633183601291-ec3ddf252825?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
75
+ 'https://images.unsplash.com/photo-1633267538438-2d49aeb844f7?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
76
+ 'https://images.unsplash.com/photo-1633172905740-2eb6730c95b4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4MXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
77
+ 'https://images.unsplash.com/photo-1633277194892-c5e2bba2d40f?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw3OHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
78
+ 'https://images.unsplash.com/photo-1633212752699-93d095d7727e?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4OXx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
79
+ 'https://images.unsplash.com/photo-1633177031940-61beb547f15e?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw4Nnx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
80
+ 'https://images.unsplash.com/photo-1633190206143-e618bc3c0e8b?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw5N3x8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
81
+ 'https://images.unsplash.com/photo-1633186710895-309db2eca9e4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw5OHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
82
+ 'https://images.unsplash.com/photo-1531204420596-d4e8af13de95?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMTN8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
83
+ 'https://images.unsplash.com/photo-1633245091570-cd62f7f116a3?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMjd8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
84
+ 'https://images.unsplash.com/photo-1633247835403-f7fde396f4ab?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMzB8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
85
+ 'https://images.unsplash.com/photo-1633260676663-eb70faaa8805?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNDB8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60'
86
+ 'https://images.unsplash.com/photo-1633211387371-88c4838cbfb4?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxNDJ8fHxlbnwwfHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' ,
87
+ ];
88
+
89
+ ScrollController _scrollController = ScrollController ();
90
+ int _currentIndex = 0 ;
91
+
92
+ @override
93
+ Widget build (BuildContext context) {
94
+ return Scaffold (
95
+ bottomNavigationBar: SalomonBottomBar (
96
+ currentIndex: _currentIndex,
97
+ margin: EdgeInsets .only (bottom: 30 , left: 20 , right: 20 , top: 10 ),
98
+ onTap: (index) {
99
+ setState (() {
100
+ _currentIndex = index;
101
+ });
102
+ },
103
+ items: [
104
+ SalomonBottomBarItem (
105
+ icon: Icon (Icons .home),
106
+ title: Text ("Home" ),
107
+ selectedColor: Colors .purple
108
+ ),
109
+ SalomonBottomBarItem (
110
+ icon: Icon (Icons .favorite_border),
111
+ title: Text ("Likes" ),
112
+ selectedColor: Colors .pink
113
+ ),
114
+ SalomonBottomBarItem (
115
+ icon: Icon (Icons .search),
116
+ title: Text ("Search" ),
117
+ selectedColor: Colors .orange
118
+ ),
119
+ SalomonBottomBarItem (
120
+ icon: Icon (Icons .person),
121
+ title: Text ("Profile" ),
122
+ selectedColor: Colors .teal
123
+ )
124
+ ],
125
+ ),
126
+ body: NestedScrollView (
127
+ headerSliverBuilder: (context, value) {
128
+ return [
129
+ SliverToBoxAdapter (
130
+ child: Padding (
131
+ padding: EdgeInsets .all (20.0 ),
132
+ child: Column (
133
+ children: [
134
+ SizedBox (height: 60 ,),
135
+ FadeInDown (
136
+ child: Row (
137
+ children: [
138
+ Text ("Discover \n Today's Posts 🔥" , style: TextStyle (fontSize: 32 , fontWeight: FontWeight .w600, color: Colors .grey.shade800, height: 1.5 ),)
139
+ ],
140
+ ),
141
+ ),
142
+ SizedBox (height: 20 ,),
143
+ FadeInDown (
144
+ delay: Duration (milliseconds: 400 ),
145
+ duration: Duration (milliseconds: 800 ),
146
+ child: Container (
147
+ height: 46 ,
148
+ decoration: BoxDecoration (
149
+ color: Colors .grey.shade200,
150
+ borderRadius: BorderRadius .circular (8 )
151
+ ),
152
+ child: TextField (
153
+ cursorColor: Colors .black,
154
+ decoration: InputDecoration (
155
+ prefixIcon: Icon (Icons .search, color: Colors .grey.shade700,),
156
+ border: InputBorder .none,
157
+ hintText: "Classic Style" ,
158
+ hintStyle: TextStyle (color: Colors .grey.shade500)
159
+ ),
160
+ ),
161
+ ),
162
+ )
163
+ ],
164
+ ),
165
+ ),
166
+ )
167
+ ];
168
+ },
169
+ body: DefaultTabController (
170
+ length: 4 ,
171
+ child: Column (
172
+ children: [
173
+ FadeInDown (
174
+ delay: Duration (milliseconds: 500 ),
175
+ child: Container (
176
+ child: TabBar (
177
+ labelColor: Colors .black,
178
+ unselectedLabelColor: Colors .grey.shade600,
179
+ indicatorColor: Colors .black,
180
+ tabs: [
181
+ Tab (text: "Popular" ,),
182
+ Tab (text: "New" ,),
183
+ Tab (text: "Classic" ,),
184
+ Tab (text: "Stylish" ,)
185
+ ]
186
+ )
187
+ ),
188
+ ),
189
+ Expanded (
190
+ child: TabBarView (children: [
191
+ StaggeredGridView .countBuilder (
192
+ padding: EdgeInsets .all (0 ),
193
+ crossAxisCount: 4 ,
194
+ controller: _scrollController,
195
+ itemCount: images.length,
196
+ itemBuilder: (context, index) {
197
+ return FadeInUp (
198
+ delay: Duration (milliseconds: index * 50 ),
199
+ duration: Duration (milliseconds: (index * 50 ) + 800 ),
200
+ child: Container (
201
+ color: Colors .black,
202
+ child: Image .network (
203
+ images[index],
204
+ fit: BoxFit .cover,
205
+ ),
206
+ ),
207
+ );
208
+ },
209
+ staggeredTileBuilder: (int index) =>
210
+ new StaggeredTile .count (2 , index.isEven ? 4 : 2 ),
211
+ mainAxisSpacing: 1.0 ,
212
+ crossAxisSpacing: 1.0 ,
213
+ ),
214
+ Center (),
215
+ Center (),
216
+ Center ()
217
+ ],),
218
+ )
219
+ ],
220
+ ),
221
+ )
222
+ )
223
+ );
224
+ }
225
+ }
0 commit comments