content bytes

This commit is contained in:
Rajshinde046
2024-03-29 11:54:08 +05:30
parent cb7ca80e7a
commit 9c10c8d5a6
28 changed files with 1104 additions and 78 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 KiB

View File

@@ -285,6 +285,18 @@ Widget text14W500(String text) {
);
}
Widget text14W500Overflow(String text) {
return Text(
text,
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: FontWeight.w500,
overflow: TextOverflow.ellipsis,
fontFamily: 'manrope'),
);
}
Widget text16W400_DADADA(String text) {
return Text(
text,
@@ -339,3 +351,14 @@ Widget text14W500_black(String text) {
fontFamily: 'manrope'),
);
}
Widget text10W300(String text) {
return Text(
text,
style: TextStyle(
fontSize: 10.sp,
color: Colors.white,
fontWeight: FontWeight.w300,
fontFamily: 'manrope'),
);
}

View File

@@ -97,7 +97,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
fontFamily: 'manrope',
),
debugShowCheckedModeBanner: false,
initialRoute: RouteName.splashScreen,
initialRoute: RouteName.mainscreen,
getPages: AppRoutes.appRoutes(),
),
designSize: const Size(390, 844),

View File

@@ -40,10 +40,9 @@ class RouteName {
static const String aboutus = '/aboutus';
static const String settings = '/settings';
static const String faqscreen = '/faqscreen';
static const String contentbytes = '/contentbytes';
//contact us
static const String contactUsMain = '/contactUsMain';
static const String contactUsMainDetails = '/contactUsMainDetails';
}

View File

@@ -3,6 +3,7 @@ import 'package:traderscircuit/Utils/Common/noInternet.dart';
import 'package:traderscircuit/resources/routes/route_name.dart';
import 'package:traderscircuit/view/MainScreen/ExploreUnseen.dart';
import 'package:traderscircuit/view/Sidemenu/AboutUs.dart';
import 'package:traderscircuit/view/Sidemenu/ContentBytes.dart';
import 'package:traderscircuit/view/Sidemenu/FaqScreen.dart';
import 'package:traderscircuit/view/Sidemenu/PrivacyPolicy.dart';
import 'package:traderscircuit/view/Sidemenu/Settings.dart';
@@ -153,6 +154,10 @@ class AppRoutes {
name: RouteName.settings,
page: () => const Settings(),
),
GetPage(
name: RouteName.contentbytes,
page: () => const ContentBytes(),
),
//contact us

View File

@@ -27,10 +27,8 @@ class _ExploreUnseenState extends State<ExploreUnseen> {
@override
Widget build(BuildContext context) {
return Scaffold(
drawerEnableOpenDragGesture: false,
key: _scaffoldKey1,
backgroundColor: Colors.black,
drawer: Container(child: SideMenu()),
extendBody: true,
appBar: CommonAppbar(titleTxt: ''),

View File

@@ -206,26 +206,31 @@ Widget ActiveCallsTab() {
children: [
text22W600('Content Bytes'),
sizedBoxHeight(8.w),
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
text16W400_DADADA('The Beauty and Power of Video'),
sizedBoxWidth(10.w),
Container(
height: 35.h,
width: 105.w,
decoration: BoxDecoration(
color: Color(0xFF3A3A3A).withOpacity(0.6),
borderRadius: BorderRadius.circular(5.r),
border: Border.all(
color: Color(0xFF3A3A3A),
)),
child: Center(child: text16W500('View More')),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
text16W400_DADADA('The Beauty and Power of Video'),
sizedBoxWidth(10.w),
Container(
height: 35.h,
width: 105.w,
decoration: BoxDecoration(
color: Color(0xFF3A3A3A).withOpacity(0.6),
borderRadius: BorderRadius.circular(5.r),
border: Border.all(
color: Color(0xFF3A3A3A),
),
),
],
),
child: Center(
child: InkWell(
onTap: () {
Get.toNamed(RouteName.contentbytes);
},
child: text16W500('View More'),
),
),
),
],
),
sizedBoxHeight(20.h),
commonGlassContainer(

View File

@@ -34,6 +34,7 @@ class _HoldingsState extends State<Holdings> {
return Scaffold(
key: _scaffoldKey1,
backgroundColor: Colors.black,
drawerEnableOpenDragGesture: false,
drawer: Container(width: 320.w, child: SideMenu()),
extendBody: true,
appBar: AppBar(

View File

@@ -25,6 +25,7 @@ class _PortfolioState extends State<Portfolio> {
return Scaffold(
key: _scaffoldKey1,
backgroundColor: Colors.black,
drawerEnableOpenDragGesture: false,
drawer: Container(width: 320.w, child: SideMenu()),
extendBody: true,
appBar: AppBar(

View File

@@ -29,7 +29,7 @@ class _ShortTradeState extends State<ShortTrade> {
Widget build(BuildContext context) {
return Scaffold(
key: _scaffoldKey1,
backgroundColor: Colors.black,
backgroundColor: Colors.black, drawerEnableOpenDragGesture: false,
drawer: Container(child: SideMenu()),
extendBody: true,
appBar: AppBar(
@@ -236,7 +236,6 @@ class _ShortTradeState extends State<ShortTrade> {
void _unlockbottomsheet() {
Get.bottomSheet(
commonGlassContainer(
width: double.infinity,
height: 439.h,
@@ -264,7 +263,6 @@ class _ShortTradeState extends State<ShortTrade> {
)
],
),
),
),
),

View File

@@ -0,0 +1,823 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:traderscircuit/Utils/Common/CommonAppbar.dart';
import 'package:traderscircuit/Utils/Common/CustomTextFormField.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/view/Sidemenu/PlayerWidget.dart';
import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart';
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
class ContentBytes extends StatefulWidget {
const ContentBytes({super.key});
@override
State<ContentBytes> createState() => _ContentBytesState();
}
class _ContentBytesState extends State<ContentBytes> {
GlobalKey<ScaffoldState> _scaffoldKey1 = GlobalKey<ScaffoldState>();
final selectedIndex = 0.obs;
List<String> reels = [
"assets/images/png/sidemenu/reels1.png",
"assets/images/png/sidemenu/reels2.png",
"assets/images/png/sidemenu/reels3.png",
"assets/images/png/sidemenu/reels4.png",
];
List<String> audionewimage = [
"assets/images/png/sidemenu/audionew1.png",
"assets/images/png/sidemenu/audionew2.png",
"assets/images/png/sidemenu/audionew1.png",
];
List<String> mostread = [
"assets/images/png/sidemenu/Read1.png",
"assets/images/png/sidemenu/Read2.png",
"assets/images/png/sidemenu/Read1.png",
];
List<String> audio = [
"assets/images/png/sidemenu/audio1.png",
"assets/images/png/sidemenu/audio2.png",
"assets/images/png/sidemenu/audio3.png",
"assets/images/png/sidemenu/audio4.png",
"assets/images/png/sidemenu/audio1.png",
"assets/images/png/sidemenu/audio2.png",
];
List<String> audioname = [
"Week of 21st March 2024",
"Week of 21st March 2024",
"Week of 21st March 2024",
"Week of 21st March 2024",
"Week of 21st March 2024",
"Week of 21st March 2024",
];
List<String> audionamenewrelease = [
"Week of 21st March 2024",
"Week of 21st March 2024",
"Week of 21st March 2024",
];
@override
Widget build(BuildContext context) {
return Scaffold(
key: _scaffoldKey1,
backgroundColor: Colors.black,
extendBody: true,
appBar: CommonAppbar(titleTxt: "Content Bytes"),
body: Stack(
children: [
CommonBlurLeft(),
CommonBlurRight(),
Stack(
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: ListView(
children: [
SizedBox(
height: 10,
),
DefaultTabController(
length: 3,
// initialIndex: selectedIndex.value,
child: Column(
children: [
ContentTabBar(),
SizedBox(
height: 30.h,
),
SizedBox(
height: 600.h,
child: TabBarView(
children: [
Videos(images: reels),
Audios(
audio: audio,
audioname: audioname,
audionewimage: audionewimage,
audionamenewrelease: audionamenewrelease),
Reads(mostread: mostread),
],
),
),
],
),
),
sizedBoxHeight(40.h),
],
),
),
],
),
],
),
);
}
}
class Reads extends StatelessWidget {
const Reads({
super.key,
required this.mostread,
});
final List<String> mostread;
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
SizedBox(
width: 300,
child: CustomTextFormField(
leadingIcon: Icon(Icons.search),
),
),
SizedBox(
width: 15.w,
),
Image.asset(
"assets/images/png/filter.png",
height: 30.h,
width: 30.w,
),
],
),
SizedBox(
height: 10.h,
),
text22W600('Harnessing the Power of Ebooks"'),
sizedBoxHeight(20.h),
commonGlassContainer(
borderradius: 8,
width: double.infinity,
height: 150.h,
customWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
SizedBox(
width: 10,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Spacer(),
SizedBox(
width: 235.w,
child: text20W400('"Stock Market Essentials"'),
),
sizedBoxHeight(10.h),
SizedBox(
width: 230.w,
child: text16W400(
'A Comprehensive Guide to Understanding the Market'),
),
Spacer()
],
),
SizedBox(
width: 20,
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Image.asset(
"assets/images/png/sidemenu/book1.png",
height: 110,
),
],
)
],
),
),
sizedBoxHeight(20.h),
commonGlassContainer(
borderradius: 8,
width: double.infinity,
height: 150.h,
customWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
SizedBox(
width: 10,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Spacer(),
SizedBox(
width: 235.w,
child: text20W400('"Stock Market Essentials"'),
),
sizedBoxHeight(10.h),
SizedBox(
width: 230.w,
child: text16W400(
'A Comprehensive Guide to Understanding the Market'),
),
Spacer()
],
),
SizedBox(
width: 20,
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Image.asset(
"assets/images/png/sidemenu/book1.png",
height: 110,
),
],
)
],
),
),
sizedBoxHeight(30.h),
text22W500("Most Read"),
sizedBoxHeight(25.h),
Container(
height: 220.h,
child: ListView.separated(
separatorBuilder: (context, index) {
return SizedBox(
width: 10.w,
);
},
scrollDirection: Axis.horizontal,
itemCount: 3,
itemBuilder: (context, index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 216.h,
width: 150.w,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.white.withOpacity(0.1),
Color(0xFFFFFFFF).withOpacity(0.05),
],
stops: [
0.1,
1,
],
),
borderRadius: BorderRadius.circular(8),
),
child: Image.asset(mostread[index]),
),
],
);
},
),
),
sizedBoxHeight(30.h),
text22W500("Previous Read"),
sizedBoxHeight(20.h),
Container(
height: 90.h,
child: ListView.separated(
separatorBuilder: (context, index) {
return SizedBox(
width: 10.w,
);
},
scrollDirection: Axis.horizontal,
itemCount: 2,
itemBuilder: (context, index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 85.h,
width: 230.w,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.white.withOpacity(0.1),
Color(0xFFFFFFFF).withOpacity(0.05),
],
stops: [
0.1,
1,
],
),
borderRadius: BorderRadius.circular(8),
),
child: Row(
// mainAxisAlignment:
// MainAxisAlignment.start,
children: [
SizedBox(
width: 10,
),
Image.asset(mostread[index]),
SizedBox(
width: 15.w,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
width: 135.w,
child: text12W500("Stock Market Essentials"),
),
SizedBox(
width: 130.w,
child: text10W300(
"A Comprehensive Guide to Understanding the Market"),
)
],
)
],
),
),
],
);
},
),
),
],
),
);
}
}
class Audios extends StatelessWidget {
const Audios({
super.key,
required this.audio,
required this.audioname,
required this.audionewimage,
required this.audionamenewrelease,
});
final List<String> audio;
final List<String> audioname;
final List<String> audionewimage;
final List<String> audionamenewrelease;
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
SizedBox(
width: 300,
child: CustomTextFormField(
leadingIcon: Icon(Icons.search),
),
),
SizedBox(
width: 15.w,
),
Image.asset(
"assets/images/png/filter.png",
height: 30.h,
width: 30.w,
),
],
),
SizedBox(
height: 10.h,
),
text22W600('Content Bytes'),
sizedBoxHeight(8.w),
text16W400_DADADA('The Beauty and Power of Video'),
sizedBoxHeight(20.h),
Container(
height: 550,
child: GridView.builder(
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
mainAxisExtent: 172,
crossAxisCount: 2, // number of items in each row
mainAxisSpacing: 8.0, // spacing between rows
crossAxisSpacing: 8.0, // spacing between columns
),
itemCount: 6, // total number of items
itemBuilder: (context, index) {
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.white.withOpacity(0.1),
Color(0xFFFFFFFF).withOpacity(0.05),
],
stops: [
0.1,
1,
],
),
borderRadius: BorderRadius.circular(8),
),
child: Stack(
children: [
Image.asset(
audio[index],
),
Positioned(
bottom: 5,
left: 5,
child: Row(
children: [
CircleAvatar(
radius: 18.sp,
child: Icon(Icons.headphones),
),
SizedBox(
width: 5.w,
),
SizedBox(
width: 125.w,
child: text14W500(audioname[index]),
),
],
),
),
],
),
);
},
),
),
SizedBox(
height: 20.h,
),
text22W600("New Release"),
SizedBox(
height: 25.h,
),
Container(
height: 250.h,
child: ListView.separated(
separatorBuilder: (context, index) {
return SizedBox(
width: 10,
);
},
scrollDirection: Axis.horizontal,
itemCount: 3,
itemBuilder: (context, index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 183.h,
width: 148.w,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.white.withOpacity(0.1),
Color(0xFFFFFFFF).withOpacity(0.05),
],
stops: [
0.1,
1,
],
),
borderRadius: BorderRadius.circular(8),
),
child: Stack(
children: [
Image.asset(audionewimage[index]),
Positioned(
right: 5,
top: 5,
child: CircleAvatar(
radius: 15,
child: Icon(
Icons.headphones,
size: 20,
),
),
),
],
),
),
SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
width: 148.w,
child: text14W500Overflow(audionamenewrelease[index]),
),
],
)
],
);
},
),
)
],
),
);
}
}
class Videos extends StatelessWidget {
const Videos({
super.key,
required this.images,
});
final List<String> images;
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
SizedBox(
width: 300,
child: CustomTextFormField(
leadingIcon: Icon(Icons.search),
),
),
SizedBox(
width: 15.w,
),
Image.asset(
"assets/images/png/filter.png",
height: 30.h,
width: 30.w,
),
],
),
SizedBox(
height: 10.h,
),
text22W600('Content Bytes'),
sizedBoxHeight(8.w),
text16W400_DADADA('The Beauty and Power of Video'),
sizedBoxHeight(20.h),
InkWell(
onTap: () {
Get.to(PlayerWidget());
},
child: commonGlassContainer(
borderradius: 8,
width: double.infinity,
height: 300.h,
customWidget: Padding(
padding:
EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
child: Column(
children: [
Container(
height: 200.h,
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.r),
image: DecorationImage(
image: AssetImage(
'assets/images/png/Rectangle 17934.png'))),
child: Center(
child: SvgPicture.asset(
'assets/images/svg/gridicons_play.svg',
height: 56.h,
width: 56.w,
),
),
),
sizedBoxHeight(20.h),
Row(
children: [
CircleAvatar(
radius: 23.r,
backgroundImage: AssetImage(
'assets/images/png/Ellipse 1494.png'),
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text18W500('Week of 21st February 2024'),
// sizedBoxHeight(10.h),
text12W400_979797('20k views . 2 days ago'),
],
)
],
)
],
),
)),
),
sizedBoxHeight(20.h),
InkWell(
onTap: () {
Get.to(PlayerWidget());
},
child: commonGlassContainer(
borderradius: 8,
width: double.infinity,
height: 300.h,
customWidget: Padding(
padding:
EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
child: Column(
children: [
Container(
height: 200.h,
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.r),
image: DecorationImage(
image: AssetImage(
'assets/images/png/Rectangle 17934.png'))),
child: Center(
child: SvgPicture.asset(
'assets/images/svg/gridicons_play.svg',
height: 56.h,
width: 56.w,
),
),
),
sizedBoxHeight(20.h),
Row(
children: [
CircleAvatar(
radius: 23.r,
backgroundImage: AssetImage(
'assets/images/png/Ellipse 1494.png'),
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text18W500('Week of 21st February 2024'),
// sizedBoxHeight(10.h),
text12W400_979797('20k views . 2 days ago'),
],
)
],
)
],
),
)),
),
sizedBoxHeight(15.h),
text22W600("Reels"),
sizedBoxHeight(25.h),
Container(
height: 500,
child: GridView.builder(
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
mainAxisExtent: 215,
crossAxisCount: 2, // number of items in each row
mainAxisSpacing: 8.0, // spacing between rows
crossAxisSpacing: 8.0, // spacing between columns
),
itemCount: 4, // total number of items
itemBuilder: (context, index) {
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.white.withOpacity(0.1),
Color(0xFFFFFFFF).withOpacity(0.05),
],
stops: [
0.1,
1,
],
),
borderRadius: BorderRadius.circular(8),
),
child: Image.asset(images[index]),
);
},
),
),
sizedBoxHeight(20.h),
InkWell(
onTap: () {
Get.to(PlayerWidget());
},
child: commonGlassContainer(
borderradius: 8,
width: double.infinity,
height: 300.h,
customWidget: Padding(
padding:
EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
child: Column(
children: [
Container(
height: 200.h,
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.r),
image: DecorationImage(
image: AssetImage(
'assets/images/png/Rectangle 17934.png'))),
child: Center(
child: SvgPicture.asset(
'assets/images/svg/gridicons_play.svg',
height: 56.h,
width: 56.w,
),
),
),
sizedBoxHeight(20.h),
Row(
children: [
CircleAvatar(
radius: 23.r,
backgroundImage: AssetImage(
'assets/images/png/Ellipse 1494.png'),
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text18W500('Week of 21st February 2024'),
// sizedBoxHeight(10.h),
text12W400_979797('20k views . 2 days ago'),
],
)
],
)
],
),
)),
),
],
),
);
}
}
class ContentTabBar extends StatelessWidget {
// Set the desired height
@override
Widget build(BuildContext context) {
return TabBar(
tabAlignment: TabAlignment.fill,
isScrollable: false,
dividerColor: Colors.transparent,
labelStyle: TextStyle(
fontSize: 18.sp,
color: Colors.white,
fontWeight: FontWeight.w500,
fontFamily: 'manrope'),
indicatorSize: TabBarIndicatorSize.tab,
indicatorWeight: 2,
indicatorColor: const Color(0xff6C0000),
labelColor: Colors.white,
unselectedLabelColor: const Color(0xFF464646),
overlayColor: MaterialStateProperty.all(const Color(0xFFFFFFFF)),
tabs: const [
Tab(
text: 'Videos',
),
Tab(
text: 'Audios',
),
Tab(
text: 'Reads',
),
]);
}
}

View File

@@ -0,0 +1,67 @@
import 'package:chewie/chewie.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:traderscircuit/Utils/Common/CommonAppBar.dart';
import 'package:video_player/video_player.dart';
class PlayerWidget extends StatefulWidget {
const PlayerWidget({super.key});
@override
State<PlayerWidget> createState() => _PlayerWidgetState();
}
class _PlayerWidgetState extends State<PlayerWidget> {
late VideoPlayerController videoPlayerController;
late ChewieController chewieController;
bool isVideoIntialized = false;
@override
void initState() {
// TODO: implement initState
super.initState();
videoPlayerController = VideoPlayerController.networkUrl(Uri.parse(
"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"));
chewieController = ChewieController(
videoPlayerController: videoPlayerController,
autoPlay: true,
looping: false);
videoPlayerController.initialize().then((value) {
setState(() {
isVideoIntialized = true;
});
});
}
@override
Widget build(BuildContext context) {
if (isVideoIntialized) {
return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
backgroundColor: Colors.black,
leading: InkWell(
onTap: () => Get.back(),
child: Icon(
Icons.arrow_back_ios,
color: Colors.white,
),
),
),
// CommonAppbar(titleTxt: ""),
body: Center(
child: AspectRatio(
aspectRatio: videoPlayerController.value.aspectRatio,
child: Chewie(
controller: chewieController,
),
),
),
);
} else {
return Center(child: CircularProgressIndicator());
}
}
}

View File

@@ -13,6 +13,9 @@ class Settings extends StatefulWidget {
class _SettingsState extends State<Settings> {
bool isSwitched = false;
bool isSwitched1 = false;
bool isSwitched2 = false;
bool isSwitched3 = false;
void _toggleSwitch(bool value) {
setState(() {
@@ -20,6 +23,24 @@ class _SettingsState extends State<Settings> {
});
}
void _toggleSwitch1(bool value1) {
setState(() {
isSwitched1 = value1;
});
}
void _toggleSwitch2(bool value2) {
setState(() {
isSwitched2 = value2;
});
}
void _toggleSwitch3(bool value3) {
setState(() {
isSwitched3 = value3;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -43,23 +64,7 @@ class _SettingsState extends State<Settings> {
children: [
// CommonDropdownBtn(hint: "hint", items: ["hi", "hii"]),
SizedBox(
height: 10.h,
),
Row(
children: [
text20W400("Dark Mode"),
Spacer(),
Switch(
value: isSwitched,
onChanged: _toggleSwitch,
activeTrackColor: Colors.green,
activeColor: Colors.white,
inactiveTrackColor: Colors.white,
inactiveThumbColor: Colors.black,
),
],
),
SizedBox(
height: 40.h,
),
@@ -103,8 +108,8 @@ class _SettingsState extends State<Settings> {
text20W400("In - App Notifications"),
Spacer(),
Switch(
value: isSwitched,
onChanged: _toggleSwitch,
value: isSwitched1,
onChanged: _toggleSwitch1,
activeTrackColor: Colors.green,
activeColor: Colors.white,
inactiveTrackColor: Colors.white,
@@ -120,8 +125,8 @@ class _SettingsState extends State<Settings> {
text20W400("Push Notifications"),
Spacer(),
Switch(
value: isSwitched,
onChanged: _toggleSwitch,
value: isSwitched2,
onChanged: _toggleSwitch2,
activeTrackColor: Colors.green,
activeColor: Colors.white,
inactiveTrackColor: Colors.white,
@@ -137,8 +142,8 @@ class _SettingsState extends State<Settings> {
text20W400("E-mail Notifications"),
Spacer(),
Switch(
value: isSwitched,
onChanged: _toggleSwitch,
value: isSwitched3,
onChanged: _toggleSwitch3,
activeTrackColor: Colors.green,
activeColor: Colors.white,
inactiveTrackColor: Colors.white,

View File

@@ -41,6 +41,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
chewie:
dependency: "direct main"
description:
name: chewie
sha256: "8bc4ac4cf3f316e50a25958c0f5eb9bb12cf7e8308bb1d74a43b230da2cfc144"
url: "https://pub.dev"
source: hosted
version: "1.7.5"
clock:
dependency: transitive
description:
@@ -53,10 +61,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.18.0"
connectivity_plus:
dependency: "direct main"
description:
@@ -85,12 +93,10 @@ packages:
dependency: transitive
description:
name: cross_file
sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e
url: "https://pub.dev"
source: hosted
version: "0.3.3+8"
crypto:
dependency: transitive
description:
@@ -99,6 +105,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.3"
csslib:
dependency: transitive
description:
name: csslib
sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
cupertino_icons:
dependency: "direct main"
description:
@@ -274,6 +288,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.0"
html:
dependency: transitive
description:
name: html
sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a"
url: "https://pub.dev"
source: hosted
version: "0.15.4"
http:
dependency: transitive
description:
@@ -398,12 +420,10 @@ packages:
dependency: "direct main"
description:
name: lottie
sha256: ce2bb2605753915080e4ee47f036a64228c88dc7f56f7bc1dbe912d75b55b1e2
sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "2.7.0"
matcher:
dependency: transitive
description:
@@ -424,10 +444,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
mime:
dependency: transitive
description:
@@ -436,6 +456,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.4"
nested:
dependency: transitive
description:
name: nested
sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
nm:
dependency: transitive
description:
@@ -444,6 +472,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.5.0"
package_info_plus:
dependency: transitive
description:
name: package_info_plus
sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79"
url: "https://pub.dev"
source: hosted
version: "5.0.1"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
path:
dependency: transitive
description:
@@ -532,6 +576,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.7.4"
provider:
dependency: transitive
description:
name: provider
sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c
url: "https://pub.dev"
source: hosted
version: "6.1.2"
shared_preferences:
dependency: "direct main"
description:
@@ -605,18 +657,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
@@ -637,10 +689,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.6.1"
typed_data:
dependency: transitive
description:
@@ -681,14 +733,70 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
video_player:
dependency: "direct main"
description:
name: video_player
sha256: afc65f4b8bcb2c188f64a591f84fb471f4f2e19fc607c65fd8d2f8fedb3dec23
url: "https://pub.dev"
source: hosted
version: "2.8.3"
video_player_android:
dependency: transitive
description:
name: video_player_android
sha256: "4dd9b8b86d70d65eecf3dcabfcdfbb9c9115d244d022654aba49a00336d540c2"
url: "https://pub.dev"
source: hosted
version: "2.4.12"
video_player_avfoundation:
dependency: transitive
description:
name: video_player_avfoundation
sha256: "309e3962795e761be010869bae65c0b0e45b5230c5cee1bec72197ca7db040ed"
url: "https://pub.dev"
source: hosted
version: "2.5.6"
video_player_platform_interface:
dependency: transitive
description:
name: video_player_platform_interface
sha256: "236454725fafcacf98f0f39af0d7c7ab2ce84762e3b63f2cbb3ef9a7e0550bc6"
url: "https://pub.dev"
source: hosted
version: "6.2.2"
video_player_web:
dependency: transitive
description:
name: video_player_web
sha256: "34beb3a07d4331a24f7e7b2f75b8e2b103289038e07e65529699a671b6a6e2cb"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
wakelock_plus:
dependency: transitive
description:
name: wakelock_plus
sha256: f268ca2116db22e57577fb99d52515a24bdc1d570f12ac18bb762361d43b043d
url: "https://pub.dev"
source: hosted
version: "1.1.4"
wakelock_plus_platform_interface:
dependency: transitive
description:
name: wakelock_plus_platform_interface
sha256: "40fabed5da06caff0796dc638e1f07ee395fb18801fbff3255a2372db2d80385"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
web:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
version: "0.3.0"
win32:
dependency: transitive
description:
@@ -714,7 +822,5 @@ packages:
source: hosted
version: "6.3.0"
sdks:
dart: ">=3.2.0 <4.0.0"
flutter: ">=3.16.0"

View File

@@ -22,20 +22,15 @@ dependencies:
pin_code_fields: ^8.0.1
fluttertoast: ^8.0.9
dropdown_button2: ^2.1.4
gap: ^3.0.1
image_picker: ^1.0.7
dotted_border: ^2.1.0
image_cropper: ^5.0.1
gap: ^3.0.1
file_picker: ^8.0.0+1
lottie: ^2.7.0
chewie: ^1.7.5
video_player: ^2.8.3
dev_dependencies: