Skip to content

Commit bc09570

Browse files
Add featured category
1 parent c4fd662 commit bc09570

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

lib/consts/list.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ const slidersList = [imgSlider1, imgSlider2, imgSlider3, imgSlider4];
66

77
const secondSlidersList = [imgSs1, imgSs2, imgSs3, imgSs4];
88

9-
const featuredImagesList1 = [imgS1, imgS2, imgS3];
10-
const featuredImagesList2 = [imgS4, imgS5, imgS6];
9+
const featuredImagesList1 = [imgS1, imgFc1, imgFc2];
10+
const featuredImagesList2 = [imgFc3, imgFc4, imgFc5];
1111

12-
const featuredTitle1 = [womenDress, girlsDress, girlsWatched];
13-
const featuredTitle2 = [boysGlasses, mobilePhone, tShirts];
12+
const featuredTitle1 = [womenClothing, menClothing, computer];
13+
const featuredTitle2 = [autoMobile, kidToys, sports];
1414

1515
const categoryList = [
1616
womenClothing,

lib/consts/strings.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const updated = "Updated";
2020
const typeMessage = "Type a message...";
2121
const orderPlaced = "Order placed";
2222
const allProducts = "All Products";
23+
const menClothing = "Men Clothing";
24+
const computer = "Computer";
2325

2426
const createNewAccount = "or, create new account";
2527
const loginWith = "Log in with";

lib/views/home_screen_view/components/featured_button.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import 'package:emart/consts/consts.dart';
2+
import 'package:emart/views/category_screen_view/category_details.dart';
3+
import 'package:get/get.dart';
24

35
Widget featuredButton({String? title, icon}) {
46
return Row(
@@ -9,11 +11,14 @@ Widget featuredButton({String? title, icon}) {
911
],
1012
)
1113
.box
12-
.width(200)
14+
.width(200).height(90)
1315
.margin(const EdgeInsets.symmetric(horizontal: 4))
1416
.padding(const EdgeInsets.all(4))
1517
.white
1618
.roundedSM
1719
.outerShadowSm
18-
.make();
20+
.make()
21+
.onTap(() {
22+
Get.to(() => CategoryDetails(title: title));
23+
});
1924
}

0 commit comments

Comments
 (0)