added stock details screen and api integration
This commit is contained in:
@@ -18,6 +18,7 @@ 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';
|
||||
import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
import 'package:traderscircuit/view_model/ProductsApi/products_api.dart';
|
||||
@@ -107,7 +108,7 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
// // size: 27.sp,
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
// ),j
|
||||
body: Obx(
|
||||
() => Stack(
|
||||
children: [
|
||||
@@ -259,6 +260,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
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!,
|
||||
@@ -276,6 +279,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
)
|
||||
: productsController.selectedIndex.value == 1
|
||||
? cardMultibaggerWidget(
|
||||
instrumentName: callRecommendationsModel
|
||||
.data!.activeCalls![index].instrumentKey!,
|
||||
image: callRecommendationsModel
|
||||
.data!.activeCalls![index].stockImage!,
|
||||
action: callRecommendationsModel
|
||||
@@ -297,6 +302,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
.data!.activeCalls![index].docs!,
|
||||
)
|
||||
: cardOptionWidget(
|
||||
instrumentName: callRecommendationsModel
|
||||
.data!.activeCalls![index].instrumentKey!,
|
||||
pdfLink: "",
|
||||
image: callRecommendationsModel
|
||||
.data!.activeCalls![index].stockImage!,
|
||||
@@ -373,6 +380,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
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
|
||||
@@ -391,6 +400,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
)
|
||||
: productsController.selectedIndex.value == 1
|
||||
? cardMultibaggerWidget(
|
||||
instrumentName: callRecommendationsModel
|
||||
.data!.exitedCalls![index].instrumentKey!,
|
||||
image: callRecommendationsModel
|
||||
.data!.exitedCalls![index].stockImage!,
|
||||
action: callRecommendationsModel
|
||||
@@ -412,6 +423,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
.data!.exitedCalls![index].docs!,
|
||||
)
|
||||
: cardOptionWidget(
|
||||
instrumentName: callRecommendationsModel
|
||||
.data!.exitedCalls![index].instrumentKey!,
|
||||
pdfLink: callRecommendationsModel
|
||||
.data!.exitedCalls![index].docs!,
|
||||
image: callRecommendationsModel
|
||||
@@ -448,155 +461,165 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
required String action,
|
||||
required String pdfLink,
|
||||
required String image,
|
||||
required String instrumentName,
|
||||
}) {
|
||||
ContactUsController contactUsController = Get.put(ContactUsController());
|
||||
return 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),
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CachedNetworkImage(
|
||||
imageUrl: image,
|
||||
width: 78.29,
|
||||
height: 31,
|
||||
),
|
||||
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(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,
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text15W600(premium),
|
||||
const Gap(5),
|
||||
text14W400_979797('/ Premium'),
|
||||
CachedNetworkImage(
|
||||
imageUrl: image,
|
||||
width: 78.29,
|
||||
height: 31,
|
||||
),
|
||||
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),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Positioned(
|
||||
right: 0,
|
||||
child: SvgPicture.asset("assets/images/svg/card_decoration.svg"))
|
||||
],
|
||||
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"))
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -612,164 +635,176 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
required String action,
|
||||
required String pdfLink,
|
||||
required String image,
|
||||
required String instrumentName,
|
||||
}) {
|
||||
ContactUsController contactUsController = Get.put(ContactUsController());
|
||||
return 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),
|
||||
),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CachedNetworkImage(
|
||||
imageUrl: image,
|
||||
width: 78.29,
|
||||
height: 31,
|
||||
),
|
||||
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)),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/pdf.png',
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
),
|
||||
text15W600("Download Pdf"),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
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),
|
||||
),
|
||||
Positioned(
|
||||
right: 0,
|
||||
child: SvgPicture.asset("assets/images/svg/card_decoration.svg"))
|
||||
],
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CachedNetworkImage(
|
||||
imageUrl: image,
|
||||
width: 78.29,
|
||||
height: 31,
|
||||
),
|
||||
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)),
|
||||
),
|
||||
),
|
||||
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"),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Positioned(
|
||||
right: 0,
|
||||
child:
|
||||
SvgPicture.asset("assets/images/svg/card_decoration.svg"))
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -783,133 +818,142 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
required String time,
|
||||
required String pdfLink,
|
||||
required String action,
|
||||
required String instrumentName,
|
||||
}) {
|
||||
return 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),
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CachedNetworkImage(
|
||||
imageUrl: image,
|
||||
width: 78.29,
|
||||
height: 31,
|
||||
),
|
||||
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),
|
||||
],
|
||||
),
|
||||
const Gap(30),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
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),
|
||||
],
|
||||
),
|
||||
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,
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text15W600(time),
|
||||
const Gap(5),
|
||||
text14W400_979797('/ Time Horizon'),
|
||||
CachedNetworkImage(
|
||||
imageUrl: image,
|
||||
width: 78.29,
|
||||
height: 31,
|
||||
),
|
||||
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),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Positioned(
|
||||
right: 0,
|
||||
child: SvgPicture.asset("assets/images/svg/card_decoration.svg"))
|
||||
],
|
||||
const Gap(30),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
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),
|
||||
],
|
||||
),
|
||||
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"))
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
383
lib/view/MainScreen/stockDetails/stock_details_screen.dart
Normal file
383
lib/view/MainScreen/stockDetails/stock_details_screen.dart
Normal file
@@ -0,0 +1,383 @@
|
||||
import 'dart:developer' as dv;
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:get/get.dart' hide FormData;
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/Utils/utils.dart';
|
||||
import 'package:traderscircuit/model/StockDetailsModel/stock_details_model.dart';
|
||||
import 'package:traderscircuit/view_model/StockDetailsApi/stock_details_api.dart';
|
||||
|
||||
import 'dart:math';
|
||||
import '../../../Utils/Common/CommonAppBar.dart';
|
||||
import '../../onBoarding/splashScreen1.dart';
|
||||
|
||||
class StockDetailsScreen extends StatefulWidget {
|
||||
const StockDetailsScreen({super.key});
|
||||
|
||||
@override
|
||||
State<StockDetailsScreen> createState() => _StockDetailsScreenState();
|
||||
}
|
||||
|
||||
class _StockDetailsScreenState extends State<StockDetailsScreen> {
|
||||
RxBool isLoading = true.obs;
|
||||
StockDetailsModel? stockDetailsModel;
|
||||
@override
|
||||
void initState() {
|
||||
String instrumentName = Get.arguments["instrument_name"];
|
||||
dv.log(instrumentName);
|
||||
StockDetailsApi()
|
||||
.getStockDetails(
|
||||
FormData.fromMap({"upstox_instrument_key": instrumentName}))
|
||||
.then((value) {
|
||||
final Map<String, dynamic> data = value.data;
|
||||
|
||||
Map<String, dynamic> data1 = data["data"]['stock_data']['data'];
|
||||
String dynamicKey = data1.keys.first;
|
||||
// Access nested data using dynamic key
|
||||
Map<String, dynamic> dynamicData = data1[dynamicKey];
|
||||
|
||||
List<Candles>? candles = [];
|
||||
|
||||
for (var a in data["data"]['candle_stick']["data"]["candles"]) {
|
||||
candles.add(Candles(
|
||||
timestamp: a[0],
|
||||
open: a[1].toDouble(),
|
||||
high: a[2].toDouble(),
|
||||
low: a[3].toDouble(),
|
||||
close: a[4].toDouble(),
|
||||
volume: a[5].toInt(),
|
||||
openInterest: a[6],
|
||||
));
|
||||
}
|
||||
|
||||
stockDetailsModel = StockDetailsModel(
|
||||
status: data["status"],
|
||||
message: data["message"],
|
||||
statusCode: data["status_code"],
|
||||
data: Data(
|
||||
stockData: StockInfo(
|
||||
ohlc: Ohlc.fromJson(dynamicData['ohlc']),
|
||||
averagePrice: dynamicData['average_price'],
|
||||
instrumentToken: dynamicData['instrument_token'],
|
||||
lastPrice: dynamicData['last_price'].toDouble(),
|
||||
lastTradeTime: dynamicData['last_trade_time'],
|
||||
lowerCircuitLimit: dynamicData['lower_circuit_limit'],
|
||||
netChange: dynamicData['net_change'],
|
||||
oi: dynamicData['oi'],
|
||||
oiDayHigh: dynamicData['oi_day_high'],
|
||||
oiDayLow: dynamicData['oi_day_low'],
|
||||
symbol: dynamicData['symbol'],
|
||||
timestamp: dynamicData['timestamp'],
|
||||
totalBuyQuantity: dynamicData['total_buy_quantity'],
|
||||
totalSellQuantity: dynamicData['total_sell_quantity'],
|
||||
upperCircuitLimit: dynamicData['upper_circuit_limit'],
|
||||
volume: dynamicData['volume'],
|
||||
),
|
||||
candleStick: CandleStick(candles: candles),
|
||||
optionChain: OptionChain.fromJson(data["data"]['option_chain'])));
|
||||
|
||||
isLoading.value = false;
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
drawerEnableOpenDragGesture: false,
|
||||
extendBody: true,
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "",
|
||||
),
|
||||
body: Obx(() => Stack(children: [
|
||||
const CommonBlurLeft(),
|
||||
const CommonBlurRight(),
|
||||
isLoading.value
|
||||
? const Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Color(0xFF0093FF),
|
||||
),
|
||||
)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16W700(
|
||||
stockDetailsModel!.data!.stockData!.symbol!),
|
||||
const Gap(14),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
text25W600(
|
||||
"₹${stockDetailsModel!.data!.stockData!.averagePrice!.toString()}"),
|
||||
Container(
|
||||
width: 145,
|
||||
height: 40,
|
||||
decoration: ShapeDecoration(
|
||||
color: const Color(0xFF0093FF),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
"assets/images/svg/option_chain_icon.svg"),
|
||||
const Gap(5),
|
||||
text12W600("Option Chain"),
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
const Gap(8),
|
||||
text12W400(
|
||||
"${stockDetailsModel!.data!.stockData!.netChange} 1D"),
|
||||
const Gap(55),
|
||||
Container(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 15),
|
||||
width: Get.width,
|
||||
height: 220,
|
||||
color: Colors.transparent,
|
||||
child: LineChart(
|
||||
LineChartData(
|
||||
lineTouchData: LineTouchData(
|
||||
touchTooltipData: LineTouchTooltipData(
|
||||
fitInsideHorizontally: true,
|
||||
fitInsideVertically: true,
|
||||
tooltipRoundedRadius: 24,
|
||||
getTooltipItems: (
|
||||
List<LineBarSpot> touchedBarSpots,
|
||||
) {
|
||||
return touchedBarSpots.map((barSpot) {
|
||||
return LineTooltipItem(
|
||||
"₹ ${Utils.removeDecimal(
|
||||
Utils.extractPriceFromGraph(
|
||||
stockDetailsModel!
|
||||
.data!
|
||||
.candleStick!
|
||||
.candles!)[
|
||||
barSpot.x.toInt()]
|
||||
.toStringAsFixed(2),
|
||||
).replaceAllMapped(
|
||||
RegExp(
|
||||
r'(\d{1,3})(?=(\d{3})+(?!\d))',
|
||||
),
|
||||
(Match m) => '${m[1]},',
|
||||
)}",
|
||||
const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
);
|
||||
}).toList();
|
||||
},
|
||||
),
|
||||
),
|
||||
gridData: FlGridData(
|
||||
show: true,
|
||||
drawVerticalLine: false,
|
||||
drawHorizontalLine: false,
|
||||
horizontalInterval: 4,
|
||||
getDrawingHorizontalLine: (value) {
|
||||
return const FlLine(
|
||||
color: Color(
|
||||
0xff37434d,
|
||||
),
|
||||
strokeWidth: 1,
|
||||
);
|
||||
},
|
||||
getDrawingVerticalLine: (value) {
|
||||
return const FlLine(
|
||||
color: Color(
|
||||
0xff0093FF,
|
||||
),
|
||||
strokeWidth: 1,
|
||||
);
|
||||
},
|
||||
),
|
||||
titlesData: const FlTitlesData(
|
||||
show: false,
|
||||
),
|
||||
borderData: FlBorderData(
|
||||
show: false,
|
||||
),
|
||||
minX: 0,
|
||||
maxX: (stockDetailsModel!
|
||||
.data!.candleStick!.candles!.length
|
||||
.toDouble()) -
|
||||
1,
|
||||
minY: Utils.extractPriceFromGraph(
|
||||
stockDetailsModel!
|
||||
.data!.candleStick!.candles!)
|
||||
.reduce(min)
|
||||
.toDouble(),
|
||||
maxY: Utils.extractPriceFromGraph(
|
||||
stockDetailsModel!
|
||||
.data!.candleStick!.candles!)
|
||||
.reduce(max)
|
||||
.toDouble(),
|
||||
lineBarsData: [
|
||||
LineChartBarData(
|
||||
color: const Color(0xFF0093FF),
|
||||
spots: listData(
|
||||
Utils.extractPriceFromGraph(
|
||||
stockDetailsModel!
|
||||
.data!.candleStick!.candles!),
|
||||
),
|
||||
barWidth: 3,
|
||||
isStrokeCapRound: true,
|
||||
dotData: const FlDotData(
|
||||
show: false,
|
||||
),
|
||||
belowBarData: BarAreaData(
|
||||
show: true,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
const Color(
|
||||
0xFF0093FF,
|
||||
).withOpacity(.01),
|
||||
const Color(
|
||||
0xFF0093FF,
|
||||
).withOpacity(.3),
|
||||
],
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(20),
|
||||
text18W400("Overview"),
|
||||
const Gap(15),
|
||||
text20W400("Performance"),
|
||||
const Gap(22),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16W400('Today’s Low',
|
||||
clr: Color(0xFFF979797)),
|
||||
Gap(5),
|
||||
text16W500(
|
||||
stockDetailsModel!
|
||||
.data!.stockData!.ohlc!.low!
|
||||
.toString(),
|
||||
)
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
text16W400('Today’s High',
|
||||
clr: Color(0xFFF979797)),
|
||||
Gap(5),
|
||||
text16W500(
|
||||
stockDetailsModel!
|
||||
.data!.stockData!.ohlc!.high!
|
||||
.toString(),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
Gap(40),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16W400('Open price',
|
||||
clr: Color(0xFFF979797)),
|
||||
Gap(5),
|
||||
text16W500(
|
||||
stockDetailsModel!
|
||||
.data!.stockData!.ohlc!.open
|
||||
.toString(),
|
||||
)
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16W400('Prev. Close',
|
||||
clr: Color(0xFFF979797)),
|
||||
Gap(5),
|
||||
text16W500(
|
||||
stockDetailsModel!
|
||||
.data!.candleStick!.candles![0].close
|
||||
.toString(),
|
||||
)
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16W400('Volume', clr: Color(0xFFF979797)),
|
||||
Gap(5),
|
||||
text16W500(
|
||||
stockDetailsModel!.data!.stockData!.volume
|
||||
.toString(),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
Gap(25),
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16W400('Lower Circuit',
|
||||
clr: Color(0xFFF979797)),
|
||||
Gap(5),
|
||||
text16W500(
|
||||
stockDetailsModel!
|
||||
.data!.stockData!.lowerCircuitLimit
|
||||
.toString(),
|
||||
)
|
||||
],
|
||||
),
|
||||
Gap(25),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16W400('Upper Circuit',
|
||||
clr: Color(0xFFF979797)),
|
||||
Gap(5),
|
||||
text16W500(
|
||||
stockDetailsModel!
|
||||
.data!.stockData!.upperCircuitLimit
|
||||
.toString(),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
Gap(25),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
])),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
List<FlSpot> listData(List<num> data) {
|
||||
return data.asMap().entries.map((e) {
|
||||
return FlSpot(e.key.toDouble(), e.value.toDouble());
|
||||
}).toList();
|
||||
}
|
||||
Reference in New Issue
Block a user