@@ -176,35 +176,33 @@ class FlutterFavorites extends StatelessWidget {
176176 ],
177177 ),
178178 ),
179- Padding (padding: EdgeInsets .only (bottom: 12 )),
180- Align (
179+ Padding (padding: EdgeInsets .only (bottom: 10 )),
180+ ResponsiveGridView .builder (
181+ gridDelegate: ResponsiveGridDelegate (
182+ crossAxisExtent: 260 ,
183+ mainAxisSpacing: 16 ,
184+ crossAxisSpacing: 16 ,
185+ childAspectRatio: 1.37 ),
186+ maxRowCount: 1 ,
187+ itemCount: 4 ,
188+ shrinkWrap: true ,
189+ padding: EdgeInsets .fromLTRB (4 , 8 , 0 , 8 ),
181190 alignment: Alignment .center,
182- child: ResponsiveGridView .builder (
183- gridDelegate: ResponsiveGridDelegate (
184- crossAxisExtent: 260 ,
185- mainAxisSpacing: 16 ,
186- crossAxisSpacing: 16 ,
187- childAspectRatio: 1.37 ),
188- maxRowCount: 1 ,
189- itemCount: 10 ,
190- shrinkWrap: true ,
191- padding: EdgeInsets .fromLTRB (4 , 8 , 0 , 8 ),
192- alignment: Alignment .center,
193- itemBuilder: (context, index) {
194- return PackageCard ();
195- },
196- ),
191+ itemBuilder: (context, index) {
192+ return PackageCard ();
193+ },
197194 ),
198195 Align (
199- alignment: Alignment .centerRight,
200- child: Padding (
201- padding: EdgeInsets .only (right: 16 ),
202- child: Text ('VIEW ALL' ,
203- style: TextStyle (
204- color: linkColor,
205- fontSize: 16 ,
206- fontWeight: FontWeight .bold)),
207- )),
196+ alignment: Alignment .centerRight,
197+ child: Padding (
198+ padding: EdgeInsets .only (right: 16 ),
199+ child: Text ('VIEW ALL' ,
200+ style: TextStyle (
201+ color: linkColor,
202+ fontSize: 16 ,
203+ fontWeight: FontWeight .bold)),
204+ ),
205+ ),
208206 ],
209207 ),
210208 ),
@@ -213,6 +211,66 @@ class FlutterFavorites extends StatelessWidget {
213211 }
214212}
215213
214+ class MostPopular extends StatelessWidget {
215+ @override
216+ Widget build (BuildContext context) {
217+ return Row (
218+ mainAxisSize: MainAxisSize .min,
219+ children: [
220+ Flexible (
221+ child: ConstrainedBox (
222+ constraints: BoxConstraints (maxHeight: 240 ),
223+ child: Image .asset ('assets/images/image_packages_1.png' ,
224+ fit: BoxFit .contain),
225+ ),
226+ ),
227+ Column (
228+ mainAxisSize: MainAxisSize .min,
229+ crossAxisAlignment: CrossAxisAlignment .start,
230+ mainAxisAlignment: MainAxisAlignment .center,
231+ children: [
232+ Padding (padding: EdgeInsets .only (bottom: 24 )),
233+ Text ('Most popular packages' , style: titleTextStyle),
234+ Text ('The most downloaded packages over the past 60 days' ,
235+ style: TextStyle (
236+ color: textPrimaryColor, fontSize: 18 , height: 1.6 )),
237+ Padding (padding: EdgeInsets .only (bottom: 10 )),
238+ Container (
239+ constraints: BoxConstraints (maxWidth: 834 ),
240+ child: ResponsiveGridView .builder (
241+ gridDelegate: ResponsiveGridDelegate (
242+ crossAxisExtent: 260 ,
243+ mainAxisSpacing: 16 ,
244+ crossAxisSpacing: 16 ,
245+ childAspectRatio: 1.37 ),
246+ maxRowCount: 2 ,
247+ itemCount: 6 ,
248+ shrinkWrap: true ,
249+ padding: EdgeInsets .fromLTRB (4 , 8 , 0 , 16 ),
250+ alignment: Alignment .center,
251+ itemBuilder: (context, index) {
252+ return PackageCard ();
253+ },
254+ ),
255+ ),
256+ Align (
257+ alignment: Alignment .centerRight,
258+ child: Padding (
259+ padding: EdgeInsets .only (right: 16 ),
260+ child: Text ('VIEW ALL' ,
261+ style: TextStyle (
262+ color: linkColor,
263+ fontSize: 16 ,
264+ fontWeight: FontWeight .bold)),
265+ ),
266+ ),
267+ ],
268+ )
269+ ],
270+ );
271+ }
272+ }
273+
216274class PackageCard extends StatelessWidget {
217275 @override
218276 Widget build (BuildContext context) {
0 commit comments