home screen new ui

This commit is contained in:
jayesh
2024-05-14 18:47:05 +05:30
parent 0df7b147a4
commit d0f027204f
11 changed files with 619 additions and 463 deletions

View File

@@ -230,6 +230,17 @@ Widget text22W600(String text) {
);
}
Widget text20W600(String text) {
return Text(
text,
style: TextStyle(
fontSize: 20.sp,
color: Colors.white,
fontWeight: FontWeight.w600,
fontFamily: 'hiragino'),
);
}
Widget text22W600manrope(String text) {
return Text(
text,
@@ -252,6 +263,17 @@ Widget text25W600(String text) {
);
}
Widget text25W800(String text) {
return Text(
text,
style: TextStyle(
fontSize: 25.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: 'hiragino'),
);
}
Widget text22W500(String text) {
return Text(
text,
@@ -296,12 +318,12 @@ Widget text14W400(String text) {
);
}
Widget text14W500(String text) {
Widget text14W500(String text, {Color? clr}) {
return Text(
text,
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
color: clr ?? Colors.white,
fontWeight: FontWeight.w500,
fontFamily: 'hiragino'),
);
@@ -335,7 +357,7 @@ Widget text14W400_979797(String text) {
text,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF979797),
color: Color(0xFFE9E9E9),
fontWeight: FontWeight.w400,
fontFamily: 'hiragino'),
);

View File

@@ -1,8 +1,10 @@
// import 'package:flutter/material.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:flutter_svg/svg.dart';
import 'package:gap/gap.dart';
import 'package:get/get.dart';
import 'package:glassmorphism/glassmorphism.dart';
import 'package:traderscircuit/Utils/Common/CommonBottomNavigation.dart';
@@ -22,6 +24,7 @@ import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart';
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
import 'package:traderscircuit/view_model/HomeApi/home_api.dart';
import '../../Utils/Common/CustomTextFormField.dart';
import '../../view_model/ProfileAPI/GetProfileApi.dart';
class HomeScreen extends StatefulWidget {
@@ -105,12 +108,27 @@ class _HomeScreenState extends State<HomeScreen> {
padding:
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: isApiCalling.value
? Center(
child: CircularProgressIndicator( color: Color(0xFF0093FF),),
? const Center(
child: CircularProgressIndicator(
color: Color(0xFF0093FF),
),
)
: ListView(
physics: const BouncingScrollPhysics(),
children: [
sizedBoxHeight(15.h),
CustomTextFormField1(
hintText: 'Search',
leadingIcon: SizedBox(
height: 20,
width: 20,
child: Center(
child: SvgPicture.asset(
'assets/images/svg/search-svgrepo-com.svg',
),
),
),
),
sizedBoxHeight(20.h),
Text(
"Welcome $userName",
@@ -149,25 +167,19 @@ class _HomeScreenState extends State<HomeScreen> {
text22W500('View our products'),
sizedBoxHeight(30.h),
SizedBox(
height: 210,
child: GridView.builder(
height: 280,
child: ListView.builder(
physics: const NeverScrollableScrollPhysics(),
gridDelegate:
const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount:
2, // number of items in each row
mainAxisSpacing: 8.0, // spacing between rows
crossAxisSpacing:
8.0, // spacing between columns
childAspectRatio: 2.2,
),
itemCount: homeModel.data!.products!.length,
itemBuilder: (context, index) {
return ProductWidget(
return Container(
margin: const EdgeInsets.only(bottom: 12),
child: ProductWidget(
text: homeModel.data!.products!
.elementAt(index)
.title!,
subtext: "recommendation");
),
);
},
),
),
@@ -188,54 +200,107 @@ class _HomeScreenState extends State<HomeScreen> {
color: const Color(0xFF3A3A3A),
),
sizedBoxHeight(25.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
text22W600('Explore The Unseen'),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.exploreUnseen);
},
child: Container(
height: 35.h,
width: 105.w,
decoration: BoxDecoration(
color: const Color(0xFF0093FF),
// .withOpacity(0.6),
borderRadius:
BorderRadius.circular(5.r),
border: Border.all(
color: const Color(0xFF3A3A3A),
)),
child:
Center(child: text16W500('View More')),
text25W800('Explore The Unseen'),
sizedBoxHeight(10.h),
Container(
padding: const EdgeInsets.all(8),
width: 398,
height: 55,
decoration: ShapeDecoration(
gradient: LinearGradient(
begin: const Alignment(1.00, 0.02),
end: const Alignment(-1, -0.02),
colors: [
Colors.white
.withOpacity(0.09000000357627869),
Colors.white
.withOpacity(0.0925697460770607),
Colors.white
.withOpacity(0.10999999940395355)
],
),
shape: RoundedRectangleBorder(
side: const BorderSide(
width: 1, color: Color(0x994A73FB)),
borderRadius: BorderRadius.circular(8),
),
),
child: Container(
width: 382,
height: 40,
decoration: ShapeDecoration(
color: const Color(0xFF00C236),
shape: RoundedRectangleBorder(
side: const BorderSide(width: 0.80),
borderRadius: BorderRadius.circular(5),
),
),
],
),
sizedBoxHeight(35.h),
DefaultTabController(
length: 2,
child: Column(
children: [
MyTabBar(),
SizedBox(
height: 250.h,
child: TabBarView(
children: [
ActiveCallsTab(),
ExitedCallsTab(),
],
),
),
],
child: Center(
child: text18W500("Long Term"),
),
),
),
sizedBoxHeight(25.h),
// DefaultTabController(
// length: 2,
// child: Column(
// children: [
// MyTabBar(),
// SizedBox(
// height: 250.h,
// child: TabBarView(
// children: [
// ActiveCallsTab(),
// ExitedCallsTab(),
// ],
// ),
// ),
// ],
// ),
// ),
cardcallWidget(
action: homeModel
.data!
.exploreTheUnseenActiveCalls!
.first
.recommendationActionsXid ==
1
? "Buy"
: homeModel
.data!
.exploreTheUnseenActiveCalls!
.first
.recommendationActionsXid ==
2
? "Sell"
: homeModel
.data!
.exploreTheUnseenActiveCalls!
.first
.recommendationActionsXid ==
3
? "Hold"
: homeModel
.data!
.exploreTheUnseenActiveCalls!
.first
.recommendationActionsXid ==
4
? "Exit"
: "",
text: homeModel
.data!
.exploreTheUnseenActiveCalls!
.first
.stockName!,
amount:
"${homeModel.data!.exploreTheUnseenActiveCalls!.first.buyPrice!}",
pdfname: 'Download Pdf'),
sizedBoxHeight(25.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text22W600('Content Bytes'),
text20W600('Content Bytes'),
sizedBoxHeight(8.w),
Row(
mainAxisAlignment: MainAxisAlignment.end,
@@ -472,147 +537,138 @@ Widget cardcallWidget(
required String amount,
required String pdfname,
required String action}) {
return commonGlassContainer(
width: double.infinity,
height: 176.h,
borderradius: 8,
customWidget: Column(
return Container(
width: 398,
height: 251,
decoration: ShapeDecoration(
color: const Color(0x232C79ED),
shape: RoundedRectangleBorder(
side: const BorderSide(width: 1, color: Color(0x994A73FB)),
borderRadius: BorderRadius.circular(8),
),
),
child: Stack(
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
child: Row(
children: [
GlassmorphicContainer(
width: 47.w,
height: 47.h,
borderRadius: 100,
blur: 10,
alignment: Alignment.center,
border: 0.9,
linearGradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xff3A3A3A),
Color(0xFF3A3A3A),
],
),
borderGradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color.fromRGBO(70, 5, 1, 0.8),
Color.fromRGBO(102, 102, 102, 0.8),
],
),
child: Center(
child:
Image.asset('assets/images/png/square_TRIDENT_com 1.png'),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
text16W700(text),
Container(
width: 75.w,
height: 30.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.r),
color: action == "Buy"
? Colors.green
: action == "Sell"
? Colors.red
: action == "Hold"
? const Color(0xFFFFAD31)
: Colors.white,
),
child: Center(child: text14W500(action, clr: Colors.black)),
)
],
),
sizedBoxWidth(15.w),
text18W600(text),
const Spacer(),
Container(
width: 62.w,
height: 25.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.r),
color: action == "Buy"
? Colors.green
: action == "Sell"
? Colors.red
: action == "Hold"
? const Color(0xFFFFAD31)
: Colors.white,
),
child: Center(child: text16W400_1B1B1B(action)),
)
],
),
),
Container(
width: double.infinity,
height: 1.h,
color: const Color(0xFF3A3A3A),
),
Padding(
padding: const EdgeInsets.all(20),
child: Row(
children: [
Column(
),
Padding(
padding: const EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
text14W400_979797('Initial Entry Price'),
sizedBoxHeight(5.h),
text15W600(amount)
text15W600(amount),
sizedBoxHeight(30.w),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 150,
height: 52,
decoration: ShapeDecoration(
color: const Color(0x332C79ED),
shape: RoundedRectangleBorder(
side: const BorderSide(
width: 1, color: Color(0x994A73FB)),
borderRadius: BorderRadius.circular(8),
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
// SvgPicture.asset('assets/images/svg/pdfsvg.svg'),
Image.asset(
'assets/images/png/pdf.png',
height: 20.h,
width: 20.w,
),
const Gap(5),
text15W600(pdfname),
],
),
),
Container(
height: 52,
width: 150,
decoration: ShapeDecoration(
color: const Color(0xFF0093FF),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8)),
),
child: Center(child: text15W600("View More")),
)
],
),
],
),
// sizedBoxWidth(50.w),
const Spacer(),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text14W400_979797('Report'),
sizedBoxHeight(5.h),
Row(
children: [
// SvgPicture.asset('assets/images/svg/pdfsvg.svg'),
Image.asset(
'assets/images/png/pdf.png',
height: 20.h,
width: 20.w,
),
text15W600(pdfname),
],
)
],
)
],
),
)
)
],
),
Positioned(
right: 0,
child: SvgPicture.asset("assets/images/svg/card_decoration.svg"))
],
),
);
}
Widget ProductWidget({required String text, required String subtext}) {
return GlassmorphicContainer(
width: 175.w,
height: 83.h,
borderRadius: 8,
blur: 10,
alignment: Alignment.center,
border: 0.8,
linearGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF2D7AEE).withOpacity(0.14),
const Color(0xFF2D7AEE).withOpacity(0.14),
],
stops: [
0.1,
1,
]),
borderGradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xff0F2C53),
Color(0xFF0F2C53),
],
),
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
children: [
text18W600(text),
sizedBoxWidth(8.w),
text14W400_979797(subtext),
],
Widget ProductWidget({
required String text,
}) {
return Container(
padding: const EdgeInsets.only(left: 20),
width: 398,
height: 83,
decoration: ShapeDecoration(
gradient: const LinearGradient(
begin: Alignment(0.99, -0.14),
end: Alignment(-0.99, 0.14),
colors: [Color(0xFF1538C5), Color(0xFF0B2074), Color(0xFF000D41)],
),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
text18W600(text),
// Image.asset(
// "assets/images/png/swingImage.png",
// height: 83,
// )
SvgPicture.asset(text == "Swing Trade"
? "assets/images/svg/swing_image.svg"
: text == "Options"
? "assets/images/svg/options_image.svg"
: "assets/images/svg/multibagger_image.svg")
],
),
);
}
@@ -622,31 +678,14 @@ Widget commoncontainer(
required String amount,
required String rate,
required double width}) {
return GlassmorphicContainer(
width: width,
height: 83.h,
borderRadius: 8,
blur: 10,
alignment: Alignment.center,
border: 0.8,
linearGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF2D7AEE).withOpacity(0.14),
const Color(0xFF2D7AEE).withOpacity(0.14),
],
stops: [
0.1,
1,
]),
borderGradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xff0F2C53),
Color(0xFF0F2C53),
],
return Container(
height: 83,
decoration: ShapeDecoration(
color: const Color(0xFF0F2C53),
shape: RoundedRectangleBorder(
side: const BorderSide(width: 1, color: Color(0x7F4A73FB)),
borderRadius: BorderRadius.circular(8),
),
),
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),

View File

@@ -148,7 +148,7 @@ class _ShortTradeState extends State<ShortTrade> {
productsController.isLoaded.value
? const Center(
child: CircularProgressIndicator(
color: Color(0xFF0093FF),
color: Color(0xFF0093FF),
),
)
: DefaultTabController(
@@ -814,150 +814,153 @@ class _ShortTradeState extends State<ShortTrade> {
required String pdfLink,
required String action,
}) {
return commonGlassContainer(
width: double.infinity,
height: action != "Exit" ? 250.h : 300.h,
borderradius: 8,
customWidget: Column(
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
child: Row(
children: [
GlassmorphicContainer(
width: 47.w,
height: 47.h,
borderRadius: 100,
blur: 10,
alignment: Alignment.center,
border: 0.9,
linearGradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xff3A3A3A),
Color(0xFF3A3A3A),
],
return InkWell(
child: commonGlassContainer(
width: double.infinity,
height: action != "Exit" ? 250.h : 300.h,
borderradius: 8,
customWidget: Column(
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
child: Row(
children: [
GlassmorphicContainer(
width: 47.w,
height: 47.h,
borderRadius: 100,
blur: 10,
alignment: Alignment.center,
border: 0.9,
linearGradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xff3A3A3A),
Color(0xFF3A3A3A),
],
),
borderGradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color.fromRGBO(70, 5, 1, 0.8),
Color.fromRGBO(102, 102, 102, 0.8),
],
),
child: Center(
child: CachedNetworkImage(imageUrl: image),
),
),
borderGradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color.fromRGBO(70, 5, 1, 0.8),
Color.fromRGBO(102, 102, 102, 0.8),
],
),
child: Center(
child: CachedNetworkImage(imageUrl: image),
),
),
sizedBoxWidth(15.w),
SizedBox(width: 200.w, child: text18W600(text)),
const Spacer(),
Container(
width: 62.w,
height: 25.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.r),
color: action == "Buy"
? const Color(0xFF00FF19)
: action == "Exit"
? const Color(0Xff6C0000)
: const Color(0xFFFFAD31),
),
child: Center(
child: text14W600_1B1B1B(
action,
clr: action == "Exit"
? Colors.white
: const Color(0Xff1B1B1B),
)),
)
],
sizedBoxWidth(15.w),
SizedBox(width: 200.w, child: text18W600(text)),
const Spacer(),
Container(
width: 62.w,
height: 25.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.r),
color: action == "Buy"
? const Color(0xFF00FF19)
: action == "Exit"
? const Color(0Xff6C0000)
: const Color(0xFFFFAD31),
),
child: Center(
child: text14W600_1B1B1B(
action,
clr: action == "Exit"
? Colors.white
: const Color(0Xff1B1B1B),
)),
)
],
),
),
),
Container(
width: double.infinity,
height: 1.h,
color: const Color(0xFF3A3A3A),
),
Padding(
padding: const EdgeInsets.all(20),
child: Column(
children: [
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text14W400_979797('Entry Price'),
sizedBoxHeight(5.h),
SizedBox(width: 150.w, child: text15W600(amount))
],
),
sizedBoxWidth(50.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text14W400_979797('Target Price'),
sizedBoxHeight(5.h),
text15W600(targetamount)
],
)
],
),
sizedBoxHeight(15.h),
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text14W400_979797('Stop Loss'),
sizedBoxHeight(5.h),
SizedBox(width: 150.w, child: text15W600(stoploss))
],
),
sizedBoxWidth(50.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text14W400_979797('Time Horizon'),
sizedBoxHeight(5.h),
text15W600(time)
],
)
],
),
sizedBoxHeight(15.h),
action != "Exit"
? const SizedBox()
: Column(
Container(
width: double.infinity,
height: 1.h,
color: const Color(0xFF3A3A3A),
),
Padding(
padding: const EdgeInsets.all(20),
child: Column(
children: [
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text14W400_979797('Report'),
text14W400_979797('Entry Price'),
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"),
],
),
)
SizedBox(width: 150.w, child: text15W600(amount))
],
),
sizedBoxWidth(50.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text14W400_979797('Target Price'),
sizedBoxHeight(5.h),
text15W600(targetamount)
],
)
],
),
)
],
],
),
sizedBoxHeight(15.h),
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text14W400_979797('Stop Loss'),
sizedBoxHeight(5.h),
SizedBox(width: 150.w, child: text15W600(stoploss))
],
),
sizedBoxWidth(50.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text14W400_979797('Time Horizon'),
sizedBoxHeight(5.h),
text15W600(time)
],
)
],
),
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"),
],
),
)
],
)
],
),
)
],
),
),
);
}

View File

@@ -394,64 +394,74 @@ class _ReadsState extends State<Reads> {
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (ctx, index) {
return Column(
children: [
InkWell(
onTap: () {
ContentBytesApi()
.updateReadCounts(contentBytesController
.contentBytesModel.data!.read![index].id!)
.then((value) {
Get.to(ReadPDF(
title: contentBytesController
.contentBytesModel.data!.read![index].title,
pdfUrfl: contentBytesController
.contentBytesModel.data!.read![index].file,
));
});
},
child: commonGlassContainer(
borderradius: 8,
width: double.infinity,
height: 150.h,
customWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
const SizedBox(
width: 10,
return index > 1
? SizedBox()
: Column(
children: [
InkWell(
onTap: () {
ContentBytesApi()
.updateReadCounts(contentBytesController
.contentBytesModel.data!.read![index].id!)
.then((value) {
Get.to(ReadPDF(
title: contentBytesController
.contentBytesModel
.data!
.read![index]
.title,
pdfUrfl: contentBytesController
.contentBytesModel
.data!
.read![index]
.file,
));
});
},
child: commonGlassContainer(
borderradius: 8,
width: double.infinity,
height: 150.h,
customWidget: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
const SizedBox(
width: 10,
),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
const Spacer(),
SizedBox(
width: 235.w,
child: text20W400(
'"${contentBytesController.contentBytesModel.data!.read![index].title}"'),
),
sizedBoxHeight(10.h),
SizedBox(
width: 230.w,
height: 50,
child: text16W400(
'"${contentBytesController.contentBytesModel.data!.read![index].description}"'),
),
const Spacer()
],
),
CachedNetworkImage(
imageUrl:
"${contentBytesController.contentBytesModel.data!.read![index].image}",
height: 110,
),
],
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Spacer(),
SizedBox(
width: 235.w,
child: text20W400(
'"${contentBytesController.contentBytesModel.data!.read![index].title}"'),
),
sizedBoxHeight(10.h),
SizedBox(
width: 230.w,
height: 50,
child: text16W400(
'"${contentBytesController.contentBytesModel.data!.read![index].description}"'),
),
const Spacer()
],
),
CachedNetworkImage(
imageUrl:
"${contentBytesController.contentBytesModel.data!.read![index].image}",
height: 110,
),
],
),
),
),
sizedBoxHeight(20.h),
],
);
),
sizedBoxHeight(20.h),
],
);
}),
contentBytesController.contentBytesModel.data!.mostReads!.isEmpty
? const SizedBox()
@@ -716,66 +726,70 @@ class _AudiosState extends State<Audios> {
itemCount: contentBytesController
.contentBytesModel.data!.audio!.length, // total number of items
itemBuilder: (context, index) {
return InkWell(
onTap: () {
if (contentBytesController.isAudioInitialize) {
contentBytesController.isAudioSeekBarVisible.value = false;
contentBytesController.pause();
contentBytesController.stop();
}
contentBytesController.init(index, "regular");
contentBytesController.isAudioSeekBarVisible.value = true;
contentBytesController.indexForAudios.value = index;
},
child: Container(
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,
],
),
borderRadius: BorderRadius.circular(8),
),
child: Stack(
children: [
CachedNetworkImage(
imageUrl: contentBytesController
.contentBytesModel.data!.audio![index].image!,
),
Positioned(
bottom: 5,
left: 5,
child: Row(
return index >= 6
? SizedBox()
: InkWell(
onTap: () {
if (contentBytesController.isAudioInitialize) {
contentBytesController.isAudioSeekBarVisible.value =
false;
contentBytesController.pause();
contentBytesController.stop();
}
contentBytesController.init(index, "regular");
contentBytesController.isAudioSeekBarVisible.value =
true;
contentBytesController.indexForAudios.value = index;
},
child: Container(
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,
],
),
borderRadius: BorderRadius.circular(8),
),
child: Stack(
children: [
CircleAvatar(
radius: 18.sp,
child: const Icon(Icons.headphones),
CachedNetworkImage(
imageUrl: contentBytesController
.contentBytesModel.data!.audio![index].image!,
),
SizedBox(
width: 5.w,
),
SizedBox(
width: 125.w,
child: text14W500(contentBytesController
.contentBytesModel
.data!
.audio![index]
.title!),
Positioned(
bottom: 5,
left: 5,
child: Row(
children: [
CircleAvatar(
radius: 18.sp,
child: const Icon(Icons.headphones),
),
SizedBox(
width: 5.w,
),
SizedBox(
width: 125.w,
child: text14W500(contentBytesController
.contentBytesModel
.data!
.audio![index]
.title!),
),
],
),
),
],
),
),
],
),
),
);
);
},
),
SizedBox(

View File

@@ -68,7 +68,7 @@ class _FaqScreenState extends State<FaqScreen> {
isLoading.value
? const Center(
child: CircularProgressIndicator(
color: Color(0xFF0093FF),
color: Color(0xFF0093FF),
),
)
: Stack(children: [
@@ -80,7 +80,7 @@ class _FaqScreenState extends State<FaqScreen> {
text25W600('FAQ'),
sizedBoxHeight(20),
CustomTextFormField1(
hintText: 'Search Chats',
hintText: 'Search FAQ',
leadingIcon: SizedBox(
height: 20,
width: 20,

View File

@@ -1,7 +1,6 @@
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:onesignal_flutter/onesignal_flutter.dart';