product recommendations api integration - pending
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
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';
|
||||
|
||||
@@ -19,13 +16,13 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) {
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
borderGradient: LinearGradient(
|
||||
borderGradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
@@ -36,18 +33,18 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) {
|
||||
child: BottomNavigationBar(
|
||||
// backgroundColor: ,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
backgroundColor: Color(0xFFFFFFFF).withOpacity(0),
|
||||
backgroundColor: const Color(0xFFFFFFFF).withOpacity(0),
|
||||
showUnselectedLabels: true,
|
||||
selectedItemColor: Colors.white,
|
||||
unselectedItemColor: Color(0xFF676767),
|
||||
unselectedItemColor: const Color(0xFF676767),
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF676767),
|
||||
color: const Color(0xFF676767),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'hiragino'),
|
||||
selectedLabelStyle: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFFFFFFFF),
|
||||
color: const Color(0xFFFFFFFF),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'hiragino'),
|
||||
currentIndex: _mainController.selectedIndex.value,
|
||||
@@ -78,7 +75,7 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) {
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
spreadRadius: 15,
|
||||
blurRadius: 10,
|
||||
offset: Offset(0, 10),
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -121,7 +118,7 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) {
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
spreadRadius: 15,
|
||||
blurRadius: 10,
|
||||
offset: Offset(0, 10),
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -163,7 +160,7 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) {
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
spreadRadius: 15,
|
||||
blurRadius: 10,
|
||||
offset: Offset(0, 10),
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -205,7 +202,7 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) {
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
spreadRadius: 15,
|
||||
blurRadius: 10,
|
||||
offset: Offset(0, 10),
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:traderscircuit/view/MainScreen/HomeScreen.dart';
|
||||
import 'package:traderscircuit/view/MainScreen/PastPerformance.dart';
|
||||
import 'package:traderscircuit/view/MainScreen/Portfolio/Holdings.dart';
|
||||
import 'package:traderscircuit/view/MainScreen/Portfolio/PortfolioEmpty.dart';
|
||||
import 'package:traderscircuit/view/MainScreen/ShortTrade.dart';
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
|
||||
Widget commonGlassContainer(
|
||||
@@ -19,14 +18,14 @@ Widget commonGlassContainer(
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
borderGradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:traderscircuit/Utils/Common/sized_box.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
|
||||
class NoInternet extends StatefulWidget {
|
||||
const NoInternet({super.key});
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:traderscircuit/model/ContactUsModel/contact_us_cat_model.dart';
|
||||
import 'package:traderscircuit/model/ContactUsModel/contact_us_model.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../model/ContactUsModel/ticket_details_model.dart';
|
||||
|
||||
@@ -20,7 +19,7 @@ class ContactUsController extends GetxController {
|
||||
//contact us page controller
|
||||
RxList<File?> attachmentFileList = [File("")].obs;
|
||||
RxList<String> attachmentPathNameList = [""].obs;
|
||||
RxList<dynamic> contactUsDetailsChatContent = [].obs;
|
||||
RxList<dynamic> contactUsDetailsChatContent = [].obs;
|
||||
//contact us details page controller
|
||||
RxList<File?> attachmentFileDetailsList = [File("")].obs;
|
||||
RxList<String> attachmentPathNameDetailsList = [""].obs;
|
||||
@@ -30,13 +29,10 @@ class ContactUsController extends GetxController {
|
||||
|
||||
RxString selectedValue = "".obs;
|
||||
|
||||
|
||||
|
||||
//formated date
|
||||
String formatedDateTimeMethod(String originalDateTimeString) {
|
||||
DateTime dateTime = DateTime.parse(originalDateTimeString);
|
||||
|
||||
return DateFormat("dd MMM yyyy, hh:mm a").format(dateTime.toLocal());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:just_audio/just_audio.dart';
|
||||
import 'package:traderscircuit/Utils/base_manager.dart';
|
||||
import 'package:traderscircuit/model/ContentBytesModel/content_bytes_categories_model.dart';
|
||||
import 'package:traderscircuit/model/ContentBytesModel/content_bytes_model.dart';
|
||||
import 'package:traderscircuit/view_model/ContentBytesApi/content_bytes_api.dart';
|
||||
|
||||
import '../view/Sidemenu/ContentByte/ContentBytes.dart';
|
||||
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:traderscircuit/model/ProductsModel/call_recommendations_model.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class ProductsController extends GetxController {
|
||||
RxBool isLoaded = true.obs;
|
||||
CallRecommendationsModel swingTradeModel = CallRecommendationsModel();
|
||||
CallRecommendationsModel multibaggerModel = CallRecommendationsModel();
|
||||
CallRecommendationsModel optionModel = CallRecommendationsModel();
|
||||
|
||||
final selectedIndex = 0.obs;
|
||||
String dateConverterMethod(String dateV) {
|
||||
DateTime dateTime = DateTime.parse(dateV);
|
||||
DateTime newDateTime = DateTime(dateTime.year, 3, 25);
|
||||
return DateFormat("dd MMMM yyyy").format(newDateTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:traderscircuit/Utils/utils.dart';
|
||||
import '../../Utils/base_manager.dart';
|
||||
import 'base_api_services.dart';
|
||||
|
||||
class NetworkApiServices {
|
||||
Dio dio = Dio();
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class FAQModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
|
||||
@@ -10,6 +10,7 @@ import 'package:traderscircuit/Utils/Common/CommonTabBar.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/controller/products_controller.dart';
|
||||
import 'package:traderscircuit/resources/routes/route_name.dart';
|
||||
import 'package:traderscircuit/view/MainScreen/MainScreen.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/ContentByte/PlayerWidget.dart';
|
||||
@@ -28,6 +29,7 @@ class HomeScreen extends StatefulWidget {
|
||||
class _HomeScreenState extends State<HomeScreen> {
|
||||
GlobalKey<ScaffoldState> _scaffoldKey1 = GlobalKey<ScaffoldState>();
|
||||
RxString userName = "User".obs;
|
||||
ProductsController productsController = Get.put(ProductsController());
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -132,20 +134,44 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ProductWidget(
|
||||
text: 'Options', subtext: 'Recommendation'),
|
||||
ProductWidget(
|
||||
text: 'Multibagger', subtext: 'Recommendation')
|
||||
InkWell(
|
||||
onTap: () {
|
||||
mainController.selectedIndex.value = 1;
|
||||
productsController.selectedIndex.value = 2;
|
||||
},
|
||||
child: ProductWidget(
|
||||
text: 'Options', subtext: 'Recommendation'),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
mainController.selectedIndex.value = 1;
|
||||
productsController.selectedIndex.value = 1;
|
||||
},
|
||||
child: 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'),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
mainController.selectedIndex.value = 1;
|
||||
productsController.selectedIndex.value = 0;
|
||||
},
|
||||
child: ProductWidget(
|
||||
text: 'Swing Trade', subtext: 'Recommendation'),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
mainController.selectedIndex.value = 1;
|
||||
productsController.selectedIndex.value = 0;
|
||||
},
|
||||
child: ProductWidget(
|
||||
text: 'OP + MB + ST', subtext: 'Recommendation'),
|
||||
),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
|
||||
@@ -28,7 +28,6 @@ class ShortTrade extends StatefulWidget {
|
||||
class _ShortTradeState extends State<ShortTrade> {
|
||||
GlobalKey<ScaffoldState> _scaffoldKey1 = GlobalKey<ScaffoldState>();
|
||||
List<String> containerTexts = ["Swing Trade", "Multibagger", "Options"];
|
||||
final selectedIndex = 0.obs;
|
||||
ProductsController productsController = Get.put(ProductsController());
|
||||
|
||||
@override
|
||||
@@ -129,7 +128,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
itemBuilder: (context, index) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
selectedIndex.value = index;
|
||||
productsController.selectedIndex.value =
|
||||
index;
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
@@ -158,24 +158,32 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
height: 700.h,
|
||||
child: TabBarView(
|
||||
children: [
|
||||
ActiveCallsTab(
|
||||
selectedIndex.value == 0
|
||||
ActiveCallsTab(productsController
|
||||
.selectedIndex.value ==
|
||||
0
|
||||
? productsController
|
||||
.swingTradeModel
|
||||
: productsController
|
||||
.selectedIndex
|
||||
.value ==
|
||||
1
|
||||
? productsController
|
||||
.swingTradeModel
|
||||
: selectedIndex.value == 1
|
||||
? productsController
|
||||
.multibaggerModel
|
||||
: productsController
|
||||
.optionModel),
|
||||
ExitedCallsTab(
|
||||
selectedIndex.value == 0
|
||||
.multibaggerModel
|
||||
: productsController
|
||||
.optionModel),
|
||||
ExitedCallsTab(productsController
|
||||
.selectedIndex.value ==
|
||||
0
|
||||
? productsController
|
||||
.swingTradeModel
|
||||
: productsController
|
||||
.selectedIndex
|
||||
.value ==
|
||||
1
|
||||
? productsController
|
||||
.swingTradeModel
|
||||
: selectedIndex.value == 1
|
||||
? productsController
|
||||
.multibaggerModel
|
||||
: productsController
|
||||
.optionModel),
|
||||
.multibaggerModel
|
||||
: productsController
|
||||
.optionModel),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -245,7 +253,7 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
itemBuilder: (ctx, index) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 20.h, bottom: 5.h),
|
||||
child: selectedIndex.value == 0
|
||||
child: productsController.selectedIndex.value == 0
|
||||
? cardSwingWidget(
|
||||
image: callRecommendationsModel
|
||||
.data!.activeCalls![index].stockImage!,
|
||||
@@ -261,8 +269,12 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
action: callRecommendationsModel
|
||||
.data!.activeCalls![index].actionData!.name!,
|
||||
)
|
||||
: selectedIndex.value == 1
|
||||
: productsController.selectedIndex.value == 1
|
||||
? cardMultibaggerWidget(
|
||||
image: callRecommendationsModel
|
||||
.data!.activeCalls![index].stockImage!,
|
||||
action: callRecommendationsModel
|
||||
.data!.activeCalls![index].actionData!.name!,
|
||||
text: callRecommendationsModel
|
||||
.data!.activeCalls![index].stockName!,
|
||||
price:
|
||||
@@ -270,14 +282,34 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
date: callRecommendationsModel
|
||||
.data!.activeCalls![index].createdAt!,
|
||||
returns:
|
||||
"₹ ${callRecommendationsModel.data!.activeCalls![index].stopLoss}",
|
||||
"₹ ${callRecommendationsModel.data!.activeCalls![index].targetPrice}",
|
||||
stoploss:
|
||||
"₹ ${callRecommendationsModel.data!.activeCalls![index].stopLoss}",
|
||||
duration: callRecommendationsModel
|
||||
.data!.activeCalls![index].duration!,
|
||||
pdfname: "Download Pdf",
|
||||
)
|
||||
: SizedBox(),
|
||||
: cardOptionWidget(
|
||||
image: callRecommendationsModel
|
||||
.data!.activeCalls![index].stockImage!,
|
||||
action: callRecommendationsModel
|
||||
.data!.activeCalls![index].actionData!.name!,
|
||||
text: callRecommendationsModel
|
||||
.data!.activeCalls![index].stockName!,
|
||||
optiontype: "test",
|
||||
price:
|
||||
"₹ ${callRecommendationsModel.data!.activeCalls![index].buyPrice}",
|
||||
date: callRecommendationsModel
|
||||
.data!.activeCalls![index].createdAt!,
|
||||
premium:
|
||||
"₹ ${callRecommendationsModel.data!.activeCalls![index].stopLoss}",
|
||||
price1:
|
||||
"₹ ${callRecommendationsModel.data!.activeCalls![index].stopLoss}",
|
||||
price2:
|
||||
"₹ ${callRecommendationsModel.data!.activeCalls![index].stopLoss}",
|
||||
stoploss:
|
||||
"₹ ${callRecommendationsModel.data!.activeCalls![index].stopLoss}",
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -319,175 +351,78 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
}
|
||||
|
||||
Widget ExitedCallsTab(CallRecommendationsModel callRecommendationsModel) {
|
||||
List<Map<String, String>> cardSwing = [
|
||||
{
|
||||
'text': 'Indiabulls Housing Finance Ltd',
|
||||
'amount': '₹ 196.50 - ₹ 197',
|
||||
'targetamount': '₹ 204',
|
||||
'stoploss': '₹ 190',
|
||||
'time': '4-5 Days',
|
||||
},
|
||||
{
|
||||
'text': 'Indiabulls Housing Finance Ltd',
|
||||
'amount': '₹ 196.50 - ₹ 197',
|
||||
'targetamount': '₹ 204',
|
||||
'stoploss': '₹ 190',
|
||||
'time': '4-5 Days',
|
||||
},
|
||||
{
|
||||
'text': 'Indiabulls Housing Finance Ltd',
|
||||
'amount': '₹ 196.50 - ₹ 197',
|
||||
'targetamount': '₹ 204',
|
||||
'stoploss': '₹ 190',
|
||||
'time': '4-5 Days',
|
||||
},
|
||||
];
|
||||
|
||||
List<Map<String, String>> cardMultibagger = [
|
||||
{
|
||||
'text': 'TATA MOTORS',
|
||||
'price': '₹ 453 - ₹234',
|
||||
'date': '25 March 2024',
|
||||
'returns': '103%',
|
||||
'stoploss': '₹ 198',
|
||||
'duration': '271 Days',
|
||||
'pdfname': 'Download Pdf'
|
||||
},
|
||||
{
|
||||
'text': 'TATA MOTORS',
|
||||
'price': '₹ 453 - ₹234',
|
||||
'date': '25 March 2024',
|
||||
'returns': '103%',
|
||||
'stoploss': '₹ 198',
|
||||
'duration': '271 Days',
|
||||
'pdfname': 'Download Pdf'
|
||||
},
|
||||
{
|
||||
'text': 'TATA MOTORS',
|
||||
'price': '₹ 453 - ₹234',
|
||||
'date': '25 March 2024',
|
||||
'returns': '103%',
|
||||
'stoploss': '₹ 198',
|
||||
'duration': '271 Days',
|
||||
'pdfname': 'Download Pdf'
|
||||
},
|
||||
];
|
||||
|
||||
List<Map<String, String>> cardOptionsbagger = [
|
||||
{
|
||||
'text': 'NIFTY/ BANK NIFTY',
|
||||
'optiontype': 'Call',
|
||||
'price': '₹ 46500',
|
||||
'date': '6th Mar',
|
||||
'premium': 'Buy above₹ 690',
|
||||
'price1': '₹ 740',
|
||||
'price2': '₹ 780',
|
||||
'stoploss': '₹ 645',
|
||||
},
|
||||
{
|
||||
'text': 'NIFTY/ BANK NIFTY',
|
||||
'optiontype': 'Call',
|
||||
'price': '₹ 46500',
|
||||
'date': '6th Mar',
|
||||
'premium': 'Buy above₹ 690',
|
||||
'price1': '₹ 740',
|
||||
'price2': '₹ 780',
|
||||
'stoploss': '₹ 645',
|
||||
},
|
||||
{
|
||||
'text': 'NIFTY/ BANK NIFTY',
|
||||
'optiontype': 'Call',
|
||||
'price': '₹ 46500',
|
||||
'date': '6th Mar',
|
||||
'premium': 'Buy above₹ 690',
|
||||
'price1': '₹ 740',
|
||||
'price2': '₹ 780',
|
||||
'stoploss': '₹ 645',
|
||||
},
|
||||
];
|
||||
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
Obx(() {
|
||||
return selectedIndex.value == 0
|
||||
? 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: cardSwingWidget(
|
||||
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!,
|
||||
),
|
||||
);
|
||||
})
|
||||
: selectedIndex == 1
|
||||
? Column(
|
||||
children:
|
||||
List.generate(cardMultibagger.length, (index) {
|
||||
return Column(
|
||||
children: [
|
||||
cardMultibaggerWidget(
|
||||
text: cardMultibagger[index]['text']!,
|
||||
price: cardMultibagger[index]['price']!,
|
||||
date: cardMultibagger[index]['date']!,
|
||||
returns: cardMultibagger[index]['returns']!,
|
||||
stoploss: cardMultibagger[index]['stoploss']!,
|
||||
duration: cardMultibagger[index]['duration']!,
|
||||
pdfname: cardMultibagger[index]['pdfname']!),
|
||||
sizedBoxHeight(20.h)
|
||||
],
|
||||
);
|
||||
}),
|
||||
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(
|
||||
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!,
|
||||
)
|
||||
: Column(
|
||||
children:
|
||||
List.generate(cardMultibagger.length, (index) {
|
||||
return Column(
|
||||
children: [
|
||||
cardOptionWidget(
|
||||
text: cardOptionsbagger[index]['text']!,
|
||||
optiontype: cardOptionsbagger[index]
|
||||
['optiontype']!,
|
||||
price: cardOptionsbagger[index]['price']!,
|
||||
date: cardOptionsbagger[index]['date']!,
|
||||
premium: cardOptionsbagger[index]['premium']!,
|
||||
price1: cardOptionsbagger[index]['price1']!,
|
||||
price2: cardOptionsbagger[index]['price2']!,
|
||||
stoploss: cardOptionsbagger[index]
|
||||
['stoploss']!),
|
||||
sizedBoxHeight(20.h)
|
||||
],
|
||||
);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
sizedBoxHeight(200.h)
|
||||
],
|
||||
),
|
||||
);
|
||||
: productsController.selectedIndex.value == 1
|
||||
? cardMultibaggerWidget(
|
||||
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",
|
||||
)
|
||||
: cardOptionWidget(
|
||||
image: callRecommendationsModel
|
||||
.data!.exitedCalls![index].stockImage!,
|
||||
action: callRecommendationsModel
|
||||
.data!.exitedCalls![index].actionData!.name!,
|
||||
text: callRecommendationsModel
|
||||
.data!.exitedCalls![index].stockName!,
|
||||
optiontype: "test",
|
||||
price:
|
||||
"₹ ${callRecommendationsModel.data!.exitedCalls![index].buyPrice}",
|
||||
date: callRecommendationsModel
|
||||
.data!.exitedCalls![index].createdAt!,
|
||||
premium:
|
||||
"₹ ${callRecommendationsModel.data!.exitedCalls![index].stopLoss}",
|
||||
price1:
|
||||
"₹ ${callRecommendationsModel.data!.exitedCalls![index].stopLoss}",
|
||||
price2:
|
||||
"₹ ${callRecommendationsModel.data!.exitedCalls![index].stopLoss}",
|
||||
stoploss:
|
||||
"₹ ${callRecommendationsModel.data!.exitedCalls![index].stopLoss}",
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget cardOptionWidget({
|
||||
@@ -499,6 +434,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
required String price1,
|
||||
required String price2,
|
||||
required String stoploss,
|
||||
required String action,
|
||||
required String image,
|
||||
}) {
|
||||
return commonGlassContainer(
|
||||
width: double.infinity,
|
||||
@@ -534,8 +471,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Group 1000004495.png',
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: image,
|
||||
width: 26.w,
|
||||
height: 23.h,
|
||||
),
|
||||
@@ -551,7 +488,7 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
color: const Color(0xFFFFAD31),
|
||||
),
|
||||
child: Center(child: text14W600_1B1B1B('Hold')),
|
||||
child: Center(child: text14W600_1B1B1B(action)),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -657,6 +594,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
required String stoploss,
|
||||
required String duration,
|
||||
required String pdfname,
|
||||
required String action,
|
||||
required String image,
|
||||
}) {
|
||||
return commonGlassContainer(
|
||||
width: double.infinity,
|
||||
@@ -692,8 +631,8 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/TATAMOTORS.NS_BIG 1.png',
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: image,
|
||||
width: 26.w,
|
||||
height: 23.h,
|
||||
),
|
||||
@@ -707,9 +646,11 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
height: 25.h,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
color: const Color(0xFFFFAD31),
|
||||
color: action == "Buy"
|
||||
? const Color(0xFF00FF19)
|
||||
: const Color(0xFFFFAD31),
|
||||
),
|
||||
child: Center(child: text14W600_1B1B1B('Hold')),
|
||||
child: Center(child: text14W600_1B1B1B(action)),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -742,7 +683,7 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
width: 130.w,
|
||||
child: text14W400_979797('Date of recommendation')),
|
||||
sizedBoxHeight(5.h),
|
||||
text15W600(date)
|
||||
text15W600(productsController.dateConverterMethod(date))
|
||||
],
|
||||
)
|
||||
],
|
||||
@@ -753,10 +694,9 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text14W400_979797('% Return'),
|
||||
text14W400_979797('Target Price'),
|
||||
sizedBoxHeight(5.h),
|
||||
SizedBox(
|
||||
width: 150.w, child: text15W600_00FF19(returns))
|
||||
SizedBox(width: 150.w, child: text15W600(returns))
|
||||
],
|
||||
),
|
||||
sizedBoxWidth(30.w),
|
||||
@@ -782,23 +722,23 @@ 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),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
// 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),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// )
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -934,7 +874,7 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
|
||||
Widget topContainer(String text, int index) {
|
||||
return Obx(() {
|
||||
return selectedIndex.value == index
|
||||
return productsController.selectedIndex.value == index
|
||||
? Container(
|
||||
height: 40.h,
|
||||
width: 126.w,
|
||||
|
||||
Reference in New Issue
Block a user