From 11b34e1d070286c468c60234a9ab9a6416b607aa Mon Sep 17 00:00:00 2001 From: jayesh Date: Wed, 15 May 2024 18:48:17 +0530 Subject: [PATCH] ui changes --- lib/view/MainScreen/HomeScreen.dart | 63 +++++++++++++++++------------ 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/lib/view/MainScreen/HomeScreen.dart b/lib/view/MainScreen/HomeScreen.dart index bd79c22..ca2ffb6 100644 --- a/lib/view/MainScreen/HomeScreen.dart +++ b/lib/view/MainScreen/HomeScreen.dart @@ -648,32 +648,45 @@ Widget cardcallWidget( Widget ProductWidget({ required String text, }) { - return Container( - padding: const EdgeInsets.only(left: 20), - width: 398, - height: 83, - decoration: ShapeDecoration( - gradient: const LinearGradient( - begin: Alignment(0.99, -0.14), - end: Alignment(-0.99, 0.14), - colors: [Color(0xFF1538C5), Color(0xFF0B2074), Color(0xFF000D41)], + ProductsController productsController = Get.put(ProductsController()); + return InkWell( + onTap: () { + mainController.selectedIndex.value == 1; + if (text == "Swing Trade") { + productsController.selectedIndex.value = 0; + } else if (text == "Options") { + productsController.selectedIndex.value = 2; + } else { + productsController.selectedIndex.value = 1; + } + }, + child: Container( + padding: const EdgeInsets.only(left: 20), + width: 398, + height: 83, + decoration: ShapeDecoration( + gradient: const LinearGradient( + begin: Alignment(0.99, -0.14), + end: Alignment(-0.99, 0.14), + colors: [Color(0xFF1538C5), Color(0xFF0B2074), Color(0xFF000D41)], + ), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + text18W600(text), + // Image.asset( + // "assets/images/png/swingImage.png", + // height: 83, + // ) + SvgPicture.asset(text == "Swing Trade" + ? "assets/images/svg/swing_image.svg" + : text == "Options" + ? "assets/images/svg/options_image.svg" + : "assets/images/svg/multibagger_image.svg") + ], ), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - text18W600(text), - // Image.asset( - // "assets/images/png/swingImage.png", - // height: 83, - // ) - SvgPicture.asset(text == "Swing Trade" - ? "assets/images/svg/swing_image.svg" - : text == "Options" - ? "assets/images/svg/options_image.svg" - : "assets/images/svg/multibagger_image.svg") - ], ), ); }