Merge branch 'main' into product
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:cached_network_image/cached_network_image.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:gap/gap.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -11,6 +12,7 @@ import 'package:traderscircuit/Utils/Common/commonBotton.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/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';
|
||||
@@ -27,7 +29,7 @@ class ShortTrade extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _ShortTradeState extends State<ShortTrade> {
|
||||
GlobalKey<ScaffoldState> _scaffoldKey1 = GlobalKey<ScaffoldState>();
|
||||
final GlobalKey<ScaffoldState> _scaffoldKey1 = GlobalKey<ScaffoldState>();
|
||||
List<String> containerTexts = ["Swing Trade", "Multibagger", "Options"];
|
||||
ProductsController productsController = Get.put(ProductsController());
|
||||
|
||||
@@ -256,6 +258,7 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
padding: EdgeInsets.only(top: 20.h, bottom: 5.h),
|
||||
child: productsController.selectedIndex.value == 0
|
||||
? cardSwingWidget(
|
||||
pdfLink: "",
|
||||
image: callRecommendationsModel
|
||||
.data!.activeCalls![index].stockImage!,
|
||||
text: callRecommendationsModel
|
||||
@@ -289,8 +292,10 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
duration: callRecommendationsModel
|
||||
.data!.activeCalls![index].duration!,
|
||||
pdfname: "Download Pdf",
|
||||
pdfLink: "",
|
||||
)
|
||||
: cardOptionWidget(
|
||||
pdfLink: "",
|
||||
image: callRecommendationsModel
|
||||
.data!.activeCalls![index].stockImage!,
|
||||
action: callRecommendationsModel
|
||||
@@ -366,6 +371,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
padding: EdgeInsets.only(top: 20.h, bottom: 5.h),
|
||||
child: productsController.selectedIndex.value == 0
|
||||
? cardSwingWidget(
|
||||
pdfLink: callRecommendationsModel
|
||||
.data!.exitedCalls![index].docs!,
|
||||
image: callRecommendationsModel
|
||||
.data!.exitedCalls![index].stockImage!,
|
||||
text: callRecommendationsModel
|
||||
@@ -399,8 +406,12 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
duration: callRecommendationsModel
|
||||
.data!.exitedCalls![index].duration!,
|
||||
pdfname: "Download Pdf",
|
||||
pdfLink: callRecommendationsModel
|
||||
.data!.exitedCalls![index].docs!,
|
||||
)
|
||||
: cardOptionWidget(
|
||||
pdfLink: callRecommendationsModel
|
||||
.data!.exitedCalls![index].docs!,
|
||||
image: callRecommendationsModel
|
||||
.data!.exitedCalls![index].stockImage!,
|
||||
action: callRecommendationsModel
|
||||
@@ -433,12 +444,13 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
required String price1,
|
||||
required String stoploss,
|
||||
required String action,
|
||||
required String pdfLink,
|
||||
required String image,
|
||||
}) {
|
||||
ContactUsController contactUsController = Get.put(ContactUsController());
|
||||
return commonGlassContainer(
|
||||
width: double.infinity,
|
||||
height: 400.h,
|
||||
height: action != "Exit" ? 330.h : 380.h,
|
||||
borderradius: 8,
|
||||
customWidget: Column(
|
||||
children: [
|
||||
@@ -487,9 +499,15 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
color: action == "Buy"
|
||||
? const Color(0xFF00FF19)
|
||||
: const Color(0xFFFFAD31),
|
||||
: action == "Exit"
|
||||
? const Color(0Xff6C0000)
|
||||
: const Color(0xFFFFAD31),
|
||||
),
|
||||
child: Center(child: text14W600_1B1B1B(action)),
|
||||
child: Center(
|
||||
child: text14W600_1B1B1B(action,
|
||||
clr: action == "Exit"
|
||||
? Colors.white
|
||||
: const Color(0Xff1B1B1B))),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -536,8 +554,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
sizedBoxHeight(5.h),
|
||||
SizedBox(
|
||||
width: 150.w,
|
||||
child: text15W600(contactUsController
|
||||
.formatedDateTimeMethod(date)))
|
||||
child: text15W600(
|
||||
productsController.dateConverterMethod(date)))
|
||||
],
|
||||
),
|
||||
sizedBoxWidth(30.w),
|
||||
@@ -573,6 +591,32 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
)
|
||||
],
|
||||
),
|
||||
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"),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
@@ -590,6 +634,7 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
required String duration,
|
||||
required String pdfname,
|
||||
required String action,
|
||||
required String pdfLink,
|
||||
required String image,
|
||||
}) {
|
||||
return commonGlassContainer(
|
||||
@@ -643,9 +688,15 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
color: action == "Buy"
|
||||
? const Color(0xFF00FF19)
|
||||
: const Color(0xFFFFAD31),
|
||||
: action == "Exit"
|
||||
? const Color(0Xff6C0000)
|
||||
: const Color(0xFFFFAD31),
|
||||
),
|
||||
child: Center(child: text14W600_1B1B1B(action)),
|
||||
child: Center(
|
||||
child: text14W600_1B1B1B(action,
|
||||
clr: action == "Exit"
|
||||
? Colors.white
|
||||
: const Color(0Xff1B1B1B))),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -717,23 +768,32 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
],
|
||||
),
|
||||
sizedBoxWidth(30.w),
|
||||
// Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// text14W400_979797('Report'),
|
||||
// sizedBoxHeight(5.h),
|
||||
// Row(
|
||||
// children: [
|
||||
// Image.asset(
|
||||
// 'assets/images/png/pdf.png',
|
||||
// height: 20.h,
|
||||
// width: 20.w,
|
||||
// ),
|
||||
// text15W600(pdfname),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// )
|
||||
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(pdfname),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -751,11 +811,12 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
required String targetamount,
|
||||
required String stoploss,
|
||||
required String time,
|
||||
required String pdfLink,
|
||||
required String action,
|
||||
}) {
|
||||
return commonGlassContainer(
|
||||
width: double.infinity,
|
||||
height: 260.h,
|
||||
height: action != "Exit" ? 250.h : 300.h,
|
||||
borderradius: 8,
|
||||
customWidget: Column(
|
||||
children: [
|
||||
@@ -800,9 +861,17 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
color: action == "Buy"
|
||||
? const Color(0xFF00FF19)
|
||||
: const Color(0xFFFFAD31),
|
||||
: action == "Exit"
|
||||
? const Color(0Xff6C0000)
|
||||
: const Color(0xFFFFAD31),
|
||||
),
|
||||
child: Center(child: text14W600_1B1B1B(action)),
|
||||
child: Center(
|
||||
child: text14W600_1B1B1B(
|
||||
action,
|
||||
clr: action == "Exit"
|
||||
? Colors.white
|
||||
: const Color(0Xff1B1B1B),
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -859,6 +928,32 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
)
|
||||
],
|
||||
),
|
||||
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"),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user