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"),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -266,7 +266,8 @@ class _VideosMoreState extends State<AudioMore> {
|
||||
contentBytesController.pause();
|
||||
contentBytesController.stop();
|
||||
}
|
||||
contentBytesController.init(index);
|
||||
contentBytesController.init(
|
||||
index, "regular");
|
||||
contentBytesController
|
||||
.isAudioSeekBarVisible.value = true;
|
||||
//https://actions.google.com/sounds/v1/horror/aggressive_zombie_snarls.ogg
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:audio_video_progress_bar/audio_video_progress_bar.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -115,8 +116,8 @@ class _ContentBytesState extends State<ContentBytes> {
|
||||
child: Align(
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
child: Image.network(
|
||||
contentBytesController
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: contentBytesController
|
||||
.contentBytesModel
|
||||
.data!
|
||||
.audio![contentBytesController
|
||||
@@ -315,6 +316,7 @@ class _ContentBytesState extends State<ContentBytes> {
|
||||
SizedBox(
|
||||
height: 600.h,
|
||||
child: TabBarView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
Videos(images: reels),
|
||||
const Audios(),
|
||||
@@ -438,8 +440,9 @@ class _ReadsState extends State<Reads> {
|
||||
const Spacer()
|
||||
],
|
||||
),
|
||||
Image.network(
|
||||
"${contentBytesController.contentBytesModel.data!.read![index].image}",
|
||||
CachedNetworkImage(
|
||||
imageUrl:
|
||||
"${contentBytesController.contentBytesModel.data!.read![index].image}",
|
||||
height: 110,
|
||||
),
|
||||
],
|
||||
@@ -509,16 +512,20 @@ class _ReadsState extends State<Reads> {
|
||||
Colors.white.withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Image.network(
|
||||
contentBytesController.contentBytesModel.data!
|
||||
.mostReads![index].contentByteData!.image!,
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: contentBytesController
|
||||
.contentBytesModel
|
||||
.data!
|
||||
.mostReads![index]
|
||||
.contentByteData!
|
||||
.image!,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
@@ -563,7 +570,7 @@ class _ReadsState extends State<Reads> {
|
||||
Colors.white.withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
@@ -577,11 +584,12 @@ class _ReadsState extends State<Reads> {
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Image.network(contentBytesController
|
||||
.previousReadOfUserModel
|
||||
.data![index]
|
||||
.contentByteData!
|
||||
.image!),
|
||||
CachedNetworkImage(
|
||||
imageUrl: contentBytesController
|
||||
.previousReadOfUserModel
|
||||
.data![index]
|
||||
.contentByteData!
|
||||
.image!),
|
||||
SizedBox(
|
||||
width: 15.w,
|
||||
),
|
||||
@@ -600,8 +608,13 @@ class _ReadsState extends State<Reads> {
|
||||
),
|
||||
SizedBox(
|
||||
width: 130.w,
|
||||
height: 40,
|
||||
child: text10W300(
|
||||
" contentBytesControlle",
|
||||
contentBytesController
|
||||
.previousReadOfUserModel
|
||||
.data![index]
|
||||
.contentByteData!
|
||||
.description!,
|
||||
),
|
||||
)
|
||||
],
|
||||
@@ -710,7 +723,7 @@ class _AudiosState extends State<Audios> {
|
||||
contentBytesController.pause();
|
||||
contentBytesController.stop();
|
||||
}
|
||||
contentBytesController.init(index);
|
||||
contentBytesController.init(index, "regular");
|
||||
contentBytesController.isAudioSeekBarVisible.value = true;
|
||||
contentBytesController.indexForAudios.value = index;
|
||||
},
|
||||
@@ -723,7 +736,7 @@ class _AudiosState extends State<Audios> {
|
||||
Colors.white.withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
@@ -732,8 +745,8 @@ class _AudiosState extends State<Audios> {
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Image.network(
|
||||
contentBytesController
|
||||
CachedNetworkImage(
|
||||
imageUrl: contentBytesController
|
||||
.contentBytesModel.data!.audio![index].image!,
|
||||
),
|
||||
Positioned(
|
||||
@@ -787,41 +800,63 @@ class _AudiosState extends State<Audios> {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 148.w,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Image.network(
|
||||
contentBytesController.contentBytesModel.data!
|
||||
.newReleaseAudio![index].image!,
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (contentBytesController.isAudioInitialize) {
|
||||
contentBytesController.isAudioSeekBarVisible.value =
|
||||
false;
|
||||
contentBytesController.pause();
|
||||
contentBytesController.stop();
|
||||
}
|
||||
contentBytesController.init(index, "new");
|
||||
contentBytesController.isAudioSeekBarVisible.value =
|
||||
true;
|
||||
contentBytesController.indexForAudios.value = index;
|
||||
},
|
||||
child: Container(
|
||||
width: 148.w,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
const Positioned(
|
||||
right: 5,
|
||||
top: 5,
|
||||
child: CircleAvatar(
|
||||
radius: 15,
|
||||
child: Icon(
|
||||
Icons.headphones,
|
||||
size: 20,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: contentBytesController
|
||||
.contentBytesModel
|
||||
.data!
|
||||
.newReleaseAudio![index]
|
||||
.image!,
|
||||
height: 180,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
const Positioned(
|
||||
right: 5,
|
||||
top: 5,
|
||||
child: CircleAvatar(
|
||||
radius: 15,
|
||||
child: Icon(
|
||||
Icons.headphones,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
@@ -1209,9 +1244,21 @@ class _ContentTabBarState extends State<ContentTabBar>
|
||||
super.initState();
|
||||
}
|
||||
|
||||
ContentBytesController contentBytesController =
|
||||
Get.put(ContentBytesController());
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TabBar(
|
||||
onTap: (index) {
|
||||
if (index == 0 || index == 2) {
|
||||
if (contentBytesController.isAudioInitialize) {
|
||||
contentBytesController.isAudioSeekBarVisible.value = false;
|
||||
contentBytesController.pause();
|
||||
contentBytesController.stop();
|
||||
}
|
||||
}
|
||||
},
|
||||
tabAlignment: TabAlignment.fill,
|
||||
isScrollable: false,
|
||||
dividerColor: Colors.transparent,
|
||||
|
||||
Reference in New Issue
Block a user