From d0f027204fa867c77f238abf267f4e8df105322d Mon Sep 17 00:00:00 2001 From: jayesh Date: Tue, 14 May 2024 18:47:05 +0530 Subject: [PATCH] home screen new ui --- assets/images/png/swingImage.png | Bin 0 -> 4956 bytes assets/images/svg/card_decoration.svg | 17 + assets/images/svg/multibagger_image.svg | 21 + assets/images/svg/options_image.svg | 21 + assets/images/svg/swing_image.svg | 20 + lib/Utils/text.dart | 28 +- lib/view/MainScreen/HomeScreen.dart | 455 ++++++++++-------- lib/view/MainScreen/ShortTrade.dart | 279 +++++------ .../Sidemenu/ContentByte/ContentBytes.dart | 236 ++++----- lib/view/Sidemenu/FaqScreen.dart | 4 +- lib/view/login/VerifyOtp.dart | 1 - 11 files changed, 619 insertions(+), 463 deletions(-) create mode 100644 assets/images/png/swingImage.png create mode 100644 assets/images/svg/card_decoration.svg create mode 100644 assets/images/svg/multibagger_image.svg create mode 100644 assets/images/svg/options_image.svg create mode 100644 assets/images/svg/swing_image.svg diff --git a/assets/images/png/swingImage.png b/assets/images/png/swingImage.png new file mode 100644 index 0000000000000000000000000000000000000000..a63a7534d84a0c0c07eab4bd43af47abf127cfa1 GIT binary patch literal 4956 zcmV-i6Qk^jP)i00009a7bBm000XU z000XU0RWnu7ytkO0drDELIAGL9O(c600d`2O+f$vv5yP zQnqpS$l^uDB(+tBO|8j>kU$b_2*fyrBnW{>B$4qA*dE=|%xF6A`=@)A)zRWgoW~qyzgMbV_93ZJVMKhB&mrcX(7K;%}bqO zt!`eT3Mo+@)s9hxx@Cph6J^v+FE>ZYL#U)FQI{kyGA{#?Bqb>i2npm8kc;>r_G!ZzDhnoQD}4GwWb#9 zbrhtha`h#Mk+88oq7jHR$m@?%jtB{q4Xkk@F?lV2Q|qLZzVQ#Nm6DWf8GWsJ_qeym z>zrYy5k-wylgNX#781w;MT^>&OOm|Jcj6eJuue*hCT~GnGt)Wb66&_F#Cba-hbzY}eV%U(@97nT|KzgvwiNvMWLL<&NWJqf{Z#G4w3UZj% zLIMG*&XF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mJ`D@n?3=FSgB4xceA||lOlN&uFlf#H} zjzIPTR%y*FEAe~aOH3mWKB({?e4QGnO&n7X8VBrHtb2GIWjB5GKk8rD|MoXy@%UHl zeir>TsiY?LSX#q`s^VysnN$$MO6(*4FMBBo!tj#494F5l|ygJGHgEU4x zgFeca5vk>KY~S*S=5w!jp#JpPo^?Yb@qZ-0V5qFT_SDQ^Ww#hlY<1mIem-bc#^=pR zcH%ARguN}t*~Y$enl*6gRo`kj+t+uk9V5~;vXtZo&FD#{uxs1sNR0KdU!44LD4XfI4JPi9AI-^sis4_$lo*qIwRDqX{+M-$}&NnC8S!{MZ^bf$1?thyZ&b>Gu@ zIgONRrf!2Te^cN8>z~|@lgD$5!fskKoXoC{Ll;a2wf#7r52SiVAV=IR zq8M^&UP^LZ_#GEn6p#C64vt47bwa;Sr-D7lW5}4+yh!0X{W_x00B$Fgof8TCXoZ*@ zhdu&mrkC$Vquhx?@NeK$Mal7<3TVjr_n8QMZR}pYy-uI;BxR@Zv1b<-%L|EKD{Gpxy7n>kEBpDO}tbmr^H}**ck^5p7g` zp2&0(c=D?ZHH6E$9jE_9{=*j+JHY)>zWlimAwq-*5h6s05FtW@2oWMgh!7z{ga{F$ a@bFjA*NUpoYRhu~0000 + + + + + + + + + + + + + + + + diff --git a/assets/images/svg/multibagger_image.svg b/assets/images/svg/multibagger_image.svg new file mode 100644 index 0000000..3493ff6 --- /dev/null +++ b/assets/images/svg/multibagger_image.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/svg/options_image.svg b/assets/images/svg/options_image.svg new file mode 100644 index 0000000..d5ac45d --- /dev/null +++ b/assets/images/svg/options_image.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/svg/swing_image.svg b/assets/images/svg/swing_image.svg new file mode 100644 index 0000000..5fa653b --- /dev/null +++ b/assets/images/svg/swing_image.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/lib/Utils/text.dart b/lib/Utils/text.dart index 6c806f3..93479f2 100644 --- a/lib/Utils/text.dart +++ b/lib/Utils/text.dart @@ -230,6 +230,17 @@ Widget text22W600(String text) { ); } +Widget text20W600(String text) { + return Text( + text, + style: TextStyle( + fontSize: 20.sp, + color: Colors.white, + fontWeight: FontWeight.w600, + fontFamily: 'hiragino'), + ); +} + Widget text22W600manrope(String text) { return Text( text, @@ -252,6 +263,17 @@ Widget text25W600(String text) { ); } +Widget text25W800(String text) { + return Text( + text, + style: TextStyle( + fontSize: 25.sp, + color: Colors.white, + fontWeight: FontWeight.w800, + fontFamily: 'hiragino'), + ); +} + Widget text22W500(String text) { return Text( text, @@ -296,12 +318,12 @@ Widget text14W400(String text) { ); } -Widget text14W500(String text) { +Widget text14W500(String text, {Color? clr}) { return Text( text, style: TextStyle( fontSize: 14.sp, - color: Colors.white, + color: clr ?? Colors.white, fontWeight: FontWeight.w500, fontFamily: 'hiragino'), ); @@ -335,7 +357,7 @@ Widget text14W400_979797(String text) { text, style: TextStyle( fontSize: 14.sp, - color: Color(0xFF979797), + color: Color(0xFFE9E9E9), fontWeight: FontWeight.w400, fontFamily: 'hiragino'), ); diff --git a/lib/view/MainScreen/HomeScreen.dart b/lib/view/MainScreen/HomeScreen.dart index ec4d9a3..bfeae22 100644 --- a/lib/view/MainScreen/HomeScreen.dart +++ b/lib/view/MainScreen/HomeScreen.dart @@ -1,8 +1,10 @@ // import 'package:flutter/material.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/svg.dart'; +import 'package:gap/gap.dart'; import 'package:get/get.dart'; import 'package:glassmorphism/glassmorphism.dart'; import 'package:traderscircuit/Utils/Common/CommonBottomNavigation.dart'; @@ -22,6 +24,7 @@ import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart'; import 'package:traderscircuit/view/onBoarding/splashScreen1.dart'; import 'package:traderscircuit/view_model/HomeApi/home_api.dart'; +import '../../Utils/Common/CustomTextFormField.dart'; import '../../view_model/ProfileAPI/GetProfileApi.dart'; class HomeScreen extends StatefulWidget { @@ -105,12 +108,27 @@ class _HomeScreenState extends State { padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16), child: isApiCalling.value - ? Center( - child: CircularProgressIndicator( color: Color(0xFF0093FF),), + ? const Center( + child: CircularProgressIndicator( + color: Color(0xFF0093FF), + ), ) : ListView( physics: const BouncingScrollPhysics(), children: [ + sizedBoxHeight(15.h), + CustomTextFormField1( + hintText: 'Search', + leadingIcon: SizedBox( + height: 20, + width: 20, + child: Center( + child: SvgPicture.asset( + 'assets/images/svg/search-svgrepo-com.svg', + ), + ), + ), + ), sizedBoxHeight(20.h), Text( "Welcome $userName", @@ -149,25 +167,19 @@ class _HomeScreenState extends State { text22W500('View our products'), sizedBoxHeight(30.h), SizedBox( - height: 210, - child: GridView.builder( + height: 280, + child: ListView.builder( physics: const NeverScrollableScrollPhysics(), - gridDelegate: - const SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: - 2, // number of items in each row - mainAxisSpacing: 8.0, // spacing between rows - crossAxisSpacing: - 8.0, // spacing between columns - childAspectRatio: 2.2, - ), itemCount: homeModel.data!.products!.length, itemBuilder: (context, index) { - return ProductWidget( + return Container( + margin: const EdgeInsets.only(bottom: 12), + child: ProductWidget( text: homeModel.data!.products! .elementAt(index) .title!, - subtext: "recommendation"); + ), + ); }, ), ), @@ -188,54 +200,107 @@ class _HomeScreenState extends State { color: const Color(0xFF3A3A3A), ), sizedBoxHeight(25.h), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - text22W600('Explore The Unseen'), - GestureDetector( - onTap: () { - Get.toNamed(RouteName.exploreUnseen); - }, - child: Container( - height: 35.h, - width: 105.w, - decoration: BoxDecoration( - color: const Color(0xFF0093FF), - // .withOpacity(0.6), - borderRadius: - BorderRadius.circular(5.r), - border: Border.all( - color: const Color(0xFF3A3A3A), - )), - child: - Center(child: text16W500('View More')), + text25W800('Explore The Unseen'), + sizedBoxHeight(10.h), + Container( + padding: const EdgeInsets.all(8), + width: 398, + height: 55, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: const Alignment(1.00, 0.02), + end: const Alignment(-1, -0.02), + colors: [ + Colors.white + .withOpacity(0.09000000357627869), + Colors.white + .withOpacity(0.0925697460770607), + Colors.white + .withOpacity(0.10999999940395355) + ], + ), + shape: RoundedRectangleBorder( + side: const BorderSide( + width: 1, color: Color(0x994A73FB)), + borderRadius: BorderRadius.circular(8), + ), + ), + child: Container( + width: 382, + height: 40, + decoration: ShapeDecoration( + color: const Color(0xFF00C236), + shape: RoundedRectangleBorder( + side: const BorderSide(width: 0.80), + borderRadius: BorderRadius.circular(5), ), ), - ], - ), - sizedBoxHeight(35.h), - DefaultTabController( - length: 2, - child: Column( - children: [ - MyTabBar(), - SizedBox( - height: 250.h, - child: TabBarView( - children: [ - ActiveCallsTab(), - ExitedCallsTab(), - ], - ), - ), - ], + child: Center( + child: text18W500("Long Term"), + ), ), ), + sizedBoxHeight(25.h), + // DefaultTabController( + // length: 2, + // child: Column( + // children: [ + // MyTabBar(), + // SizedBox( + // height: 250.h, + // child: TabBarView( + // children: [ + // ActiveCallsTab(), + // ExitedCallsTab(), + // ], + // ), + // ), + // ], + // ), + // ), + cardcallWidget( + action: homeModel + .data! + .exploreTheUnseenActiveCalls! + .first + .recommendationActionsXid == + 1 + ? "Buy" + : homeModel + .data! + .exploreTheUnseenActiveCalls! + .first + .recommendationActionsXid == + 2 + ? "Sell" + : homeModel + .data! + .exploreTheUnseenActiveCalls! + .first + .recommendationActionsXid == + 3 + ? "Hold" + : homeModel + .data! + .exploreTheUnseenActiveCalls! + .first + .recommendationActionsXid == + 4 + ? "Exit" + : "", + text: homeModel + .data! + .exploreTheUnseenActiveCalls! + .first + .stockName!, + amount: + "₹ ${homeModel.data!.exploreTheUnseenActiveCalls!.first.buyPrice!}", + pdfname: 'Download Pdf'), + sizedBoxHeight(25.h), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - text22W600('Content Bytes'), + text20W600('Content Bytes'), sizedBoxHeight(8.w), Row( mainAxisAlignment: MainAxisAlignment.end, @@ -472,147 +537,138 @@ Widget cardcallWidget( required String amount, required String pdfname, required String action}) { - return commonGlassContainer( - width: double.infinity, - height: 176.h, - borderradius: 8, - customWidget: Column( + return Container( + width: 398, + height: 251, + decoration: ShapeDecoration( + color: const Color(0x232C79ED), + shape: RoundedRectangleBorder( + side: const BorderSide(width: 1, color: Color(0x994A73FB)), + borderRadius: BorderRadius.circular(8), + ), + ), + child: Stack( children: [ - Padding( - padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w), - child: Row( - children: [ - GlassmorphicContainer( - width: 47.w, - height: 47.h, - borderRadius: 100, - blur: 10, - alignment: Alignment.center, - border: 0.9, - linearGradient: const LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color(0xff3A3A3A), - Color(0xFF3A3A3A), - ], - ), - borderGradient: const LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color.fromRGBO(70, 5, 1, 0.8), - Color.fromRGBO(102, 102, 102, 0.8), - ], - ), - child: Center( - child: - Image.asset('assets/images/png/square_TRIDENT_com 1.png'), - ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + text16W700(text), + Container( + width: 75.w, + height: 30.h, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15.r), + color: action == "Buy" + ? Colors.green + : action == "Sell" + ? Colors.red + : action == "Hold" + ? const Color(0xFFFFAD31) + : Colors.white, + ), + child: Center(child: text14W500(action, clr: Colors.black)), + ) + ], ), - sizedBoxWidth(15.w), - text18W600(text), - const Spacer(), - Container( - width: 62.w, - height: 25.h, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4.r), - color: action == "Buy" - ? Colors.green - : action == "Sell" - ? Colors.red - : action == "Hold" - ? const Color(0xFFFFAD31) - : Colors.white, - ), - child: Center(child: text16W400_1B1B1B(action)), - ) - ], - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: const Color(0xFF3A3A3A), - ), - Padding( - padding: const EdgeInsets.all(20), - child: Row( - children: [ - Column( + ), + Padding( + padding: const EdgeInsets.all(20), + child: Column( crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, children: [ text14W400_979797('Initial Entry Price'), sizedBoxHeight(5.h), - text15W600(amount) + text15W600(amount), + sizedBoxHeight(30.w), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + width: 150, + height: 52, + decoration: ShapeDecoration( + color: const Color(0x332C79ED), + shape: RoundedRectangleBorder( + side: const BorderSide( + width: 1, color: Color(0x994A73FB)), + borderRadius: BorderRadius.circular(8), + ), + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // SvgPicture.asset('assets/images/svg/pdfsvg.svg'), + Image.asset( + 'assets/images/png/pdf.png', + height: 20.h, + width: 20.w, + ), + const Gap(5), + text15W600(pdfname), + ], + ), + ), + Container( + height: 52, + width: 150, + decoration: ShapeDecoration( + color: const Color(0xFF0093FF), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8)), + ), + child: Center(child: text15W600("View More")), + ) + ], + ), ], ), - // sizedBoxWidth(50.w), - const Spacer(), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - text14W400_979797('Report'), - sizedBoxHeight(5.h), - Row( - children: [ - // SvgPicture.asset('assets/images/svg/pdfsvg.svg'), - Image.asset( - 'assets/images/png/pdf.png', - height: 20.h, - width: 20.w, - ), - text15W600(pdfname), - ], - ) - ], - ) - ], - ), - ) + ) + ], + ), + Positioned( + right: 0, + child: SvgPicture.asset("assets/images/svg/card_decoration.svg")) ], ), ); } -Widget ProductWidget({required String text, required String subtext}) { - return GlassmorphicContainer( - width: 175.w, - height: 83.h, - borderRadius: 8, - blur: 10, - alignment: Alignment.center, - border: 0.8, - linearGradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color(0xFF2D7AEE).withOpacity(0.14), - const Color(0xFF2D7AEE).withOpacity(0.14), - ], - stops: [ - 0.1, - 1, - ]), - borderGradient: const LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color(0xff0F2C53), - Color(0xFF0F2C53), - ], - ), - child: Padding( - padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w), - child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - children: [ - text18W600(text), - sizedBoxWidth(8.w), - text14W400_979797(subtext), - ], +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)], ), + 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") + ], ), ); } @@ -622,31 +678,14 @@ Widget commoncontainer( required String amount, required String rate, required double width}) { - return GlassmorphicContainer( - width: width, - height: 83.h, - borderRadius: 8, - blur: 10, - alignment: Alignment.center, - border: 0.8, - linearGradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color(0xFF2D7AEE).withOpacity(0.14), - const Color(0xFF2D7AEE).withOpacity(0.14), - ], - stops: [ - 0.1, - 1, - ]), - borderGradient: const LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color(0xff0F2C53), - Color(0xFF0F2C53), - ], + return Container( + height: 83, + decoration: ShapeDecoration( + color: const Color(0xFF0F2C53), + shape: RoundedRectangleBorder( + side: const BorderSide(width: 1, color: Color(0x7F4A73FB)), + borderRadius: BorderRadius.circular(8), + ), ), child: Padding( padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w), diff --git a/lib/view/MainScreen/ShortTrade.dart b/lib/view/MainScreen/ShortTrade.dart index db0544c..dc19670 100644 --- a/lib/view/MainScreen/ShortTrade.dart +++ b/lib/view/MainScreen/ShortTrade.dart @@ -148,7 +148,7 @@ class _ShortTradeState extends State { productsController.isLoaded.value ? const Center( child: CircularProgressIndicator( - color: Color(0xFF0093FF), + color: Color(0xFF0093FF), ), ) : DefaultTabController( @@ -814,150 +814,153 @@ class _ShortTradeState extends State { required String pdfLink, required String action, }) { - return commonGlassContainer( - width: double.infinity, - height: action != "Exit" ? 250.h : 300.h, - borderradius: 8, - customWidget: Column( - children: [ - Padding( - padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w), - child: Row( - children: [ - GlassmorphicContainer( - width: 47.w, - height: 47.h, - borderRadius: 100, - blur: 10, - alignment: Alignment.center, - border: 0.9, - linearGradient: const LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color(0xff3A3A3A), - Color(0xFF3A3A3A), - ], + return InkWell( + child: commonGlassContainer( + width: double.infinity, + height: action != "Exit" ? 250.h : 300.h, + borderradius: 8, + customWidget: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w), + child: Row( + children: [ + GlassmorphicContainer( + width: 47.w, + height: 47.h, + borderRadius: 100, + blur: 10, + alignment: Alignment.center, + border: 0.9, + linearGradient: const LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff3A3A3A), + Color(0xFF3A3A3A), + ], + ), + borderGradient: const LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color.fromRGBO(70, 5, 1, 0.8), + Color.fromRGBO(102, 102, 102, 0.8), + ], + ), + child: Center( + child: CachedNetworkImage(imageUrl: image), + ), ), - borderGradient: const LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color.fromRGBO(70, 5, 1, 0.8), - Color.fromRGBO(102, 102, 102, 0.8), - ], - ), - child: Center( - child: CachedNetworkImage(imageUrl: image), - ), - ), - sizedBoxWidth(15.w), - SizedBox(width: 200.w, child: text18W600(text)), - const Spacer(), - Container( - width: 62.w, - height: 25.h, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4.r), - color: action == "Buy" - ? const Color(0xFF00FF19) - : action == "Exit" - ? const Color(0Xff6C0000) - : const Color(0xFFFFAD31), - ), - child: Center( - child: text14W600_1B1B1B( - action, - clr: action == "Exit" - ? Colors.white - : const Color(0Xff1B1B1B), - )), - ) - ], + sizedBoxWidth(15.w), + SizedBox(width: 200.w, child: text18W600(text)), + const Spacer(), + Container( + width: 62.w, + height: 25.h, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4.r), + color: action == "Buy" + ? const Color(0xFF00FF19) + : action == "Exit" + ? const Color(0Xff6C0000) + : const Color(0xFFFFAD31), + ), + child: Center( + child: text14W600_1B1B1B( + action, + clr: action == "Exit" + ? Colors.white + : const Color(0Xff1B1B1B), + )), + ) + ], + ), ), - ), - Container( - width: double.infinity, - height: 1.h, - color: const Color(0xFF3A3A3A), - ), - Padding( - padding: const EdgeInsets.all(20), - child: Column( - children: [ - Row( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - text14W400_979797('Entry Price'), - sizedBoxHeight(5.h), - SizedBox(width: 150.w, child: text15W600(amount)) - ], - ), - sizedBoxWidth(50.w), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - text14W400_979797('Target Price'), - sizedBoxHeight(5.h), - text15W600(targetamount) - ], - ) - ], - ), - sizedBoxHeight(15.h), - Row( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - text14W400_979797('Stop Loss'), - sizedBoxHeight(5.h), - SizedBox(width: 150.w, child: text15W600(stoploss)) - ], - ), - sizedBoxWidth(50.w), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - text14W400_979797('Time Horizon'), - sizedBoxHeight(5.h), - text15W600(time) - ], - ) - ], - ), - sizedBoxHeight(15.h), - action != "Exit" - ? const SizedBox() - : Column( + Container( + width: double.infinity, + height: 1.h, + color: const Color(0xFF3A3A3A), + ), + Padding( + padding: const EdgeInsets.all(20), + child: Column( + children: [ + Row( + children: [ + Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - text14W400_979797('Report'), + text14W400_979797('Entry Price'), sizedBoxHeight(5.h), - GestureDetector( - onTap: () { - Utils.openFile( - url: pdfLink, fileName: "${text}_report.pdf"); - }, - child: Row( - children: [ - Image.asset( - 'assets/images/png/pdf.png', - height: 20.h, - width: 20.w, - ), - text15W600("Download Pdf"), - ], - ), - ) + SizedBox(width: 150.w, child: text15W600(amount)) + ], + ), + sizedBoxWidth(50.w), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text14W400_979797('Target Price'), + sizedBoxHeight(5.h), + text15W600(targetamount) ], ) - ], - ), - ) - ], + ], + ), + sizedBoxHeight(15.h), + Row( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text14W400_979797('Stop Loss'), + sizedBoxHeight(5.h), + SizedBox(width: 150.w, child: text15W600(stoploss)) + ], + ), + sizedBoxWidth(50.w), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text14W400_979797('Time Horizon'), + sizedBoxHeight(5.h), + text15W600(time) + ], + ) + ], + ), + sizedBoxHeight(15.h), + action != "Exit" + ? const SizedBox() + : Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text14W400_979797('Report'), + sizedBoxHeight(5.h), + GestureDetector( + onTap: () { + Utils.openFile( + url: pdfLink, + fileName: "${text}_report.pdf"); + }, + child: Row( + children: [ + Image.asset( + 'assets/images/png/pdf.png', + height: 20.h, + width: 20.w, + ), + text15W600("Download Pdf"), + ], + ), + ) + ], + ) + ], + ), + ) + ], + ), ), ); } diff --git a/lib/view/Sidemenu/ContentByte/ContentBytes.dart b/lib/view/Sidemenu/ContentByte/ContentBytes.dart index 9e42349..8e76aa8 100644 --- a/lib/view/Sidemenu/ContentByte/ContentBytes.dart +++ b/lib/view/Sidemenu/ContentByte/ContentBytes.dart @@ -394,64 +394,74 @@ class _ReadsState extends State { shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), itemBuilder: (ctx, index) { - return Column( - children: [ - InkWell( - onTap: () { - ContentBytesApi() - .updateReadCounts(contentBytesController - .contentBytesModel.data!.read![index].id!) - .then((value) { - Get.to(ReadPDF( - title: contentBytesController - .contentBytesModel.data!.read![index].title, - pdfUrfl: contentBytesController - .contentBytesModel.data!.read![index].file, - )); - }); - }, - child: commonGlassContainer( - borderradius: 8, - width: double.infinity, - height: 150.h, - customWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - const SizedBox( - width: 10, + return index > 1 + ? SizedBox() + : Column( + children: [ + InkWell( + onTap: () { + ContentBytesApi() + .updateReadCounts(contentBytesController + .contentBytesModel.data!.read![index].id!) + .then((value) { + Get.to(ReadPDF( + title: contentBytesController + .contentBytesModel + .data! + .read![index] + .title, + pdfUrfl: contentBytesController + .contentBytesModel + .data! + .read![index] + .file, + )); + }); + }, + child: commonGlassContainer( + borderradius: 8, + width: double.infinity, + height: 150.h, + customWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + const SizedBox( + width: 10, + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + const Spacer(), + SizedBox( + width: 235.w, + child: text20W400( + '"${contentBytesController.contentBytesModel.data!.read![index].title}"'), + ), + sizedBoxHeight(10.h), + SizedBox( + width: 230.w, + height: 50, + child: text16W400( + '"${contentBytesController.contentBytesModel.data!.read![index].description}"'), + ), + const Spacer() + ], + ), + CachedNetworkImage( + imageUrl: + "${contentBytesController.contentBytesModel.data!.read![index].image}", + height: 110, + ), + ], + ), ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Spacer(), - SizedBox( - width: 235.w, - child: text20W400( - '"${contentBytesController.contentBytesModel.data!.read![index].title}"'), - ), - sizedBoxHeight(10.h), - SizedBox( - width: 230.w, - height: 50, - child: text16W400( - '"${contentBytesController.contentBytesModel.data!.read![index].description}"'), - ), - const Spacer() - ], - ), - CachedNetworkImage( - imageUrl: - "${contentBytesController.contentBytesModel.data!.read![index].image}", - height: 110, - ), - ], - ), - ), - ), - sizedBoxHeight(20.h), - ], - ); + ), + sizedBoxHeight(20.h), + ], + ); }), contentBytesController.contentBytesModel.data!.mostReads!.isEmpty ? const SizedBox() @@ -716,66 +726,70 @@ class _AudiosState extends State { itemCount: contentBytesController .contentBytesModel.data!.audio!.length, // total number of items itemBuilder: (context, index) { - return InkWell( - onTap: () { - if (contentBytesController.isAudioInitialize) { - contentBytesController.isAudioSeekBarVisible.value = false; - contentBytesController.pause(); - contentBytesController.stop(); - } - contentBytesController.init(index, "regular"); - contentBytesController.isAudioSeekBarVisible.value = true; - contentBytesController.indexForAudios.value = index; - }, - child: Container( - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Colors.white.withOpacity(0.1), - const Color(0xFFFFFFFF).withOpacity(0.05), - ], - stops: const [ - 0.1, - 1, - ], - ), - borderRadius: BorderRadius.circular(8), - ), - child: Stack( - children: [ - CachedNetworkImage( - imageUrl: contentBytesController - .contentBytesModel.data!.audio![index].image!, - ), - Positioned( - bottom: 5, - left: 5, - child: Row( + return index >= 6 + ? SizedBox() + : InkWell( + onTap: () { + if (contentBytesController.isAudioInitialize) { + contentBytesController.isAudioSeekBarVisible.value = + false; + contentBytesController.pause(); + contentBytesController.stop(); + } + contentBytesController.init(index, "regular"); + contentBytesController.isAudioSeekBarVisible.value = + true; + contentBytesController.indexForAudios.value = index; + }, + child: Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Colors.white.withOpacity(0.1), + const Color(0xFFFFFFFF).withOpacity(0.05), + ], + stops: const [ + 0.1, + 1, + ], + ), + borderRadius: BorderRadius.circular(8), + ), + child: Stack( children: [ - CircleAvatar( - radius: 18.sp, - child: const Icon(Icons.headphones), + CachedNetworkImage( + imageUrl: contentBytesController + .contentBytesModel.data!.audio![index].image!, ), - SizedBox( - width: 5.w, - ), - SizedBox( - width: 125.w, - child: text14W500(contentBytesController - .contentBytesModel - .data! - .audio![index] - .title!), + Positioned( + bottom: 5, + left: 5, + child: Row( + children: [ + CircleAvatar( + radius: 18.sp, + child: const Icon(Icons.headphones), + ), + SizedBox( + width: 5.w, + ), + SizedBox( + width: 125.w, + child: text14W500(contentBytesController + .contentBytesModel + .data! + .audio![index] + .title!), + ), + ], + ), ), ], ), ), - ], - ), - ), - ); + ); }, ), SizedBox( diff --git a/lib/view/Sidemenu/FaqScreen.dart b/lib/view/Sidemenu/FaqScreen.dart index 514c852..64e9833 100644 --- a/lib/view/Sidemenu/FaqScreen.dart +++ b/lib/view/Sidemenu/FaqScreen.dart @@ -68,7 +68,7 @@ class _FaqScreenState extends State { isLoading.value ? const Center( child: CircularProgressIndicator( - color: Color(0xFF0093FF), + color: Color(0xFF0093FF), ), ) : Stack(children: [ @@ -80,7 +80,7 @@ class _FaqScreenState extends State { text25W600('FAQ'), sizedBoxHeight(20), CustomTextFormField1( - hintText: 'Search Chats', + hintText: 'Search FAQ', leadingIcon: SizedBox( height: 20, width: 20, diff --git a/lib/view/login/VerifyOtp.dart b/lib/view/login/VerifyOtp.dart index f636757..6e6de28 100644 --- a/lib/view/login/VerifyOtp.dart +++ b/lib/view/login/VerifyOtp.dart @@ -1,7 +1,6 @@ import 'dart:developer'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:onesignal_flutter/onesignal_flutter.dart';