Files
Traders_Circuit/lib/view/MainScreen/ShortTrade.dart

982 lines
39 KiB
Dart
Raw Normal View History

import 'package:cached_network_image/cached_network_image.dart';
2024-03-19 22:57:32 -07:00
import 'package:flutter/material.dart';
2024-04-16 16:43:11 +05:30
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
2024-03-19 22:57:32 -07:00
import 'package:flutter_screenutil/flutter_screenutil.dart';
2024-05-15 17:55:05 +05:30
import 'package:flutter_svg/svg.dart';
import 'package:gap/gap.dart';
2024-03-19 22:57:32 -07:00
import 'package:get/get.dart';
import 'package:glassmorphism/glassmorphism.dart';
import 'package:traderscircuit/Utils/Common/CommonBottomNavigation.dart';
import 'package:traderscircuit/Utils/Common/CommonTabBar.dart';
import 'package:traderscircuit/Utils/Common/commonBotton.dart';
2024-03-19 22:57:32 -07:00
import 'package:traderscircuit/Utils/Common/comonGlassmorphicContainer.dart';
import 'package:traderscircuit/Utils/Common/sized_box.dart';
2024-03-19 23:09:10 -07:00
import 'package:traderscircuit/Utils/text.dart';
import 'package:traderscircuit/Utils/utils.dart';
import 'package:traderscircuit/controller/contact_us_controller.dart';
import 'package:traderscircuit/controller/products_controller.dart';
import 'package:traderscircuit/model/ProductsModel/call_recommendations_model.dart';
import 'package:traderscircuit/view/MainScreen/MainScreen.dart';
import 'package:traderscircuit/view/MainScreen/stockDetails/stock_details_screen.dart';
2024-03-19 22:57:32 -07:00
import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart';
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
import 'package:traderscircuit/view_model/ProductsApi/products_api.dart';
2024-03-19 22:57:32 -07:00
class ShortTrade extends StatefulWidget {
const ShortTrade({super.key});
@override
State<ShortTrade> createState() => _ShortTradeState();
}
class _ShortTradeState extends State<ShortTrade> {
final GlobalKey<ScaffoldState> _scaffoldKey1 = GlobalKey<ScaffoldState>();
List<String> containerTexts = ["Swing Trade", "Multibagger", "Options"];
ProductsController productsController = Get.put(ProductsController());
@override
void initState() {
productsController.isLoaded.value = true;
ProductsApi().getSwingTradeRecommendationsApi().then((value) {
productsController.swingTradeModel =
CallRecommendationsModel.fromJson(value.data);
ProductsApi().getMultibaggerRecommendationsApi().then((value) {
productsController.multibaggerModel =
CallRecommendationsModel.fromJson(value.data);
ProductsApi().getOptionsRecommendationsApi().then((value) {
productsController.optionModel =
CallRecommendationsModel.fromJson(value.data);
productsController.isLoaded.value = false;
});
});
});
super.initState();
}
2024-03-19 22:57:32 -07:00
@override
Widget build(BuildContext context) {
2024-04-16 16:43:11 +05:30
return WillPopScope(
onWillPop: () async {
_onBackButtonPressed(context);
return true; // Return true to allow the pop action
},
child: Scaffold(
key: _scaffoldKey1,
backgroundColor: Colors.black, drawerEnableOpenDragGesture: false,
drawer: const SideMenu(),
2024-04-16 16:43:11 +05:30
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,
),
2024-03-19 22:57:32 -07:00
),
),
2024-04-16 16:43:11 +05:30
// title: text22W600('Short'),
2024-03-19 22:57:32 -07:00
),
2024-03-19 23:09:10 -07:00
2024-04-16 16:43:11 +05:30
// 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,
// // ),
// ),
// ),j
body: Obx(
() => Stack(
children: [
const CommonBlurLeft(),
const CommonBlurRight(),
Stack(children: [
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16, vertical: 16),
child: ListView(
physics: const NeverScrollableScrollPhysics(),
children: [
sizedBoxHeight(15.h),
SizedBox(
height: 60,
width: double.infinity,
// color: Colors.amber,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
itemCount: containerTexts.length,
itemBuilder: (context, index) {
return GestureDetector(
onTap: () {
productsController.selectedIndex.value =
index;
},
child: Row(
children: [
topContainer(
containerTexts[index], index),
sizedBoxWidth(10.w)
],
),
);
}),
),
sizedBoxHeight(20.h),
productsController.isLoaded.value
? const Center(
child: CircularProgressIndicator(
2024-05-14 18:47:05 +05:30
color: Color(0xFF0093FF),
),
)
: DefaultTabController(
length: 2,
// initialIndex: selectedIndex.value,
child: Column(
2024-04-26 03:24:36 -07:00
children: [
MyTabBar(),
SizedBox(
height: 0.57.sh,
child: TabBarView(
children: [
ActiveCallsTab(productsController
.selectedIndex.value ==
0
? productsController
.swingTradeModel
: productsController
.selectedIndex
.value ==
1
? productsController
.multibaggerModel
: productsController
.optionModel),
ExitedCallsTab(productsController
.selectedIndex.value ==
0
? productsController
.swingTradeModel
: productsController
.selectedIndex
.value ==
1
? productsController
.multibaggerModel
: productsController
.optionModel),
],
),
),
2024-04-26 03:24:36 -07:00
],
),
),
sizedBoxHeight(20.h),
]))
])
],
),
2024-04-16 16:43:11 +05:30
),
bottomNavigationBar: bottomnavigationbar(mainController),
),
);
}
2024-04-16 16:43:11 +05:30
Future<bool> _onBackButtonPressed(BuildContext context) async {
bool? exitApp = await showDialog(
context: context,
builder: (context) {
return AlertDialog(
backgroundColor: const Color(0xFFFFF3E4),
title: const Text('Exit App'),
content: const Text('Do you really want to close the app?'),
actions: [
TextButton(
onPressed: () {
Navigator.of(context).pop(false);
},
child: const Text(
'No',
style: TextStyle(
color: Color(0xff1B243D),
),
),
),
TextButton(
onPressed: () {
SystemNavigator.pop();
Navigator.pop(context);
},
child: const Text(
'Yes',
style: TextStyle(
color: Color(0xff1B243D),
),
),
)
],
);
});
return exitApp ?? false;
}
Widget ActiveCallsTab(CallRecommendationsModel callRecommendationsModel) {
return callRecommendationsModel.data!.activeCalls!.isEmpty
? Center(
child: Column(
children: [
const Gap(200),
text22W600("No Data Available !"),
],
))
: ListView.builder(
itemCount: callRecommendationsModel.data!.activeCalls!.length,
itemBuilder: (ctx, index) {
return Padding(
padding: EdgeInsets.only(top: 20.h, bottom: 5.h),
child: productsController.selectedIndex.value == 0
? cardSwingWidget(
instrumentName: callRecommendationsModel
.data!.activeCalls![index].instrumentKey!,
pdfLink: "",
image: callRecommendationsModel
.data!.activeCalls![index].stockImage!,
text: callRecommendationsModel
.data!.activeCalls![index].stockName!,
2024-04-26 03:24:36 -07:00
amount: '₹ 196.50 - ₹ 197',
targetamount:
'${callRecommendationsModel.data!.activeCalls![index].targetPrice}',
stoploss:
'${callRecommendationsModel.data!.activeCalls![index].stopLoss}',
time:
'${callRecommendationsModel.data!.activeCalls![index].duration}',
action: callRecommendationsModel
.data!.activeCalls![index].actionData!.name!,
)
: productsController.selectedIndex.value == 1
? cardMultibaggerWidget(
instrumentName: callRecommendationsModel
.data!.activeCalls![index].instrumentKey!,
image: callRecommendationsModel
.data!.activeCalls![index].stockImage!,
action: callRecommendationsModel
.data!.activeCalls![index].actionData!.name!,
text: callRecommendationsModel
.data!.activeCalls![index].stockName!,
price:
"${callRecommendationsModel.data!.activeCalls![index].buyPrice}",
date: callRecommendationsModel
.data!.activeCalls![index].createdAt!,
returns:
"${callRecommendationsModel.data!.activeCalls![index].targetPrice}",
stoploss:
"${callRecommendationsModel.data!.activeCalls![index].stopLoss}",
duration: callRecommendationsModel
.data!.activeCalls![index].duration!,
pdfname: "Download Pdf",
2024-05-15 17:55:05 +05:30
pdfLink: callRecommendationsModel
.data!.activeCalls![index].docs!,
)
: cardOptionWidget(
instrumentName: callRecommendationsModel
.data!.activeCalls![index].instrumentKey!,
pdfLink: "",
image: callRecommendationsModel
.data!.activeCalls![index].stockImage!,
action: callRecommendationsModel
.data!.activeCalls![index].actionData!.name!,
text: callRecommendationsModel
.data!.activeCalls![index].stockName!,
optiontype: callRecommendationsModel.data!
.activeCalls![index].optionTypeData!.name!,
price:
"${callRecommendationsModel.data!.activeCalls![index].buyPrice}",
date: callRecommendationsModel
.data!.activeCalls![index].createdAt!,
premium:
"${callRecommendationsModel.data!.activeCalls![index].currentPrice}",
price1:
"${callRecommendationsModel.data!.activeCalls![index].targetPrice}",
stoploss:
"${callRecommendationsModel.data!.activeCalls![index].stopLoss}",
),
);
});
2024-03-19 22:57:32 -07:00
}
void _unlockbottomsheet() {
2024-03-21 00:32:12 -07:00
Get.bottomSheet(
2024-03-22 04:02:01 -07:00
commonGlassContainer(
width: double.infinity,
height: 439.h,
borderradius: 4,
customWidget: Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 35.w),
child: Column(
children: [
2024-03-22 04:02:01 -07:00
sizedBoxHeight(50.h),
// Image.asset(
// 'assets/images/png/Group 1000003722.png',
// height: 100.h,
// ),
// sizedBoxHeight(25.h),
text20W400('Please subscribed to unlock'),
sizedBoxHeight(30.h),
2024-03-22 04:02:01 -07:00
CommonBtn(
text: 'Subscribe Now',
onTap: () {},
),
const SizedBox(
height: 100,
)
],
),
),
2024-03-21 00:32:12 -07:00
),
),
backgroundColor: Colors.black.withOpacity(0.3),
);
}
Widget ExitedCallsTab(CallRecommendationsModel callRecommendationsModel) {
return callRecommendationsModel.data!.exitedCalls!.isEmpty
? Center(
child: Column(
children: [
const Gap(200),
text22W600("No Data Available !"),
],
))
: ListView.builder(
itemCount: callRecommendationsModel.data!.exitedCalls!.length,
itemBuilder: (ctx, index) {
return Padding(
padding: EdgeInsets.only(top: 20.h, bottom: 5.h),
child: productsController.selectedIndex.value == 0
? cardSwingWidget(
instrumentName: callRecommendationsModel
.data!.exitedCalls![index].instrumentKey!,
pdfLink: callRecommendationsModel
.data!.exitedCalls![index].docs!,
image: callRecommendationsModel
.data!.exitedCalls![index].stockImage!,
text: callRecommendationsModel
.data!.exitedCalls![index].stockName!,
amount: '₹ 196.50 - ₹ 197',
targetamount:
'${callRecommendationsModel.data!.exitedCalls![index].targetPrice}',
stoploss:
'${callRecommendationsModel.data!.exitedCalls![index].stopLoss}',
time:
'${callRecommendationsModel.data!.exitedCalls![index].duration}',
action: callRecommendationsModel
.data!.exitedCalls![index].actionData!.name!,
)
: productsController.selectedIndex.value == 1
? cardMultibaggerWidget(
instrumentName: callRecommendationsModel
.data!.exitedCalls![index].instrumentKey!,
image: callRecommendationsModel
.data!.exitedCalls![index].stockImage!,
action: callRecommendationsModel
.data!.exitedCalls![index].actionData!.name!,
text: callRecommendationsModel
.data!.exitedCalls![index].stockName!,
price:
"${callRecommendationsModel.data!.exitedCalls![index].buyPrice}",
date: callRecommendationsModel
.data!.exitedCalls![index].createdAt!,
returns:
"${callRecommendationsModel.data!.exitedCalls![index].targetPrice}",
stoploss:
"${callRecommendationsModel.data!.exitedCalls![index].stopLoss}",
duration: callRecommendationsModel
.data!.exitedCalls![index].duration!,
pdfname: "Download Pdf",
pdfLink: callRecommendationsModel
.data!.exitedCalls![index].docs!,
)
: cardOptionWidget(
instrumentName: callRecommendationsModel
.data!.exitedCalls![index].instrumentKey!,
pdfLink: callRecommendationsModel
.data!.exitedCalls![index].docs!,
image: callRecommendationsModel
.data!.exitedCalls![index].stockImage!,
action: callRecommendationsModel
.data!.exitedCalls![index].actionData!.name!,
text: callRecommendationsModel
.data!.exitedCalls![index].stockName!,
optiontype: callRecommendationsModel.data!
.exitedCalls![index].optionTypeData!.name!,
price:
"${callRecommendationsModel.data!.exitedCalls![index].buyPrice}",
date: callRecommendationsModel
.data!.exitedCalls![index].createdAt!,
premium:
"${callRecommendationsModel.data!.exitedCalls![index].currentPrice}",
price1:
"${callRecommendationsModel.data!.exitedCalls![index].targetPrice}",
stoploss:
"${callRecommendationsModel.data!.exitedCalls![index].stopLoss}",
),
);
});
}
Widget cardOptionWidget({
required String text,
required String optiontype,
required String price,
required String date,
required String premium,
required String price1,
required String stoploss,
required String action,
required String pdfLink,
required String image,
required String instrumentName,
}) {
ContactUsController contactUsController = Get.put(ContactUsController());
return InkWell(
onTap: () {
Get.to(const StockDetailsScreen(), arguments: {
"instrument_name": instrumentName,
});
},
child: Container(
padding: const EdgeInsets.all(15),
width: 398,
height: 300,
decoration: ShapeDecoration(
color: const Color(0x232C79ED),
shape: RoundedRectangleBorder(
side: const BorderSide(width: 1, color: Color(0x994A73FB)),
borderRadius: BorderRadius.circular(8),
),
2024-05-15 17:55:05 +05:30
),
child: Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CachedNetworkImage(
imageUrl: image,
width: 78.29,
height: 31,
2024-05-15 17:55:05 +05:30
),
const Gap(10),
text16W700(text),
const Spacer(),
Container(
width: 62.w,
height: 25.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.r),
color: action == "Buy"
? const Color(0xFF00FF19)
: action == "Exit"
? const Color(0Xff6C0000)
: const Color(0xFFFFCE00),
),
child: Center(
child: text14W600_1B1B1B(
action,
clr: action == "Exit"
? Colors.white
: const Color(0Xff1B1B1B),
)),
),
const Gap(15),
],
2024-03-19 22:57:32 -07:00
),
const Gap(30),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(optiontype),
sizedBoxHeight(5.h),
text12W400_979797('Option Type'),
],
),
const Gap(10),
Container(
width: 2,
height: 35,
color: Colors.white.withOpacity(0.30000001192092896),
),
const Gap(10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(price),
sizedBoxHeight(5.h),
text12W400_979797('Strike Price'),
],
),
const Gap(10),
Container(
width: 2,
height: 35,
color: Colors.white.withOpacity(0.30000001192092896),
),
const Gap(10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(
contactUsController.formatedDateMethod(date)),
sizedBoxHeight(5.h),
text12W400_979797('Expiry Date'),
],
),
],
),
const Gap(25),
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(price1),
sizedBoxHeight(5.h),
text12W400_979797('Target Price'),
],
),
const Gap(10),
Container(
width: 2,
height: 35,
color: Colors.white.withOpacity(0.30000001192092896),
),
const Gap(10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(stoploss),
sizedBoxHeight(5.h),
text12W400_979797('Stop Loss'),
],
),
],
),
const Gap(30),
Container(
width: 398,
height: 52,
decoration: const ShapeDecoration(
color: Color(0x332C79ED),
shape: RoundedRectangleBorder(
side: BorderSide(width: 1, color: Color(0x994A73FB)),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
text15W600(premium),
const Gap(5),
text14W400_979797('/ Premium'),
],
),
)
],
),
Positioned(
right: 0,
child:
SvgPicture.asset("assets/images/svg/card_decoration.svg"))
],
),
),
);
}
Widget cardMultibaggerWidget({
required String text,
required String price,
required String date,
required String returns,
required String stoploss,
required String duration,
required String pdfname,
required String action,
required String pdfLink,
required String image,
required String instrumentName,
}) {
2024-05-15 17:55:05 +05:30
ContactUsController contactUsController = Get.put(ContactUsController());
return InkWell(
onTap: () {
Get.to(const StockDetailsScreen(), arguments: {
"instrument_name": instrumentName,
});
},
child: Container(
padding: const EdgeInsets.all(15),
width: 398,
height: 300,
decoration: ShapeDecoration(
color: const Color(0x232C79ED),
shape: RoundedRectangleBorder(
side: const BorderSide(width: 1, color: Color(0x994A73FB)),
borderRadius: BorderRadius.circular(8),
),
2024-05-15 17:55:05 +05:30
),
child: Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CachedNetworkImage(
imageUrl: image,
width: 78.29,
height: 31,
2024-05-15 17:55:05 +05:30
),
const Gap(10),
text16W700(text),
const Spacer(),
Container(
width: 62.w,
height: 25.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.r),
color: action == "Buy"
? const Color(0xFF00FF19)
: action == "Exit"
? const Color(0Xff6C0000)
: const Color(0xFFFFCE00),
),
child: Center(
child: text14W600_1B1B1B(
action,
clr: action == "Exit"
? Colors.white
: const Color(0Xff1B1B1B),
)),
),
const Gap(15),
],
),
const Gap(30),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(price),
sizedBoxHeight(5.h),
text12W400_979797('Entry Price'),
],
),
const Gap(10),
Container(
width: 2,
height: 35,
color: Colors.white.withOpacity(0.30000001192092896),
),
const Gap(10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(
contactUsController.formatedDateMethod(date)),
sizedBoxHeight(5.h),
text12W400_979797('Date Of Recommendation'),
],
),
],
),
const Gap(25),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(returns),
sizedBoxHeight(5.h),
text12W400_979797('Target Price'),
],
),
const Gap(10),
Container(
width: 2,
height: 35,
color: Colors.white.withOpacity(0.30000001192092896),
),
const Gap(10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(stoploss),
sizedBoxHeight(5.h),
text12W400_979797('Stop Loss'),
],
),
const Gap(10),
Container(
width: 2,
height: 35,
color: Colors.white.withOpacity(0.30000001192092896),
),
const Gap(10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(duration),
sizedBoxHeight(5.h),
text12W400_979797('Duration'),
],
),
],
),
const Gap(30),
GestureDetector(
onTap: () {
Utils.openFile(
url: pdfLink, fileName: "${text}_report.pdf");
},
child: Container(
width: 398,
height: 52,
decoration: const ShapeDecoration(
color: Color(0x332C79ED),
shape: RoundedRectangleBorder(
side: BorderSide(width: 1, color: Color(0x994A73FB)),
2024-05-15 17:55:05 +05:30
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
'assets/images/png/pdf.png',
height: 20.h,
width: 20.w,
),
Gap(8),
text15W600("Download Pdf"),
],
),
2024-05-15 17:55:05 +05:30
),
)
],
),
Positioned(
right: 0,
child:
SvgPicture.asset("assets/images/svg/card_decoration.svg"))
],
),
),
);
}
Widget cardSwingWidget({
required String image,
required String text,
required String amount,
required String targetamount,
required String stoploss,
required String time,
required String pdfLink,
required String action,
required String instrumentName,
}) {
return InkWell(
onTap: () {
Get.to(const StockDetailsScreen(), arguments: {
"instrument_name": instrumentName,
});
},
child: Container(
padding: const EdgeInsets.all(15),
width: 398,
height: 285,
decoration: ShapeDecoration(
color: const Color(0x232C79ED),
shape: RoundedRectangleBorder(
side: const BorderSide(width: 1, color: Color(0x994A73FB)),
borderRadius: BorderRadius.circular(8),
),
2024-05-15 17:55:05 +05:30
),
child: Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CachedNetworkImage(
imageUrl: image,
width: 78.29,
height: 31,
2024-05-14 18:47:05 +05:30
),
const Gap(10),
Container(
width: 2,
height: 35,
color: Colors.white.withOpacity(0.30000001192092896),
),
const Gap(10),
text16W700(text),
const Spacer(),
Container(
width: 62.w,
height: 25.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.r),
color: action == "Buy"
? const Color(0xFF00FF19)
: action == "Exit"
? const Color(0Xff6C0000)
: const Color(0xFFFFCE00),
),
child: Center(
child: text14W600_1B1B1B(
action,
clr: action == "Exit"
? Colors.white
: const Color(0Xff1B1B1B),
)),
),
const Gap(15),
],
2024-05-15 17:55:05 +05:30
),
const Gap(30),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
2024-05-15 17:55:05 +05:30
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(amount),
sizedBoxHeight(5.h),
text12W400_979797('Entry Price'),
],
),
const Gap(10),
Container(
width: 2,
height: 35,
color: Colors.white.withOpacity(0.30000001192092896),
),
const Gap(10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(targetamount),
sizedBoxHeight(5.h),
text12W400_979797('Target Price'),
],
),
// const Gap(10),
// Container(
// width: 2,
// height: 35,
// color: Colors.white.withOpacity(0.30000001192092896),
// ),
// const Gap(10),
2024-05-15 17:55:05 +05:30
],
),
const Gap(10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text15W600(stoploss),
sizedBoxHeight(5.h),
text12W400_979797('Stop Loss'),
],
),
const Gap(30),
Container(
width: 398,
height: 52,
decoration: const ShapeDecoration(
color: Color(0x332C79ED),
shape: RoundedRectangleBorder(
side: BorderSide(width: 1, color: Color(0x994A73FB)),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
text15W600(time),
const Gap(5),
text14W400_979797('/ Time Horizon'),
],
),
)
],
),
Positioned(
right: 0,
child:
SvgPicture.asset("assets/images/svg/card_decoration.svg"))
],
),
2024-03-19 22:57:32 -07:00
),
);
}
Widget topContainer(String text, int index) {
return Obx(() {
return productsController.selectedIndex.value == index
2024-03-19 22:57:32 -07:00
? Container(
height: 40.h,
width: 126.w,
2024-03-19 22:57:32 -07:00
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
2024-05-10 13:19:19 +05:30
color: const Color(0Xff0093FF),
2024-03-19 22:57:32 -07:00
),
child: Center(child: text16W500(text)),
2024-03-19 22:57:32 -07:00
)
: commonGlassContainer(
width: 126.w,
height: 40.h,
2024-03-19 22:57:32 -07:00
borderradius: 5,
customWidget: Center(child: text16W400(text)),
2024-03-19 22:57:32 -07:00
);
});
}
}