diff --git a/assets/translations/en.json b/assets/translations/en.json index 3efe196..edebe12 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -155,6 +155,11 @@ "takeAway": "TakeAway", "seeAll": "See All", "bestServingFood": "Best Servings Food", - "outCategories": "Our Categories" + "outCategories": "Our Categories", + "saveUpTo50Perc": "Save Up to 50% Off", + "stories": "Stories", + "bestFoodStories": "Best Food Stories Ever", + "error": "Error", + "couldNotLaunch": "Could not launch" } \ No newline at end of file diff --git a/lib/constant/const_texts.dart b/lib/constant/const_texts.dart index a1047a1..54dce03 100644 --- a/lib/constant/const_texts.dart +++ b/lib/constant/const_texts.dart @@ -155,10 +155,11 @@ class ConstTexts { static String seeAll = "seeAll"; static String bestServingFood = "bestServingFood"; static String ourCategories = "outCategories"; - // static String ok = "ok"; - // static String freeDelivery = "freeDelivery"; - // static String upto = "upto"; + static String saveUpTo50Perc = "saveUpTo50Perc"; + static String error = "error"; + static String bestFoodStories = "bestFoodStories"; static String doYouWantChangeTheDeliverOption = "doYouWantChangeTheDeliverOption"; - // static String cash = "cash"; + static String stories = "stories"; + static String couldNotLaunch = "couldNotLaunch"; } diff --git a/lib/screen_ui/multi_vendor_service/home_screen/home_screen.dart b/lib/screen_ui/multi_vendor_service/home_screen/home_screen.dart index 0151eb8..4c431c2 100644 --- a/lib/screen_ui/multi_vendor_service/home_screen/home_screen.dart +++ b/lib/screen_ui/multi_vendor_service/home_screen/home_screen.dart @@ -1226,9 +1226,7 @@ class HomeScreen extends StatelessWidget { value: controller.selectedOrderTypeValue.value, icon: const Icon(Icons.keyboard_arrow_down), items: - ["delivery", "takeaway"].map(( - String value, - ) { + ["delivery", "takeaway"].map((String value) { return DropdownMenuItem( value: value, child: Text( @@ -1390,7 +1388,7 @@ class PopularRestaurant extends StatelessWidget { begin: const Alignment(-0.00, -1.00), end: const Alignment(0, 1), colors: [ - Colors.black.withOpacity(0), + Colors.black.withValues(alpha: 0), const Color(0xFF111827), ], ), @@ -1997,7 +1995,7 @@ class NewArrival extends StatelessWidget { begin: const Alignment(0.00, 1.00), end: const Alignment(0, -1), colors: [ - Colors.black.withOpacity(0), + Colors.black.withValues(alpha: 0), AppThemeData.grey900, ], ), @@ -2220,7 +2218,7 @@ class AdvertisementHomeCard extends StatelessWidget { borderRadius: BorderRadius.circular(16), boxShadow: [ BoxShadow( - color: Colors.black.withOpacity(0.1), + color: Colors.black.withValues(alpha: 0.1), blurRadius: isDark ? 6 : 2, spreadRadius: 0, offset: Offset(0, isDark ? 3 : 1), @@ -2697,7 +2695,7 @@ class BannerView extends StatelessWidget { if (await canLaunchUrl(uri)) { await launchUrl(uri); } else { - ShowToastDialog.showToast("Could not launch".tr); + ShowToastDialog.showToast(ConstTexts.couldNotLaunch.tr); } } }, @@ -2969,7 +2967,7 @@ class StoryView extends StatelessWidget { height: Responsive.height(100, context), width: Responsive.width(100, context), ), - Container(color: Colors.black.withOpacity(0.30)), + Container(color: Colors.black.withValues(alpha: 0.30)), Padding( padding: const EdgeInsets.symmetric( horizontal: 5, @@ -2987,7 +2985,7 @@ class StoryView extends StatelessWidget { if (snapshot.hasError) { return Center( child: Text( - '${"Error".tr}: ${snapshot.error}', + '${ConstTexts.error.tr}: ${snapshot.error}', ), ); } else if (snapshot.data == null) { diff --git a/lib/screen_ui/multi_vendor_service/home_screen/home_screen_two.dart b/lib/screen_ui/multi_vendor_service/home_screen/home_screen_two.dart index fd2816d..1d427cb 100644 --- a/lib/screen_ui/multi_vendor_service/home_screen/home_screen_two.dart +++ b/lib/screen_ui/multi_vendor_service/home_screen/home_screen_two.dart @@ -1058,7 +1058,7 @@ class OfferView extends StatelessWidget { ], ), GradientText( - 'Save Upto 50% Off'.tr, + ConstTexts.saveUpTo50Perc.tr, style: TextStyle( fontSize: 24, fontFamily: 'Inter Tight', @@ -1116,7 +1116,7 @@ class OfferView extends StatelessWidget { begin: const Alignment(-0.00, -1.00), end: const Alignment(0, 1), colors: [ - Colors.black.withOpacity(0), + Colors.black.withValues(alpha: 0), AppThemeData.grey900, ], ), @@ -1286,7 +1286,7 @@ class StoryView extends StatelessWidget { children: [ Expanded( child: Text( - "Stories".tr, + ConstTexts.stories.tr, style: TextStyle( fontFamily: AppThemeData.semiBold, color: @@ -1300,7 +1300,7 @@ class StoryView extends StatelessWidget { ], ), GradientText( - 'Best Food Stories Ever'.tr, + ConstTexts.bestFoodStories.tr, style: TextStyle( fontSize: 24, fontFamily: 'Inter Tight', @@ -1350,7 +1350,7 @@ class StoryView extends StatelessWidget { height: Responsive.height(100, context), width: Responsive.width(100, context), ), - Container(color: Colors.black.withOpacity(0.30)), + Container(color: Colors.black.withValues(alpha: 0.30)), Padding( padding: const EdgeInsets.symmetric( horizontal: 5, @@ -1368,7 +1368,7 @@ class StoryView extends StatelessWidget { if (snapshot.hasError) { return Center( child: Text( - '${"Error".tr}: ${snapshot.error}', + '${ConstTexts.error.tr}: ${snapshot.error}', ), ); } else if (snapshot.data == null) {