diff --git a/assets/images/png/Ellipse 1494.png b/assets/images/png/Ellipse 1494.png new file mode 100644 index 0000000..9906fc8 Binary files /dev/null and b/assets/images/png/Ellipse 1494.png differ diff --git a/assets/images/png/Ellipse 1498.png b/assets/images/png/Ellipse 1498.png new file mode 100644 index 0000000..b42c07c Binary files /dev/null and b/assets/images/png/Ellipse 1498.png differ diff --git a/assets/images/png/Ellipse 560.png b/assets/images/png/Ellipse 560.png new file mode 100644 index 0000000..fa3d83d Binary files /dev/null and b/assets/images/png/Ellipse 560.png differ diff --git a/assets/images/png/Rectangle 17934.png b/assets/images/png/Rectangle 17934.png new file mode 100644 index 0000000..3da467e Binary files /dev/null and b/assets/images/png/Rectangle 17934.png differ diff --git a/assets/images/png/menu.png b/assets/images/png/menu.png new file mode 100644 index 0000000..9c39219 Binary files /dev/null and b/assets/images/png/menu.png differ diff --git a/assets/images/png/pdf (1) 1.png b/assets/images/png/pdf (1) 1.png new file mode 100644 index 0000000..86b1b7d Binary files /dev/null and b/assets/images/png/pdf (1) 1.png differ diff --git a/assets/images/png/sidemenu/activehome.png b/assets/images/png/sidemenu/activehome.png new file mode 100644 index 0000000..e43cc11 Binary files /dev/null and b/assets/images/png/sidemenu/activehome.png differ diff --git a/assets/images/png/sidemenu/activeprotfolio.png b/assets/images/png/sidemenu/activeprotfolio.png new file mode 100644 index 0000000..7705e64 Binary files /dev/null and b/assets/images/png/sidemenu/activeprotfolio.png differ diff --git a/assets/images/png/sidemenu/activetrade.png b/assets/images/png/sidemenu/activetrade.png new file mode 100644 index 0000000..2324c6d Binary files /dev/null and b/assets/images/png/sidemenu/activetrade.png differ diff --git a/assets/images/png/sidemenu/inactivehome.png b/assets/images/png/sidemenu/inactivehome.png new file mode 100644 index 0000000..c82a171 Binary files /dev/null and b/assets/images/png/sidemenu/inactivehome.png differ diff --git a/assets/images/png/sidemenu/inactiveprotfolio.png b/assets/images/png/sidemenu/inactiveprotfolio.png new file mode 100644 index 0000000..cbf151a Binary files /dev/null and b/assets/images/png/sidemenu/inactiveprotfolio.png differ diff --git a/assets/images/png/sidemenu/inactiveshorttrade.png b/assets/images/png/sidemenu/inactiveshorttrade.png new file mode 100644 index 0000000..4db61f9 Binary files /dev/null and b/assets/images/png/sidemenu/inactiveshorttrade.png differ diff --git a/assets/images/png/square_TRIDENT_com 1.png b/assets/images/png/square_TRIDENT_com 1.png new file mode 100644 index 0000000..56d1346 Binary files /dev/null and b/assets/images/png/square_TRIDENT_com 1.png differ diff --git a/assets/images/svg/Group 1897.svg b/assets/images/svg/Group 1897.svg new file mode 100644 index 0000000..fd5fbaf --- /dev/null +++ b/assets/images/svg/Group 1897.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svg/Line 587.svg b/assets/images/svg/Line 587.svg new file mode 100644 index 0000000..b7e0fd6 --- /dev/null +++ b/assets/images/svg/Line 587.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svg/Vector (2).svg b/assets/images/svg/Vector (2).svg new file mode 100644 index 0000000..7ed6317 --- /dev/null +++ b/assets/images/svg/Vector (2).svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svg/active_home.svg b/assets/images/svg/active_home.svg new file mode 100644 index 0000000..8df53bb --- /dev/null +++ b/assets/images/svg/active_home.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svg/active_protfolio.svg b/assets/images/svg/active_protfolio.svg new file mode 100644 index 0000000..98972f8 --- /dev/null +++ b/assets/images/svg/active_protfolio.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/assets/images/svg/active_shortTrade.svg b/assets/images/svg/active_shortTrade.svg new file mode 100644 index 0000000..5874531 --- /dev/null +++ b/assets/images/svg/active_shortTrade.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assets/images/svg/gridicons_play.svg b/assets/images/svg/gridicons_play.svg new file mode 100644 index 0000000..4337ff2 --- /dev/null +++ b/assets/images/svg/gridicons_play.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/assets/images/svg/inactive_home.svg b/assets/images/svg/inactive_home.svg new file mode 100644 index 0000000..b9df6eb --- /dev/null +++ b/assets/images/svg/inactive_home.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svg/inactive_protfolio.svg b/assets/images/svg/inactive_protfolio.svg new file mode 100644 index 0000000..c6070e9 --- /dev/null +++ b/assets/images/svg/inactive_protfolio.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/svg/inactive_shortTrade.svg b/assets/images/svg/inactive_shortTrade.svg new file mode 100644 index 0000000..e7b687b --- /dev/null +++ b/assets/images/svg/inactive_shortTrade.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assets/images/svg/pdf1.svg b/assets/images/svg/pdf1.svg new file mode 100644 index 0000000..e6074c2 --- /dev/null +++ b/assets/images/svg/pdf1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/svg/pdfsvg.svg b/assets/images/svg/pdfsvg.svg new file mode 100644 index 0000000..e6074c2 --- /dev/null +++ b/assets/images/svg/pdfsvg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/svg/sidemenu/Faq.svg b/assets/images/svg/sidemenu/Faq.svg new file mode 100644 index 0000000..915d39a --- /dev/null +++ b/assets/images/svg/sidemenu/Faq.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/svg/sidemenu/about.svg b/assets/images/svg/sidemenu/about.svg new file mode 100644 index 0000000..e23888c --- /dev/null +++ b/assets/images/svg/sidemenu/about.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/svg/sidemenu/contact.svg b/assets/images/svg/sidemenu/contact.svg new file mode 100644 index 0000000..732f853 --- /dev/null +++ b/assets/images/svg/sidemenu/contact.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svg/sidemenu/content.svg b/assets/images/svg/sidemenu/content.svg new file mode 100644 index 0000000..3210cb7 --- /dev/null +++ b/assets/images/svg/sidemenu/content.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/assets/images/svg/sidemenu/logout.svg b/assets/images/svg/sidemenu/logout.svg new file mode 100644 index 0000000..b88de40 --- /dev/null +++ b/assets/images/svg/sidemenu/logout.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svg/sidemenu/privacy.svg b/assets/images/svg/sidemenu/privacy.svg new file mode 100644 index 0000000..146b751 --- /dev/null +++ b/assets/images/svg/sidemenu/privacy.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svg/sidemenu/rate.svg b/assets/images/svg/sidemenu/rate.svg new file mode 100644 index 0000000..58fd42c --- /dev/null +++ b/assets/images/svg/sidemenu/rate.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/svg/sidemenu/risk.svg b/assets/images/svg/sidemenu/risk.svg new file mode 100644 index 0000000..224da5c --- /dev/null +++ b/assets/images/svg/sidemenu/risk.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/svg/sidemenu/settingmenu.svg b/assets/images/svg/sidemenu/settingmenu.svg new file mode 100644 index 0000000..681fef6 --- /dev/null +++ b/assets/images/svg/sidemenu/settingmenu.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/svg/sidemenu/sub.svg b/assets/images/svg/sidemenu/sub.svg new file mode 100644 index 0000000..ee957fd --- /dev/null +++ b/assets/images/svg/sidemenu/sub.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/svg/sidemenu/terms.svg b/assets/images/svg/sidemenu/terms.svg new file mode 100644 index 0000000..915d39a --- /dev/null +++ b/assets/images/svg/sidemenu/terms.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/svg/sidemenu/update.svg b/assets/images/svg/sidemenu/update.svg new file mode 100644 index 0000000..17309fc --- /dev/null +++ b/assets/images/svg/sidemenu/update.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/svg/square_TRIDENT_com 1.svg b/assets/images/svg/square_TRIDENT_com 1.svg new file mode 100644 index 0000000..0c7164c --- /dev/null +++ b/assets/images/svg/square_TRIDENT_com 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/svg/squarelogo.svg b/assets/images/svg/squarelogo.svg new file mode 100644 index 0000000..0c7164c --- /dev/null +++ b/assets/images/svg/squarelogo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/lib/Utils/Common/CommonAppBar.dart b/lib/Utils/Common/CommonAppBar.dart new file mode 100644 index 0000000..c9e643a --- /dev/null +++ b/lib/Utils/Common/CommonAppBar.dart @@ -0,0 +1,101 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +class CommonAppbar extends StatelessWidget implements PreferredSizeWidget { + @override + Size get preferredSize => const Size.fromHeight(70); + + const CommonAppbar({ + Key? key, + required this.titleTxt, + this.showLeading = true, + this.customActionWidget, + this.onCustomActionPressed, + // this.calendarWidget = true, + required Size preferredSize, + this.showEdit = false, + this.customBack, + this.editPageName, + this.customleading, + }) : super(key: key); + + final String titleTxt; + final bool? showLeading; + final Widget? customActionWidget; + final Widget? customleading; + // final bool? calendarWidget; + final VoidCallback? onCustomActionPressed; + final bool? showEdit; + final bool? customBack; + final String? editPageName; + + @override + Widget build(BuildContext context) { + return AppBar( + scrolledUnderElevation: 0.0, + backgroundColor: Colors.black, + elevation: 0, + automaticallyImplyLeading: false, + titleSpacing: 0, + title: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Text( + titleTxt, + softWrap: true, + overflow: TextOverflow.visible, + textAlign: TextAlign.start, + style: TextStyle( + fontFamily: 'DM Sans', + fontSize: 18.sp, + fontWeight: FontWeight.w500, + color: Color(0xFF090909), + ), + ), + ), + ], + ), + ), + leading: showLeading! + ? InkWell( + onTap: () { + Get.back(); + }, + child: Icon( + Icons.arrow_back, + color: Color(0xFFFFFFFF), + size: 27, + ), + ) + : customleading, + actions: [ + // if (calendarWidget == true) + // InkWell( + // onTap: onCustomActionPressed, + // child: Padding( + // padding: EdgeInsets.only(right: 14.w), + // child: Icon( + // Icons.calendar_month_outlined, + // color: Color(0xFF3192D8), + // size: 28, + // ), + // ), + // ), + if (customActionWidget != null) + InkWell( + onTap: onCustomActionPressed, + child: Padding( + padding: EdgeInsets.only(right: 14.w), + child: customActionWidget, + ), + ), + ], + ); + } +} diff --git a/lib/Utils/Common/CommonBottomNavigation.dart b/lib/Utils/Common/CommonBottomNavigation.dart new file mode 100644 index 0000000..e6ceddb --- /dev/null +++ b/lib/Utils/Common/CommonBottomNavigation.dart @@ -0,0 +1,193 @@ +import 'dart:ui'; + +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:glassmorphism/glassmorphism.dart'; +import 'package:traderscircuit/Utils/Common/MainController.dart'; + +GlassmorphicContainer bottomnavigationbar( + Color secondaryColor, MainController _mainController) { + return GlassmorphicContainer( + width: double.infinity, + height: 83.h, + borderRadius: 8, + blur: 30, + alignment: Alignment.center, + border: 0, + linearGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Colors.white.withOpacity(0.1), + Color(0xFFFFFFFF).withOpacity(0.05), + ], + stops: [ + 0.1, + 1, + ]), + borderGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff3A3A3A), + Color(0xFF3A3A3A), + ], + ), + child: BottomNavigationBar( + // backgroundColor: , + type: BottomNavigationBarType.fixed, + backgroundColor: Color(0xFFFFFFFF).withOpacity(0), + showUnselectedLabels: true, + selectedItemColor: Colors.white, + unselectedItemColor: Color(0xFF676767), + unselectedLabelStyle: TextStyle( + fontSize: 10.sp, + color: Color(0xFF676767), + fontWeight: FontWeight.w400, + fontFamily: 'manrope'), + selectedLabelStyle: TextStyle( + fontSize: 10.sp, + color: Color(0xFFFFFFFF), + fontWeight: FontWeight.w400, + fontFamily: 'manrope'), + currentIndex: _mainController.selectedIndex.value, + onTap: (index) { + _mainController.updateTab(index); + }, + items: [ + BottomNavigationBarItem( + icon: Image.asset( + 'assets/images/png/sidemenu/inactivehome.png', + height: 26.h, + width: 26.w, + ), + // Icon( + // Icons.home, + // color: Color(0xFF676767), + // ), + activeIcon: Stack( + children: [ + if (_mainController.selectedIndex.value == 0) + Container( + height: 40.h, + width: 40.w, + decoration: BoxDecoration( + shape: BoxShape.circle, + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.4), + spreadRadius: 15, + blurRadius: 10, + offset: Offset(0, 10), + ), + ], + ), + ), + Positioned( + top: 0, + bottom: 0, + right: 0, + left: 0, + child: Center( + child: Image.asset( + 'assets/images/png/sidemenu/activehome.png', + height: 30.h, + width: 30.w, + ), + ), + ) + ], + ), + + // activeIcon: SvgPicture.asset('assets/image/svg/active_home.svg'), + label: 'Home', + ), + BottomNavigationBarItem( + icon: Image.asset( + 'assets/images/png/sidemenu/inactiveshorttrade.png', + height: 26.h, + width: 26.w, + ), + activeIcon: Stack( + children: [ + if (_mainController.selectedIndex.value == 1) + Container( + height: 40.h, + width: 40.w, + decoration: BoxDecoration( + shape: BoxShape.circle, + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.4), + spreadRadius: 15, + blurRadius: 10, + offset: Offset(0, 10), + ), + ], + ), + ), + Positioned( + left: 0, + right: 0, + top: 0, + bottom: 0, + child: Center( + child: Image.asset( + 'assets/images/png/sidemenu/activetrade.png', + height: 30.h, + width: 30.w, + ), + )) + ], + ), + + // SvgPicture.asset('assets/image/svg/active_shortTrade.svg'), + label: 'Short Trade', + ), + BottomNavigationBarItem( + icon: Image.asset( + 'assets/images/png/sidemenu/inactiveprotfolio.png', + height: 26.h, + width: 26.w, + ), + activeIcon: Stack( + children: [ + if (_mainController.selectedIndex.value == 2) + Container( + height: 40.h, + width: 40.w, + decoration: BoxDecoration( + shape: BoxShape.circle, + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.4), + spreadRadius: 15, + blurRadius: 10, + offset: Offset(0, 10), + ), + ], + ), + ), + Positioned( + left: 0, + right: 0, + top: 0, + bottom: 0, + child: Center( + child: Image.asset( + 'assets/images/png/sidemenu/activeprotfolio.png', + height: 30.h, + width: 30.w, + ), + )) + ], + ), + + // SvgPicture.asset('assets/image/svg/active_protfolio.svg'), + label: 'Portfolio', + ), + ], + ), + ); +} diff --git a/lib/Utils/Common/MainController.dart b/lib/Utils/Common/MainController.dart new file mode 100644 index 0000000..751e2d3 --- /dev/null +++ b/lib/Utils/Common/MainController.dart @@ -0,0 +1,17 @@ +import 'package:get/get.dart'; +import 'package:traderscircuit/view/MainScreen/HomeScreen.dart'; +import 'package:traderscircuit/view/MainScreen/ShortTrade.dart'; + +class MainController extends GetxController { + var selectedIndex = 0.obs; + + var currentTab = [ + const HomeScreen(), + const ShortTrade(), + const HomeScreen(), + ].obs; + + void updateTab(int index) { + selectedIndex.value = index; + } +} diff --git a/lib/Utils/Common/comonGlassmorphicContainer.dart b/lib/Utils/Common/comonGlassmorphicContainer.dart new file mode 100644 index 0000000..e697324 --- /dev/null +++ b/lib/Utils/Common/comonGlassmorphicContainer.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:glassmorphism/glassmorphism.dart'; + +Widget commonGlassContainer( + {required double width, + required double height, + required double borderradius, + required Widget customWidget}) { + return GlassmorphicContainer( + width: width, + height: height, + borderRadius: borderradius, + blur: 10, + alignment: Alignment.center, + border: 0.9, + linearGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Colors.white.withOpacity(0.1), + Color(0xFFFFFFFF).withOpacity(0.05), + ], + stops: [ + 0.1, + 1, + ], + ), + borderGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff3A3A3A), + Color(0xFF3A3A3A), + ], + ), + child: customWidget); +} diff --git a/lib/Utils/text.dart b/lib/Utils/text.dart index 904b2b6..e9fe7c9 100644 --- a/lib/Utils/text.dart +++ b/lib/Utils/text.dart @@ -34,6 +34,17 @@ Widget text18W600(String text) { ); } +Widget text18W500(String text) { + return Text( + text, + style: TextStyle( + fontSize: 18.sp, + color: Colors.white, + fontWeight: FontWeight.w500, + fontFamily: 'manrope'), + ); +} + Widget text18W400(String text) { return Text( text, @@ -56,6 +67,94 @@ Widget text16W400(String text) { ); } +Widget text16W400_1B1B1B(String text) { + return Text( + text, + style: TextStyle( + fontSize: 16.sp, + color: Color(0Xff1B1B1B), + fontWeight: FontWeight.w400, + fontFamily: 'manrope'), + ); +} + +Widget text16W600(String text) { + return Text( + text, + style: TextStyle( + fontSize: 16.sp, + color: Colors.white, + fontWeight: FontWeight.w600, + fontFamily: 'manrope'), + ); +} + +Widget text16W500(String text) { + return Text( + text, + style: TextStyle( + fontSize: 16.sp, + color: Colors.white, + fontWeight: FontWeight.w500, + fontFamily: 'manrope'), + ); +} + +Widget text15W600(String text) { + return Text( + text, + style: TextStyle( + fontSize: 15.sp, + color: Colors.white, + fontWeight: FontWeight.w600, + fontFamily: 'manrope'), + ); +} + +Widget text12W400(String text) { + return Text( + text, + style: TextStyle( + fontSize: 12.sp, + color: Colors.white, + fontWeight: FontWeight.w400, + fontFamily: 'manrope'), + ); +} + +Widget text8W400(String text) { + return Text( + text, + style: TextStyle( + fontSize: 8.sp, + color: Colors.white, + fontWeight: FontWeight.w400, + fontFamily: 'manrope'), + ); +} + +Widget text22W600(String text) { + return Text( + text, + style: TextStyle( + fontSize: 22.sp, + color: Colors.white, + fontWeight: FontWeight.w600, + fontFamily: 'manrope'), + ); +} + +Widget text22W500(String text) { + return Text( + text, + style: TextStyle( + fontSize: 22.sp, + color: Colors.white, + fontWeight: FontWeight.w500, + fontFamily: 'manrope'), + ); +} + Widget text16W700(String text) { return Text( text, @@ -77,3 +176,69 @@ Widget text14W300(String text) { fontFamily: 'manrope'), ); } + +Widget text14W500(String text) { + return Text( + text, + style: TextStyle( + fontSize: 14.sp, + color: Colors.white, + fontWeight: FontWeight.w500, + fontFamily: 'manrope'), + ); +} + +Widget text16W400_DADADA(String text) { + return Text( + text, + style: TextStyle( + fontSize: 16.sp, + color: Color(0xFFDADADA), + fontWeight: FontWeight.w400, + fontFamily: 'manrope'), + ); +} + +Widget text14W400_979797(String text) { + return Text( + text, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xFF979797), + fontWeight: FontWeight.w400, + fontFamily: 'manrope'), + ); +} + +Widget text12W400_979797(String text) { + return Text( + text, + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF979797), + fontWeight: FontWeight.w400, + fontFamily: 'manrope'), + ); +} + +Widget text14W400_00FF19(String text) { + return Text( + text, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xFF00FF19), + fontWeight: FontWeight.w400, + fontFamily: 'manrope'), + ); +} + +Widget text14W500_black(String text) { + return Text( + text, + style: TextStyle( + fontSize: 14.sp, + color: Colors.black, + fontWeight: FontWeight.w500, + fontFamily: 'manrope'), + ); +} diff --git a/lib/main.dart b/lib/main.dart index 2ee17b2..cffa6a5 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -98,7 +98,7 @@ class _MyAppState extends State with WidgetsBindingObserver { // textTheme: GoogleFonts.manropeTextTheme(), ), debugShowCheckedModeBanner: false, - initialRoute: RouteName.splashScreen, + initialRoute: RouteName.mainscreen, //initialRoute: RouteName.mainScreen, getPages: AppRoutes.appRoutes(), diff --git a/lib/resources/routes/route_name.dart b/lib/resources/routes/route_name.dart index bdb68ef..7a3e980 100644 --- a/lib/resources/routes/route_name.dart +++ b/lib/resources/routes/route_name.dart @@ -9,6 +9,14 @@ class RouteName { //login/signup static const String loginscreen = '/loginscreen'; + static const String homescreen = '/homescreen'; + static const String sidemenu = '/sidemenu'; + static const String mainscreen = '/mainscreen'; + static const String shortTrade = '/shortTrade'; + + + + static const String verifyotp = '/verifyotp'; //secureaccess diff --git a/lib/resources/routes/routes.dart b/lib/resources/routes/routes.dart index 591d019..ee8038e 100644 --- a/lib/resources/routes/routes.dart +++ b/lib/resources/routes/routes.dart @@ -1,6 +1,10 @@ import 'package:get/get.dart'; import 'package:traderscircuit/Utils/Common/noInternet.dart'; import 'package:traderscircuit/resources/routes/route_name.dart'; +import 'package:traderscircuit/view/MainScreen/HomeScreen.dart'; +import 'package:traderscircuit/view/MainScreen/MainScreen.dart'; +import 'package:traderscircuit/view/MainScreen/ShortTrade.dart'; +import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart'; import 'package:traderscircuit/view/login/LoginScreen.dart'; import 'package:traderscircuit/view/login/VerifyOtp.dart'; import 'package:traderscircuit/view/onBoarding/splashScreen.dart'; @@ -42,6 +46,22 @@ class AppRoutes { name: RouteName.loginscreen, page: () => const LoginScreen(), ), + GetPage( + name: RouteName.homescreen, + page: () => const HomeScreen(), + ), + GetPage( + name: RouteName.sidemenu, + page: () => const SideMenu(), + ), + GetPage( + name: RouteName.mainscreen, + page: () => const MainScreen(), + ), + GetPage( + name: RouteName.shortTrade, + page: () => const ShortTrade(), + ), GetPage( name: RouteName.verifyotp, page: () => const VerifyOTP(), diff --git a/lib/view/MainScreen/HomeScreen.dart b/lib/view/MainScreen/HomeScreen.dart new file mode 100644 index 0000000..4317779 --- /dev/null +++ b/lib/view/MainScreen/HomeScreen.dart @@ -0,0 +1,525 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:get/get.dart'; +import 'package:glassmorphism/glassmorphism.dart'; +import 'package:traderscircuit/Utils/Common/CommonBottomNavigation.dart'; +import 'package:traderscircuit/Utils/Common/MainController.dart'; +import 'package:traderscircuit/Utils/Common/comonGlassmorphicContainer.dart'; +import 'package:traderscircuit/Utils/Common/sized_box.dart'; +import 'package:traderscircuit/Utils/text.dart'; +import 'package:traderscircuit/resources/routes/route_name.dart'; +import 'package:traderscircuit/view/MainScreen/MainScreen.dart'; +import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart'; +import 'package:traderscircuit/view/onBoarding/splashScreen1.dart'; + +class HomeScreen extends StatefulWidget { + const HomeScreen({super.key}); + + @override + State createState() => _HomeScreenState(); +} + +class _HomeScreenState extends State { + GlobalKey _scaffoldKey1 = GlobalKey(); + @override + Widget build(BuildContext context) { + return Scaffold( + key: _scaffoldKey1, + backgroundColor: Colors.black, + drawer: Container(width: 320.w, child: SideMenu()), + extendBody: true, + appBar: AppBar( + scrolledUnderElevation: 0.0, + backgroundColor: Colors.black, + elevation: 0, + automaticallyImplyLeading: false, + titleSpacing: 0, + leading: InkWell( + onTap: () { + _scaffoldKey1.currentState?.openDrawer(); + }, + child: Center( + child: Image.asset( + 'assets/images/png/menu.png', + height: 15.h, + width: 20.w, + ), + ), + ), + actions: [ + InkWell( + onTap: () {}, + child: Padding( + padding: EdgeInsets.only(right: 14.w), + child: SvgPicture.asset('assets/images/svg/Group 1897.svg')), + ), + ], + ), + body: Stack( + children: [ + CommonBlurLeft(), + CommonBlurRight(), + Stack(children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: ListView( + physics: BouncingScrollPhysics(), + children: [ + sizedBoxHeight(20.h), + Text( + "Welcome Afrid", + style: TextStyle( + color: Colors.white, + fontSize: 24.sp, + fontFamily: 'Manrope', + fontWeight: FontWeight.w500), + ), + sizedBoxHeight(25.h), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + commoncontainer( + width: 180.w, + text: 'NIFTY', + amount: '22,286.95', + rate: '+304.15 (+1.38%)'), + sizedBoxWidth(10.w), + commoncontainer( + width: 220.w, + text: 'BANKNIFTY', + amount: '22,286.95', + rate: '+896.10 (+1.94%)'), + ], + ), + ), + sizedBoxHeight(30.h), + Container( + width: double.infinity, + height: 1.h, + color: Color(0xFF3A3A3A), + ), + sizedBoxHeight(30.h), + text22W500('View our products'), + sizedBoxHeight(30.h), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + ProductWidget(text: 'Options', subtext: 'Recommendation'), + ProductWidget( + text: 'Multibagger', subtext: 'Recommendation') + ], + ), + sizedBoxHeight(15.h), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + ProductWidget( + text: 'Swing Trade', subtext: 'Recommendation'), + ProductWidget( + text: 'OP + MB + ST', subtext: 'Recommendation'), + ], + ), + sizedBoxHeight(25.h), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SvgPicture.asset('assets/images/svg/Vector (2).svg'), + sizedBoxWidth(10.w), + text18W500('UNLOCK NOW!'), + ], + ), + sizedBoxHeight(25.h), + Container( + width: double.infinity, + height: 1.h, + color: Color(0xFF3A3A3A), + ), + sizedBoxHeight(25.h), + text22W600('Explore The Unseen'), + sizedBoxHeight(35.h), + DefaultTabController( + length: 2, + child: Column( + children: [ + MyTabBar(), + SizedBox( + height: 700.h, + child: TabBarView( + children: [ + ActiveCallsTab(), + ExitedCallsTab(), + ], + ), + ), + ], + ), + ), + ], + ), + ) + ]) + ], + ), + bottomNavigationBar: + bottomnavigationbar(Color(0xFF3A3A3A), mainController), + ); + } +} + +Widget ActiveCallsTab() { + return Column( + children: [ + sizedBoxHeight(30.h), + cardcallWidget( + text: 'Trident Ltd', amount: '₹ 453 - ₹234', pdfname: 'Download Pdf'), + sizedBoxHeight(30.h), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text22W600('Content Bytes'), + sizedBoxHeight(8.w), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + text16W400_DADADA('The Beauty and Power of Video'), + sizedBoxWidth(10.w), + Container( + height: 35.h, + width: 105.w, + decoration: BoxDecoration( + color: Color(0xFF3A3A3A).withOpacity(0.6), + borderRadius: BorderRadius.circular(5.r), + border: Border.all( + color: Color(0xFF3A3A3A), + )), + child: Center(child: text16W500('View More')), + ), + ], + ), + ), + sizedBoxHeight(20.h), + commonGlassContainer( + borderradius: 8, + width: double.infinity, + height: 300.h, + customWidget: Padding( + padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w), + child: Column( + children: [ + Container( + height: 200.h, + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.r), + image: DecorationImage( + image: AssetImage( + 'assets/images/png/Rectangle 17934.png'))), + child: Center( + child: SvgPicture.asset( + 'assets/images/svg/gridicons_play.svg', + height: 56.h, + width: 56.w, + ), + ), + ), + sizedBoxHeight(20.h), + Row( + children: [ + CircleAvatar( + radius: 23.r, + backgroundImage: + AssetImage('assets/images/png/Ellipse 1494.png'), + ), + sizedBoxWidth(10.w), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text18W500('Week of 21st February 2024'), + // sizedBoxHeight(10.h), + text12W400_979797('20k views . 2 days ago'), + ], + ) + ], + ) + ], + ), + )) + ], + ), + ], + ); +} + +Widget ExitedCallsTab() { + return Column( + children: [ + sizedBoxHeight(30.h), + cardcallWidget( + text: 'Trident Ltd', amount: '₹ 453 - ₹234', pdfname: 'Download Pdf'), + sizedBoxHeight(30.h), + cardcallWidget( + text: 'Trident Ltd', amount: '₹ 453 - ₹234', pdfname: 'Download Pdf'), + sizedBoxHeight(30.h), + cardcallWidget( + text: 'Trident Ltd', amount: '₹ 453 - ₹234', pdfname: 'Download Pdf'), + ], + ); +} + +Widget cardcallWidget( + {required String text, required String amount, required String pdfname}) { + return GlassmorphicContainer( + width: double.infinity, + height: 176.h, + borderRadius: 8, + blur: 10, + alignment: Alignment.center, + border: 0.8, + linearGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Colors.white.withOpacity(0.1), + Color(0xFFFFFFFF).withOpacity(0.05), + ], + stops: [ + 0.1, + 1, + ]), + borderGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff3A3A3A), + Color(0xFF3A3A3A), + ], + ), + child: 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: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff3A3A3A), + Color(0xFF3A3A3A), + ], + ), + borderGradient: 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'), + ), + ), + sizedBoxWidth(15.w), + text18W600(text), + Spacer(), + Container( + width: 62.w, + height: 25.h, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4.r), + color: Color(0xFFFFAD31), + ), + child: Center(child: text16W400_1B1B1B('Hold')), + ) + ], + ), + ), + Container( + width: double.infinity, + height: 1.h, + color: Color(0xFF3A3A3A), + ), + Padding( + padding: const EdgeInsets.all(20), + child: Row( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text14W400_979797('Initial Entry Price'), + sizedBoxHeight(5.h), + text15W600(amount) + ], + ), + sizedBoxWidth(50.w), + 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 (1) 1.png'), + text15W600(pdfname), + ], + ) + ], + ) + ], + ), + ) + ], + ), + ); +} + +class MyTabBar extends StatelessWidget { + // Set the desired height + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + border: Border.all(color: Color(0Xff3A3A3A)), + borderRadius: BorderRadius.circular(8.r), + ), + padding: const EdgeInsets.all(10.0), // Set the desired padding + child: TabBar( + indicator: BoxDecoration( + color: const Color(0xff6C0000), + borderRadius: BorderRadius.circular(5), + ), + dividerColor: Colors.transparent, + labelStyle: TextStyle( + fontSize: 18.sp, + color: Colors.white, + fontWeight: FontWeight.w500, + fontFamily: 'manrope'), + indicatorSize: TabBarIndicatorSize.tab, + indicatorColor: const Color(0xFFFFFFFF), + labelColor: Colors.white, + unselectedLabelColor: const Color(0xffFFFFFF), + overlayColor: MaterialStateProperty.all(const Color(0xFFFFFFFF)), + tabs: const [ + Tab( + text: 'Active Calls', + ), + Tab( + text: 'Exited Calls', + ), + ]), + ); + } +} + +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: [ + Colors.white.withOpacity(0.1), + Color(0xFFFFFFFF).withOpacity(0.05), + ], + stops: [ + 0.1, + 1, + ]), + borderGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff3A3A3A), + Color(0xFF3A3A3A), + ], + ), + 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 commoncontainer( + {required String text, + 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: [ + Colors.white.withOpacity(0.1), + Color(0xFFFFFFFF).withOpacity(0.05), + ], + stops: [ + 0.1, + 1, + ]), + borderGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff3A3A3A), + Color(0xFF3A3A3A), + ], + ), + child: Padding( + padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + text14W400_979797(text), + sizedBoxWidth(8.w), + text16W600(amount), + sizedBoxWidth(8.w), + SvgPicture.asset( + 'assets/images/svg/Line 587.svg', + height: 15.h, + width: 15.w, + ), + ], + ), + sizedBoxHeight(8.w), + text14W400_00FF19(rate) + ], + ), + ), + ); +} diff --git a/lib/view/MainScreen/MainScreen.dart b/lib/view/MainScreen/MainScreen.dart new file mode 100644 index 0000000..e4c470f --- /dev/null +++ b/lib/view/MainScreen/MainScreen.dart @@ -0,0 +1,17 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:traderscircuit/Utils/Common/MainController.dart'; + +final MainController mainController = Get.put(MainController()); + +class MainScreen extends StatelessWidget { + const MainScreen({super.key}); + @override + Widget build(BuildContext context) { + return Obx(() { + return Scaffold( + body: mainController.currentTab[mainController.selectedIndex.value], + ); + }); + } +} diff --git a/lib/view/MainScreen/ShortTrade.dart b/lib/view/MainScreen/ShortTrade.dart new file mode 100644 index 0000000..3a4232e --- /dev/null +++ b/lib/view/MainScreen/ShortTrade.dart @@ -0,0 +1,214 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:get/get.dart'; +import 'package:glassmorphism/glassmorphism.dart'; +import 'package:traderscircuit/Utils/Common/CommonAppBar.dart'; +import 'package:traderscircuit/Utils/Common/comonGlassmorphicContainer.dart'; +import 'package:traderscircuit/Utils/Common/sized_box.dart'; +import 'package:traderscircuit/Utils/text.dart'; +import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart'; +import 'package:traderscircuit/view/onBoarding/splashScreen1.dart'; + +class ShortTrade extends StatefulWidget { + const ShortTrade({super.key}); + + @override + State createState() => _ShortTradeState(); +} + +class _ShortTradeState extends State { + GlobalKey _scaffoldKey1 = GlobalKey(); + List containerTexts = ["Container 1", "Container 2", "Container 3"]; + var selectedIndex = 0.obs; + @override + Widget build(BuildContext context) { + return Scaffold( + key: _scaffoldKey1, + backgroundColor: Colors.black, + drawer: Container(width: 320.w, child: SideMenu()), + extendBody: true, + appBar: AppBar( + scrolledUnderElevation: 0.0, + backgroundColor: Colors.black, + elevation: 0, + automaticallyImplyLeading: false, + titleSpacing: 0, + leading: InkWell( + onTap: () { + _scaffoldKey1.currentState?.openDrawer(); + }, + child: Center( + child: Image.asset( + 'assets/images/png/menu.png', + height: 15.h, + width: 20.w, + ), + ), + ), + ), + + // CommonAppbar( + // titleTxt: '', + // // preferredSize: Size.fromHeight(60.h), + // showLeading: false, + // customleading: InkWell( + // onTap: () { + // _scaffoldKey1.currentState?.openDrawer(); + // }, + // child: Center( + // child: Image.asset( + // 'assets/images/png/menu.png', + // height: 15.h, + // width: 20.w, + // ), + // ), + // // Icon( + // // Icons.menu, + // // color: Colors.white, + // // size: 27.sp, + // // ), + // ), + // ), + body: Stack(children: [ + CommonBlurLeft(), + CommonBlurRight(), + Stack(children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: ListView(physics: BouncingScrollPhysics(), children: [ + sizedBoxHeight(20.h), + cardSwingWidget( + text: 'Indiabulls Housing Finance Ltd', + amount: '₹ 196.50 - ₹ 197', + pdfname: '₹ 204'), + sizedBoxHeight(20.h), + // ListView.builder( + // shrinkWrap: true, + // scrollDirection: Axis.vertical, + // itemCount: containerTexts.length, + // itemBuilder: (context, index) { + // return topContainer(containerTexts[index], index); + // }, + // ) + ])) + ]) + ])); + } + + Widget cardSwingWidget( + {required String text, required String amount, required String pdfname}) { + return commonGlassContainer( + width: double.infinity, + height: 251.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: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff3A3A3A), + Color(0xFF3A3A3A), + ], + ), + borderGradient: 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'), + ), + ), + sizedBoxWidth(15.w), + text18W600(text), + Spacer(), + Container( + width: 62.w, + height: 25.h, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4.r), + color: Color(0xFFFFAD31), + ), + child: Center(child: text16W400_1B1B1B('Hold')), + ) + ], + ), + ), + Container( + width: double.infinity, + height: 1.h, + color: Color(0xFF3A3A3A), + ), + Padding( + padding: const EdgeInsets.all(20), + child: Row( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text14W400_979797('Initial Entry Price'), + sizedBoxHeight(5.h), + text15W600(amount) + ], + ), + sizedBoxWidth(50.w), + 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 (1) 1.png'), + text15W600(pdfname), + ], + ) + ], + ) + ], + ), + ) + ], + ), + ); + } + + Widget topContainer(String text, int index) { + return Obx(() { + return selectedIndex.value == index + ? Container( + height: 40, + width: 126, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + color: Color(0Xff6C0000), + ), + child: Center(child: Text(text)), + ) + : commonGlassContainer( + width: 126, + height: 40, + borderradius: 5, + customWidget: Center(child: Text(text)), + ); + }); + } +} diff --git a/lib/view/Sidemenu/Sidemenu.dart b/lib/view/Sidemenu/Sidemenu.dart new file mode 100644 index 0000000..8449f40 --- /dev/null +++ b/lib/view/Sidemenu/Sidemenu.dart @@ -0,0 +1,582 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:get/get.dart'; +import 'package:traderscircuit/Utils/Common/sized_box.dart'; +import 'package:traderscircuit/Utils/text.dart'; +import 'package:traderscircuit/view/onBoarding/splashScreen1.dart'; + +class SideMenu extends StatefulWidget { + const SideMenu({super.key}); + + @override + State createState() => _SideMenuState(); +} + +class _SideMenuState extends State { + List sideBarData = [ + {"imagePath": "assets/images/svg/sidemenu/Faq.svg", "text": "FAQ’s"}, + { + "imagePath": "assets/images/svg/sidemenu/contact.svg", + "text": "Contact Us" + }, + { + "imagePath": "assets/images/svg/sidemenu/rate.svg", + "text": "Rate this app" + }, + { + "imagePath": "assets/images/svg/sidemenu/terms.svg", + "text": "Terms & Conditions" + }, + { + "imagePath": "assets/images/svg/sidemenu/privacy.svg", + "text": "Privacy Policy" + }, + {"imagePath": "assets/images/svg/sidemenu/about.svg", "text": "About Us"}, + { + "imagePath": "assets/images/svg/sidemenu/settingmenu.svg", + "text": "Settings" + }, + {"imagePath": "assets/images/svg/sidemenu/logout.svg", "text": "Logout"}, + ]; + + Color sideBarBackgroundColor = const Color(0xFF1B243D); + Color whitecolor = Colors.white; + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.black, + appBar: AppBar( + toolbarHeight: 60.h, + elevation: 0, + backgroundColor: Colors.black, + leading: Container( + child: Align( + alignment: Alignment.bottomCenter, + child: GestureDetector( + onTap: () { + // Get.back(); + Scaffold.of(context).closeDrawer(); + }, + child: Container( + width: 25.w, + height: 25.h, + decoration: ShapeDecoration( + color: Colors.black, + shape: const OvalBorder(), + ), + child: Align( + alignment: Alignment.center, + child: SizedBox( + width: 25.w, + height: 25.h, + child: Icon( + Icons.arrow_back_ios, + color: Colors.white, + size: 25.h, + weight: 25.w, + ), + ), + ), + ), + ), + ), + ), + ), + body: Stack( + children: [ + CommonBlurLeft(), + CommonBlurRight(), + Stack(children: [ + ListView(children: [ + sizedBoxHeight(30.h), + InkWell( + onTap: () { + setState(() { + // Get.toNamed(RouteName.investorprofile); + }); + }, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + width: 80.w, + height: 80.h, + decoration: ShapeDecoration( + image: DecorationImage( + image: AssetImage( + "assets/images/png/Ellipse 560.png"), + fit: BoxFit.fill, + ), + shape: const OvalBorder(), + ), + ), + sizedBoxWidth(20.w), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text18W400('Afrid Mulla'), + sizedBoxHeight(4.h), + text18W400('My Profile'), + ], + ), + ], + ), + ), + ), + sizedBoxHeight(25.h), + Container( + height: 1, + margin: EdgeInsets.symmetric(vertical: 10.h), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Color.fromRGBO(176, 176, 176, 0.5), + width: 1, + ), + ), + ), + ), + ListTile( + leading: SizedBox( + width: 25.w, + height: 25.h, + child: SvgPicture.asset( + 'assets/images/svg/sidemenu/sub.svg')), + title: text18W400('My Subscription'), + trailing: Container( + height: 35.h, + width: 122.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.r), + color: Color(0xFF34C759), + ), + child: Center(child: text14W500_black('Upgrade')), + ), + selected: true, + onTap: () { + setState(() { + // Get.toNamed(RouteName.privacypolicy); + }); + }, + ), + Container( + height: 1, + margin: EdgeInsets.symmetric(vertical: 10.h), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Color.fromRGBO(176, 176, 176, 0.5), + width: 1, + ), + ), + ), + ), + ListTile( + leading: SizedBox( + width: 25.w, + height: 25.h, + child: SvgPicture.asset( + 'assets/images/svg/sidemenu/content.svg')), + title: text18W400('Content bytes'), + selected: true, + onTap: () { + setState(() { + // Get.toNamed(RouteName.privacypolicy); + }); + }, + ), + Container( + height: 1, + margin: EdgeInsets.symmetric(vertical: 10.h), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Color.fromRGBO(176, 176, 176, 0.5), + width: 1, + ), + ), + ), + ), + ListTile( + leading: SizedBox( + width: 25.w, + height: 25.h, + child: SvgPicture.asset( + 'assets/images/svg/sidemenu/sub.svg')), + title: text18W400('Update My KYC'), + trailing: Container( + height: 40.h, + width: 122.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.r), + color: Color(0xFF3A3A3A).withOpacity(0.6), + border: Border.all(color: Color(0xFF9A0000))), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + text12W400('Pending'), + Container( + height: 30.h, + width: 30.h, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + 'assets/images/png/Ellipse 1498.png', + ), + fit: BoxFit.cover)), + child: Center(child: text8W400('40%')), + ), + ], + ), + ), + ), + selected: true, + onTap: () { + setState(() { + // Get.toNamed(RouteName.privacypolicy); + }); + }, + ), + Container( + height: 1, + margin: EdgeInsets.symmetric(vertical: 10.h), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Color.fromRGBO(176, 176, 176, 0.5), + width: 1, + ), + ), + ), + ), + ListTile( + leading: SizedBox( + width: 25.w, + height: 25.h, + child: SvgPicture.asset( + 'assets/images/svg/sidemenu/sub.svg')), + title: text18W400('My Subscription'), + trailing: Container( + height: 35.h, + width: 122.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.r), + color: Color(0xFF0093FF), + ), + child: Center(child: text14W500('Conservative')), + ), + selected: true, + onTap: () { + setState(() { + // Get.toNamed(RouteName.privacypolicy); + }); + }, + ), + Column( + children: List.generate(sideBarData.length, (index) { + return sideBarTile( + image: sideBarData[index]["imagePath"], + text: sideBarData[index]["text"], + onTap: () { + navigateTo(index, context); + }, + ); + }), + ), + // SingleChildScrollView( + // physics: NeverScrollableScrollPhysics(), + // child: ListView.builder( + // shrinkWrap: true, + // padding: EdgeInsets.zero, + // itemCount: sideBarData.length, + // itemBuilder: (_, index) { + // return sideBarTile( + // image: sideBarData[index]["imagePath"], + // text: sideBarData[index]["text"], + // onTap: () { + // navigateTo(index, context); + // }, + // ); + // }, + // ), + // ), + sizedBoxHeight(80.h), + ]), + ]), + ], + )); + } +} + +LogOutdialog(context) { + return showDialog( + // barrierDismissible: false, + context: context, + builder: (context) => Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AlertDialog( + insetPadding: EdgeInsets.symmetric(horizontal: 16.w), + backgroundColor: + Get.isDarkMode ? Colors.black : const Color(0XFF1B243D), + contentPadding: EdgeInsets.fromLTRB(29.w, 44.h, 29.w, 35.h), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(5.r)), + ), + content: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + height: 87.h, + width: 80.w, + decoration: const BoxDecoration( + shape: BoxShape.circle, color: Color(0xFFC18948)), + child: Align( + alignment: Alignment.topLeft, + child: Container( + height: 79.h, + width: 73.w, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: const Color(0xFFE8C69F).withOpacity(0.5), + ), + child: Center( + child: SvgPicture.asset( + 'assets/images/svg/apps 1.svg', + // fit: BoxFit.fill, + ), + ), + ), + ), + ), + sizedBoxHeight(30.h), + Text( + "Are you sure you want to logout ?", + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: "Georgia", + fontWeight: FontWeight.w400, + fontSize: 20.sp, + color: const Color(0xFFFFFFFF)), + ), + sizedBoxHeight(40.h), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + // SizedBox( + // width: 140.w, + // child: CommonBorderNoBtn( + // text: 'Yes', + // onTap: () { + // // prefs.clear(); + // // Get.offNamed(RouteName.loginScreen); + // }, + // )), + // SizedBox( + // width: 140.w, + // child: CommonYesBtn( + // text: 'No', + // onTap: () { + // Get.back(); + // }, + // ), + // ), + ], + ) + ], + ), + ), + ], + ), + ); +} + +void navigateTo(int index, BuildContext context) { + switch (index) { + case 0: + { + // Get.toNamed(RouteName.FAQScreen); + } + break; + + case 1: + { + // Get.toNamed(RouteName.feedback); + } + break; + + case 2: + { + // Get.toNamed(RouteName.settingsScreen); + } + break; + + case 3: + { + // Get.toNamed(RouteName.contactUs); + } + break; + + case 4: + { + // Get.toNamed(RouteName.termsCondition); + } + break; + + case 5: + { + // Get.toNamed(RouteName.privacyPolicy); + } + break; + + case 6: + { + Get.bottomSheet( + Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox( + width: double.infinity, + child: SvgPicture.asset('assets/images/svg/logout.svg'), + ), + Text( + 'Are You Sure You Want To Logout?', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.black, + fontSize: 20.sp, + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + InkWell( + onTap: () { + Navigator.of(context).pop(); + }, + child: Container( + width: 150.w, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(5.r), + border: Border.all( + color: Colors.black, + ), + ), + child: Padding( + padding: const EdgeInsets.all(18.0), + child: Text( + 'No', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.black, + fontSize: 16.sp, + ), + ), + ), + ), + ), + InkWell( + // onTap: () async { + // FirebaseAuth auth = FirebaseAuth.instance; + // final GoogleSignIn googleSignIn = GoogleSignIn(); + + // if (auth.currentUser != null && + // auth.currentUser?.providerData.any((userInfo) => + // userInfo.providerId == 'google.com') == + // true) { + // await googleSignIn.signOut(); + // Navigator.of(context).pop(); + // Get.back(); + // Get.toNamed(RouteName.login); + // } else { + // SharedPreferences prefs = + // await SharedPreferences.getInstance(); + // prefs.remove('token'); + // Navigator.of(context).pop(); + // Get.back(); + // Get.toNamed(RouteName.login); + // } + // }, + onTap: () { + Get.back(); + // Get.toNamed(RouteName.login); + }, + child: Container( + width: 150.w, + decoration: BoxDecoration( + color: Color(0xFF3192D8), + borderRadius: BorderRadius.circular(5.r), + ), + child: Padding( + padding: const EdgeInsets.all(18.0), + child: Text( + 'Yes', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + ), + ), + ), + ), + ), + ], + ) + ], + ), + backgroundColor: Colors.white, + ); + } + break; + + default: + { + null; + } + } +} + +class sideBarTile extends StatelessWidget { + final String image; + final String text; + final void Function()? onTap; + + sideBarTile({ + required this.image, + required this.text, + this.onTap, + super.key, + }); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + height: 1, + margin: EdgeInsets.symmetric(vertical: 10.h), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Color.fromRGBO(176, 176, 176, 0.5), + width: 1, + ), + ), + ), + ), + ListTile( + leading: SvgPicture.asset(image), + title: text18W400(text), + selected: true, + onTap: onTap), + ], + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 755ae70..32cc2a3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: traderscircuit description: A new Flutter project. # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: "none" # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=2.19.6 <3.0.0' + sdk: ">=2.19.6 <3.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -31,7 +31,6 @@ dependencies: flutter: sdk: flutter - # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 @@ -43,8 +42,6 @@ dependencies: glassmorphism: ^3.0.0 pin_code_fields: ^8.0.1 fluttertoast: ^8.0.9 - - dev_dependencies: flutter_test: @@ -62,7 +59,6 @@ dev_dependencies: # The following section is specific to Flutter packages. flutter: - # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. @@ -72,9 +68,10 @@ flutter: assets: - assets/images/ - assets/images/svg/ + - assets/images/svg/sidemenu/ + - assets/images/png/sidemenu/ - assets/images/png/ - - + # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see @@ -92,7 +89,7 @@ flutter: - family: manrope fonts: - asset: assets/fonts/manrope/Manrope-VariableFont_wght.ttf - + # - family: Trajan Pro # fonts: # - asset: fonts/TrajanPro.ttf