BASE: Implement Localization In Home Screen.
This commit is contained in:
@@ -80,26 +80,118 @@ class ServiceListScreen extends StatelessWidget {
|
||||
SizedBox(height: 10.h),
|
||||
|
||||
// Other Services Section
|
||||
_otherServicesCardMaker(
|
||||
image: "assets/images/garderob_img.png",
|
||||
title: ConstTexts.updateYourWardrobe.tr,
|
||||
subtitle: ConstTexts.weDeliverSafely.tr,
|
||||
),
|
||||
_otherServicesCardMaker(
|
||||
image: "assets/images/keys_img.png",
|
||||
title: ConstTexts.rent.tr,
|
||||
subtitle: ConstTexts.hugeSelectionOfAds.tr,
|
||||
),
|
||||
_otherServicesCardMaker(
|
||||
image: "assets/images/cosmetics_img.png",
|
||||
title: ConstTexts.cosmetics.tr,
|
||||
subtitle: ConstTexts.moreThan1000Products.tr,
|
||||
),
|
||||
_otherServicesCardMaker(
|
||||
image: "assets/images/products_img.png",
|
||||
title: ConstTexts.foodProducts.tr,
|
||||
subtitle: ConstTexts.moreThan1000Products.tr,
|
||||
),
|
||||
controller.sectionList.firstWhereOrNull(
|
||||
(element) =>
|
||||
element.serviceTypeFlag ==
|
||||
"ondemand-service",
|
||||
) ==
|
||||
null
|
||||
? SizedBox.shrink()
|
||||
: _otherServicesCardMaker(
|
||||
image: "assets/images/garderob_img.png",
|
||||
title: ConstTexts.updateYourWardrobe.tr,
|
||||
subtitle: ConstTexts.weDeliverSafely.tr,
|
||||
onTap: () {
|
||||
SectionModel? innerSectionModel = controller
|
||||
.sectionList
|
||||
.firstWhereOrNull(
|
||||
(element) =>
|
||||
element.serviceTypeFlag ==
|
||||
"ondemand-service",
|
||||
);
|
||||
|
||||
if (innerSectionModel != null) {
|
||||
controller.onServiceTap(
|
||||
context,
|
||||
innerSectionModel,
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
controller.sectionList.firstWhereOrNull(
|
||||
(element) =>
|
||||
element.serviceTypeFlag ==
|
||||
"rental-service",
|
||||
) ==
|
||||
null
|
||||
? SizedBox.shrink()
|
||||
: _otherServicesCardMaker(
|
||||
image: "assets/images/keys_img.png",
|
||||
title: ConstTexts.rent.tr,
|
||||
subtitle: ConstTexts.hugeSelectionOfAds.tr,
|
||||
onTap: () {
|
||||
SectionModel? innerSectionModel = controller
|
||||
.sectionList
|
||||
.firstWhereOrNull(
|
||||
(element) =>
|
||||
element.serviceTypeFlag ==
|
||||
"rental-service",
|
||||
);
|
||||
|
||||
if (innerSectionModel != null) {
|
||||
controller.onServiceTap(
|
||||
context,
|
||||
innerSectionModel,
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
controller.sectionList.firstWhereOrNull(
|
||||
(element) =>
|
||||
element.serviceTypeFlag ==
|
||||
"ecommerce-service",
|
||||
) ==
|
||||
null
|
||||
? SizedBox.shrink()
|
||||
: _otherServicesCardMaker(
|
||||
image: "assets/images/cosmetics_img.png",
|
||||
title: ConstTexts.cosmetics.tr,
|
||||
subtitle: ConstTexts.moreThan1000Products.tr,
|
||||
onTap: () {
|
||||
SectionModel? innerSectionModel = controller
|
||||
.sectionList
|
||||
.firstWhereOrNull(
|
||||
(element) =>
|
||||
element.serviceTypeFlag ==
|
||||
"ecommerce-service",
|
||||
);
|
||||
|
||||
if (innerSectionModel != null) {
|
||||
controller.onServiceTap(
|
||||
context,
|
||||
innerSectionModel,
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
controller.sectionList.firstWhereOrNull(
|
||||
(element) =>
|
||||
element.serviceTypeFlag ==
|
||||
"ondemand-service",
|
||||
) ==
|
||||
null
|
||||
? SizedBox.shrink()
|
||||
: _otherServicesCardMaker(
|
||||
image: "assets/images/products_img.png",
|
||||
title: ConstTexts.foodProducts.tr,
|
||||
subtitle: ConstTexts.moreThan1000Products.tr,
|
||||
onTap: () {
|
||||
SectionModel? innerSectionModel = controller
|
||||
.sectionList
|
||||
.firstWhereOrNull(
|
||||
(element) =>
|
||||
element.serviceTypeFlag ==
|
||||
"ondemand-service",
|
||||
);
|
||||
|
||||
if (innerSectionModel != null) {
|
||||
controller.onServiceTap(
|
||||
context,
|
||||
innerSectionModel,
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
SizedBox(height: 45.h),
|
||||
],
|
||||
),
|
||||
@@ -113,11 +205,10 @@ class ServiceListScreen extends StatelessWidget {
|
||||
required String image,
|
||||
required String title,
|
||||
required String subtitle,
|
||||
required VoidCallback onTap,
|
||||
}) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
log("Other Service Card Tapped: $title");
|
||||
},
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.symmetric(horizontal: 16.r).copyWith(bottom: 10.r),
|
||||
|
||||
Reference in New Issue
Block a user