diff --git a/android/app/build.gradle b/android/app/build.gradle index ae4a4ac..7b3ce58 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion flutter.compileSdkVersion + compileSdkVersion 34 ndkVersion flutter.ndkVersion compileOptions { diff --git a/assets/images/png/filter.png b/assets/images/png/filter.png new file mode 100644 index 0000000..66a0eec Binary files /dev/null and b/assets/images/png/filter.png differ diff --git a/assets/images/png/sidemenu/Read1.png b/assets/images/png/sidemenu/Read1.png new file mode 100644 index 0000000..e114c25 Binary files /dev/null and b/assets/images/png/sidemenu/Read1.png differ diff --git a/assets/images/png/sidemenu/Read2.png b/assets/images/png/sidemenu/Read2.png new file mode 100644 index 0000000..692fb6e Binary files /dev/null and b/assets/images/png/sidemenu/Read2.png differ diff --git a/assets/images/png/sidemenu/audio1.png b/assets/images/png/sidemenu/audio1.png new file mode 100644 index 0000000..59c210e Binary files /dev/null and b/assets/images/png/sidemenu/audio1.png differ diff --git a/assets/images/png/sidemenu/audio2.png b/assets/images/png/sidemenu/audio2.png new file mode 100644 index 0000000..b9ab260 Binary files /dev/null and b/assets/images/png/sidemenu/audio2.png differ diff --git a/assets/images/png/sidemenu/audio3.png b/assets/images/png/sidemenu/audio3.png new file mode 100644 index 0000000..3c846fc Binary files /dev/null and b/assets/images/png/sidemenu/audio3.png differ diff --git a/assets/images/png/sidemenu/audio4.png b/assets/images/png/sidemenu/audio4.png new file mode 100644 index 0000000..a444e4c Binary files /dev/null and b/assets/images/png/sidemenu/audio4.png differ diff --git a/assets/images/png/sidemenu/audionew1.png b/assets/images/png/sidemenu/audionew1.png new file mode 100644 index 0000000..4023147 Binary files /dev/null and b/assets/images/png/sidemenu/audionew1.png differ diff --git a/assets/images/png/sidemenu/audionew2.png b/assets/images/png/sidemenu/audionew2.png new file mode 100644 index 0000000..5ab5327 Binary files /dev/null and b/assets/images/png/sidemenu/audionew2.png differ diff --git a/assets/images/png/sidemenu/book1.png b/assets/images/png/sidemenu/book1.png new file mode 100644 index 0000000..94996be Binary files /dev/null and b/assets/images/png/sidemenu/book1.png differ diff --git a/assets/images/png/sidemenu/reels1.png b/assets/images/png/sidemenu/reels1.png new file mode 100644 index 0000000..73c1b10 Binary files /dev/null and b/assets/images/png/sidemenu/reels1.png differ diff --git a/assets/images/png/sidemenu/reels2.png b/assets/images/png/sidemenu/reels2.png new file mode 100644 index 0000000..907d73e Binary files /dev/null and b/assets/images/png/sidemenu/reels2.png differ diff --git a/assets/images/png/sidemenu/reels3.png b/assets/images/png/sidemenu/reels3.png new file mode 100644 index 0000000..a5ae334 Binary files /dev/null and b/assets/images/png/sidemenu/reels3.png differ diff --git a/assets/images/png/sidemenu/reels4.png b/assets/images/png/sidemenu/reels4.png new file mode 100644 index 0000000..b0ccaed Binary files /dev/null and b/assets/images/png/sidemenu/reels4.png differ diff --git a/lib/Utils/text.dart b/lib/Utils/text.dart index e0ee671..cf5207a 100644 --- a/lib/Utils/text.dart +++ b/lib/Utils/text.dart @@ -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'), + ); +} diff --git a/lib/main.dart b/lib/main.dart index c5b6e7e..d049805 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -110,7 +110,7 @@ class _MyAppState extends State with WidgetsBindingObserver { fontFamily: 'manrope', ), debugShowCheckedModeBanner: false, - initialRoute: RouteName.splashScreen, + initialRoute: RouteName.contentbytes, getPages: AppRoutes.appRoutes(), ), designSize: const Size(390, 844), diff --git a/lib/resources/routes/route_name.dart b/lib/resources/routes/route_name.dart index 6bf17ca..8da1d48 100644 --- a/lib/resources/routes/route_name.dart +++ b/lib/resources/routes/route_name.dart @@ -41,11 +41,16 @@ class RouteName { 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'; + //my Profile static const String myProfileScreen = '/myProfileScreen'; + } diff --git a/lib/resources/routes/routes.dart b/lib/resources/routes/routes.dart index 8e680e3..17f04e8 100644 --- a/lib/resources/routes/routes.dart +++ b/lib/resources/routes/routes.dart @@ -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'; @@ -154,6 +155,10 @@ class AppRoutes { name: RouteName.settings, page: () => const Settings(), ), + GetPage( + name: RouteName.contentbytes, + page: () => const ContentBytes(), + ), //contact us diff --git a/lib/view/MainScreen/ExploreUnseen.dart b/lib/view/MainScreen/ExploreUnseen.dart index 7a8bcb3..387302c 100644 --- a/lib/view/MainScreen/ExploreUnseen.dart +++ b/lib/view/MainScreen/ExploreUnseen.dart @@ -27,10 +27,8 @@ class _ExploreUnseenState extends State { @override Widget build(BuildContext context) { return Scaffold( - drawerEnableOpenDragGesture: false, key: _scaffoldKey1, backgroundColor: Colors.black, - drawer: Container(child: SideMenu()), extendBody: true, appBar: CommonAppbar(titleTxt: ''), diff --git a/lib/view/MainScreen/HomeScreen.dart b/lib/view/MainScreen/HomeScreen.dart index 795eb12..0b532ce 100644 --- a/lib/view/MainScreen/HomeScreen.dart +++ b/lib/view/MainScreen/HomeScreen.dart @@ -12,6 +12,7 @@ import 'package:traderscircuit/Utils/Common/sized_box.dart'; import 'package:traderscircuit/Utils/text.dart'; import 'package:traderscircuit/resources/routes/route_name.dart'; import 'package:traderscircuit/view/MainScreen/MainScreen.dart'; +import 'package:traderscircuit/view/Sidemenu/PlayerWidget.dart'; import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart'; import 'package:traderscircuit/view/onBoarding/splashScreen1.dart'; @@ -206,26 +207,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( @@ -236,19 +242,26 @@ Widget ActiveCallsTab() { 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, + InkWell( + onTap: () { + Get.to( + () => PlayerWidget(), + ); + }, + child: 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, + ), ), ), ), diff --git a/lib/view/MainScreen/Notification.dart b/lib/view/MainScreen/Notification.dart index 42a3422..d4d348b 100644 --- a/lib/view/MainScreen/Notification.dart +++ b/lib/view/MainScreen/Notification.dart @@ -87,6 +87,7 @@ class _NotificationScreenState extends State { ), sizedBoxHeight(30.h), ListView.builder( + physics: NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: CardList.length, itemBuilder: (context, index) { diff --git a/lib/view/MainScreen/Portfolio/Holdings.dart b/lib/view/MainScreen/Portfolio/Holdings.dart index f42d4f7..46c463c 100644 --- a/lib/view/MainScreen/Portfolio/Holdings.dart +++ b/lib/view/MainScreen/Portfolio/Holdings.dart @@ -34,7 +34,8 @@ class _HoldingsState extends State { return Scaffold( key: _scaffoldKey1, backgroundColor: Colors.black, - drawer: Container(width: 320.w, child: SideMenu()), + drawerEnableOpenDragGesture: false, + drawer: Container( child: SideMenu()), extendBody: true, appBar: AppBar( scrolledUnderElevation: 0.0, diff --git a/lib/view/MainScreen/Portfolio/PortfolioEmpty.dart b/lib/view/MainScreen/Portfolio/PortfolioEmpty.dart index ac8465d..cfa7930 100644 --- a/lib/view/MainScreen/Portfolio/PortfolioEmpty.dart +++ b/lib/view/MainScreen/Portfolio/PortfolioEmpty.dart @@ -25,7 +25,8 @@ class _PortfolioState extends State { return Scaffold( key: _scaffoldKey1, backgroundColor: Colors.black, - drawer: Container(width: 320.w, child: SideMenu()), + drawerEnableOpenDragGesture: false, + drawer: Container(child: SideMenu()), extendBody: true, appBar: AppBar( scrolledUnderElevation: 0.0, diff --git a/lib/view/MainScreen/ShortTrade.dart b/lib/view/MainScreen/ShortTrade.dart index 0f2939d..0ea7964 100644 --- a/lib/view/MainScreen/ShortTrade.dart +++ b/lib/view/MainScreen/ShortTrade.dart @@ -10,7 +10,9 @@ 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/resources/routes/route_name.dart'; import 'package:traderscircuit/view/MainScreen/MainScreen.dart'; +import 'package:traderscircuit/view/Sidemenu/PlayerWidget.dart'; import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart'; import 'package:traderscircuit/view/onBoarding/splashScreen1.dart'; @@ -29,7 +31,7 @@ class _ShortTradeState extends State { Widget build(BuildContext context) { return Scaffold( key: _scaffoldKey1, - backgroundColor: Colors.black, + backgroundColor: Colors.black, drawerEnableOpenDragGesture: false, drawer: Container(child: SideMenu()), extendBody: true, appBar: AppBar( @@ -168,7 +170,14 @@ class _ShortTradeState extends State { border: Border.all( color: Color(0xFF3A3A3A), )), - child: Center(child: text16W500('View More')), + child: Center( + child: InkWell( + onTap: () { + Get.toNamed(RouteName.contentbytes); + }, + child: text16W500('View More'), + ), + ), ), ], ), @@ -183,19 +192,24 @@ class _ShortTradeState extends State { 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, + InkWell( + onTap: () { + Get.to(PlayerWidget()); + }, + child: 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, + ), ), ), ), @@ -236,7 +250,6 @@ class _ShortTradeState extends State { void _unlockbottomsheet() { Get.bottomSheet( - commonGlassContainer( width: double.infinity, height: 439.h, @@ -264,7 +277,6 @@ class _ShortTradeState extends State { ) ], ), - ), ), ), diff --git a/lib/view/Sidemenu/ContentBytes.dart b/lib/view/Sidemenu/ContentBytes.dart new file mode 100644 index 0000000..3a1bd8a --- /dev/null +++ b/lib/view/Sidemenu/ContentBytes.dart @@ -0,0 +1,827 @@ +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 createState() => _ContentBytesState(); +} + +class _ContentBytesState extends State { + GlobalKey _scaffoldKey1 = GlobalKey(); + + final selectedIndex = 0.obs; + List 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 audionewimage = [ + "assets/images/png/sidemenu/audionew1.png", + "assets/images/png/sidemenu/audionew2.png", + "assets/images/png/sidemenu/audionew1.png", + ]; + + List mostread = [ + "assets/images/png/sidemenu/Read1.png", + "assets/images/png/sidemenu/Read2.png", + "assets/images/png/sidemenu/Read1.png", + ]; + + List 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 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 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 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 audio; + final List audioname; + final List audionewimage; + final List 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 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', + ), + ]); + } +} diff --git a/lib/view/Sidemenu/PlayerWidget.dart b/lib/view/Sidemenu/PlayerWidget.dart new file mode 100644 index 0000000..5e64e2b --- /dev/null +++ b/lib/view/Sidemenu/PlayerWidget.dart @@ -0,0 +1,68 @@ +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 createState() => _PlayerWidgetState(); +} + +class _PlayerWidgetState extends State { + late VideoPlayerController videoPlayerController; + late ChewieController chewieController; + + @override + void initState() { + // TODO: implement initState + super.initState(); + _initializePlayer(); + } + + _initializePlayer() async { + videoPlayerController = VideoPlayerController.networkUrl(Uri.tryParse( + "https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4")!); + + await videoPlayerController.initialize(); + initChewie(); + } + + initChewie() { + chewieController = ChewieController( + videoPlayerController: videoPlayerController, + autoPlay: true, + looping: false); + } + + @override + Widget build(BuildContext context) { + return videoPlayerController != null && + videoPlayerController.value.isInitialized + ? 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, + ), + ), + ), + ) + : Center(child: CircularProgressIndicator()); + } +} diff --git a/lib/view/Sidemenu/Settings.dart b/lib/view/Sidemenu/Settings.dart index ac776fb..8115f12 100644 --- a/lib/view/Sidemenu/Settings.dart +++ b/lib/view/Sidemenu/Settings.dart @@ -13,6 +13,9 @@ class Settings extends StatefulWidget { class _SettingsState extends State { 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 { }); } + 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 { 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 { 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 { 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 { text20W400("E-mail Notifications"), Spacer(), Switch( - value: isSwitched, - onChanged: _toggleSwitch, + value: isSwitched3, + onChanged: _toggleSwitch3, activeTrackColor: Colors.green, activeColor: Colors.white, inactiveTrackColor: Colors.white, diff --git a/lib/view/Sidemenu/Sidemenu.dart b/lib/view/Sidemenu/Sidemenu.dart index 82941b9..5ed9587 100644 --- a/lib/view/Sidemenu/Sidemenu.dart +++ b/lib/view/Sidemenu/Sidemenu.dart @@ -183,7 +183,7 @@ class _SideMenuState extends State { selected: true, onTap: () { setState(() { - // Get.toNamed(RouteName.privacypolicy); + Get.toNamed(RouteName.contentbytes); }); }, ), @@ -254,7 +254,7 @@ class _SideMenuState extends State { ListTile( leading: SvgPicture.asset( 'assets/images/svg/sidemenu/Group 51347.svg'), - title: text18W400('My Subscription'), + title: text18W400('My Risk Profile'), trailing: Container( height: 35.h, width: 122.w, @@ -267,7 +267,7 @@ class _SideMenuState extends State { selected: true, onTap: () { setState(() { - // Get.toNamed(RouteName.privacypolicy); + Get.toNamed(RouteName.updateriskprofile); }); }, ), @@ -458,7 +458,14 @@ void navigateTo(int index, BuildContext context) { text20W400_center( 'Are you sure you want to logout your account?'), sizedBoxHeight(50.h), - CommonYesNoBtn(), + CommonYesNoBtn( + yesonTap: () { + Get.toNamed(RouteName.loginscreen); + }, + noonTap: () { + Get.back(); + }, + ), ], ), ), diff --git a/lib/view/login/AddDetails.dart b/lib/view/login/AddDetails.dart index 0de3d32..225ee81 100644 --- a/lib/view/login/AddDetails.dart +++ b/lib/view/login/AddDetails.dart @@ -109,7 +109,9 @@ class _AddDetailsState extends State { SizedBox( height: 15.h, ), - CustomTextFormField(), + CustomTextFormField( + texttype: TextInputType.emailAddress, + ), SizedBox( height: 30.h, ), @@ -121,7 +123,9 @@ class _AddDetailsState extends State { SizedBox( height: 15.h, ), - CustomTextFormField(), + CustomTextFormField( + texttype: TextInputType.phone, + ), SizedBox( height: 30.h, ), diff --git a/lib/view/login/Kyc.dart b/lib/view/login/Kyc.dart index 187cc55..aea9845 100644 --- a/lib/view/login/Kyc.dart +++ b/lib/view/login/Kyc.dart @@ -380,7 +380,9 @@ class _KycState extends State { SizedBox( height: 15.h, ), - const CustomTextFormField(), + const CustomTextFormField( + texttype: TextInputType.phone, + ), SizedBox( height: 30.h, ), diff --git a/lib/view/login/LoginScreen.dart b/lib/view/login/LoginScreen.dart index 6f8e5d4..dbb2766 100644 --- a/lib/view/login/LoginScreen.dart +++ b/lib/view/login/LoginScreen.dart @@ -309,8 +309,13 @@ class _LoginScreenState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - text16W700( - "Continue as guest", + InkWell( + onTap: () { + Get.toNamed(RouteName.mainscreen); + }, + child: text16W700( + "Continue as guest", + ), ), ], ) diff --git a/lib/view/login/VerifyOtp.dart b/lib/view/login/VerifyOtp.dart index 38d0966..da0d00a 100644 --- a/lib/view/login/VerifyOtp.dart +++ b/lib/view/login/VerifyOtp.dart @@ -50,6 +50,8 @@ class _VerifyOTPState extends State { child: PinCodeTextField( showCursor: true, cursorColor: Colors.white, + hintStyle: + TextStyle(fontSize: 18.sp, color: Colors.white), textStyle: TextStyle(fontSize: 18.sp, color: Colors.white), errorTextSpace: 22, diff --git a/pubspec.lock b/pubspec.lock index 248dcc8..e0914ed 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -65,6 +65,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: @@ -121,6 +129,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: @@ -336,6 +352,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: @@ -496,6 +520,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: @@ -520,6 +552,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.5.3" + package_info_plus: + dependency: transitive + description: + name: package_info_plus + sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" + url: "https://pub.dev" + source: hosted + version: "4.2.0" + 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: @@ -632,6 +680,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" rxdart: dependency: transitive description: @@ -829,6 +885,62 @@ 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: bc923884640d6dc403050586eb40713cdb8d1d84e6886d8aca50ab04c59124c2 + url: "https://pub.dev" + source: hosted + version: "2.5.2" + 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: diff --git a/pubspec.yaml b/pubspec.yaml index 7e088d5..3614205 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,6 +28,9 @@ dependencies: image_cropper: ^5.0.1 file_picker: ^8.0.0+1 lottie: ^2.7.0 + chewie: ^1.7.5 + video_player: ^2.5.2 + onesignal_flutter: ^3.5.1 cached_network_image: ^3.3.1 firebase_core: