From 210b5d4eb460d1951f882c71a036db795847077e Mon Sep 17 00:00:00 2001 From: jayesh Date: Fri, 12 Apr 2024 18:47:26 +0530 Subject: [PATCH] \content bytes --- assets/images/svg/filled_thumb_down.svg | 3 + assets/images/svg/filled_thumb_up.svg | 3 + lib/controller/content_bytes_controller.dart | 8 +- .../Sidemenu/ContentByte/ContentBytes.dart | 972 +++++++++--------- lib/view/Sidemenu/ContentByte/read_pdf.dart | 24 + lib/view/Sidemenu/FaqScreen.dart | 6 +- pubspec.lock | 154 ++- pubspec.yaml | 6 +- 8 files changed, 645 insertions(+), 531 deletions(-) create mode 100644 assets/images/svg/filled_thumb_down.svg create mode 100644 assets/images/svg/filled_thumb_up.svg create mode 100644 lib/view/Sidemenu/ContentByte/read_pdf.dart diff --git a/assets/images/svg/filled_thumb_down.svg b/assets/images/svg/filled_thumb_down.svg new file mode 100644 index 0000000..4e7fd4e --- /dev/null +++ b/assets/images/svg/filled_thumb_down.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svg/filled_thumb_up.svg b/assets/images/svg/filled_thumb_up.svg new file mode 100644 index 0000000..440e863 --- /dev/null +++ b/assets/images/svg/filled_thumb_up.svg @@ -0,0 +1,3 @@ + + + diff --git a/lib/controller/content_bytes_controller.dart b/lib/controller/content_bytes_controller.dart index 98e9a80..39ff627 100644 --- a/lib/controller/content_bytes_controller.dart +++ b/lib/controller/content_bytes_controller.dart @@ -27,14 +27,14 @@ class ContentBytesController extends GetxController { final buttonNotifier = ValueNotifier(ButtonState.paused); late AudioPlayer _audioPlayer; - ContentBytesController() { - init(0); - } + + void getAudio() => _audioPlayer; void init(index) async { _audioPlayer = AudioPlayer(); try { - await _audioPlayer.setUrl(contentBytesModel.data!.audio![index].file ?? + await _audioPlayer.setUrl( + //contentBytesModel.data!.audio![index].file ?? 'https://ghantalele.com/uploads/files/data-78/38825/Besharam%20Rang_192(Ghantalele.com).mp3'); // await _audioPlayer.setAsset(url); } on PlayerException catch (e) { diff --git a/lib/view/Sidemenu/ContentByte/ContentBytes.dart b/lib/view/Sidemenu/ContentByte/ContentBytes.dart index 2b7d9a5..845b2fc 100644 --- a/lib/view/Sidemenu/ContentByte/ContentBytes.dart +++ b/lib/view/Sidemenu/ContentByte/ContentBytes.dart @@ -1,14 +1,12 @@ import 'dart:developer'; import 'package:audio_video_progress_bar/audio_video_progress_bar.dart'; -import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:gap/gap.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'; @@ -16,7 +14,7 @@ import 'package:traderscircuit/controller/content_bytes_controller.dart'; import 'package:traderscircuit/model/ContentBytesModel/content_bytes_categories_model.dart'; import 'package:traderscircuit/model/ContentBytesModel/content_bytes_model.dart'; import 'package:traderscircuit/view/Sidemenu/ContentByte/PlayerWidget.dart'; -import 'package:traderscircuit/view/Sidemenu/ContentByte/Reels.dart'; +import 'package:traderscircuit/view/Sidemenu/ContentByte/read_pdf.dart'; import 'package:traderscircuit/view/onBoarding/splashScreen1.dart'; import 'package:traderscircuit/view_model/ContentBytesApi/content_bytes_api.dart'; @@ -41,7 +39,7 @@ class ContentBytes extends StatefulWidget { } class _ContentBytesState extends State { - GlobalKey _scaffoldKey1 = GlobalKey(); + final GlobalKey _scaffoldKey1 = GlobalKey(); final selectedIndex = 0.obs; List reels = [ @@ -57,21 +55,6 @@ class _ContentBytesState extends State { "assets/images/png/sidemenu/Read1.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", - ]; - ContentBytesController contentBytesController = Get.put(ContentBytesController()); @override @@ -90,176 +73,187 @@ class _ContentBytesState extends State { @override Widget build(BuildContext context) { - return Scaffold( - key: _scaffoldKey1, - floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, - floatingActionButton: Obx(() => contentBytesController - .isAudioSeekBarVisible.value - ? Container( - width: Get.size.width, - height: 100, - decoration: const BoxDecoration( - color: Colors.red, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Align( - child: ClipRRect( - borderRadius: BorderRadius.circular(100), - child: Image.network( - contentBytesController - .contentBytesModel - .data! - .audio![ - contentBytesController.indexForAudios.value] - .image!, - width: 57, - height: 57, - fit: BoxFit.cover, + return WillPopScope( + onWillPop: () async { + return true; + }, + child: Scaffold( + key: _scaffoldKey1, + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + floatingActionButton: Obx(() => contentBytesController + .isAudioSeekBarVisible.value + ? commonGlassContainer( + borderradius: 8, + width: Get.size.width, + height: 100, + customWidget: Row( + children: [ + Expanded( + flex: 1, + child: Align( + child: ClipRRect( + borderRadius: BorderRadius.circular(100), + child: Image.network( + contentBytesController + .contentBytesModel + .data! + .audio![ + contentBytesController.indexForAudios.value] + .image!, + width: 57, + height: 57, + fit: BoxFit.cover, + ), ), ), ), - ), - Expanded( - flex: 3, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - contentBytesController - .contentBytesModel - .data! - .audio![ - contentBytesController.indexForAudios.value] - .title!, - style: const TextStyle( - fontSize: 14, - color: Colors.black, - fontFamily: 'SFPRO', - fontWeight: FontWeight.w600, - height: 1.5, - ), - ), - // SizedBox(height: 5), - Text( - contentBytesController - .contentBytesModel - .data! - .audio![ - contentBytesController.indexForAudios.value] - .description!, - style: const TextStyle( - fontSize: 14, - color: Colors.black, - fontFamily: 'SFPRO', - fontWeight: FontWeight.w600, - height: 1.5, - ), - ), - ValueListenableBuilder( - valueListenable: - contentBytesController.progressNotifier, - builder: (context, value, _) { - return ProgressBar( - progress: value.current, - buffered: value.buffered, - total: value.total, - onSeek: contentBytesController.seek, - barHeight: 4, - thumbRadius: 6, - thumbGlowRadius: 15, - thumbColor: Colors.black, - baseBarColor: Colors.black.withOpacity(0.3), - progressBarColor: Colors.black, - bufferedBarColor: Colors.black.withOpacity(0.3), - ); - }, - ), - ], - ), - ), - Expanded( - flex: 1, - child: ValueListenableBuilder( - valueListenable: contentBytesController.buttonNotifier, - builder: (context, value, _) { - switch (value) { - case ButtonState.paused: - return IconButton( - icon: const Icon(Icons.play_arrow_rounded), - iconSize: 50.0, - onPressed: () => contentBytesController.play( - contentBytesController.indexForAudios.value), - ); - case ButtonState.playing: - return IconButton( - icon: const Icon(Icons.pause), - iconSize: 50.0, - onPressed: contentBytesController.pause, - ); - } - }, - ), - ), - ], - ), - ) - : Container()), - backgroundColor: Colors.black, - extendBody: true, - appBar: const CommonAppbar(titleTxt: "Content Bytes"), - body: Stack( - children: [ - const CommonBlurLeft(), - const CommonBlurRight(), - Stack( - children: [ - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 16, vertical: 16), - child: ListView( - children: [ - const SizedBox( - height: 10, - ), - DefaultTabController( - length: 3, - // initialIndex: selectedIndex.value, + Expanded( + flex: 3, child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, children: [ - ContentTabBar(), - SizedBox( - height: 30.h, - ), - SizedBox( - height: 600.h, - child: TabBarView( - children: [ - Videos(images: reels), - Audios(), - Reads(mostread: mostread), - ], + Text( + contentBytesController + .contentBytesModel + .data! + .audio![ + contentBytesController.indexForAudios.value] + .title!, + style: const TextStyle( + fontSize: 14, + color: Colors.white, + fontFamily: 'hiragino', + fontWeight: FontWeight.w600, + height: 1.5, ), ), + // SizedBox(height: 5), + Text( + contentBytesController + .contentBytesModel + .data! + .audio![ + contentBytesController.indexForAudios.value] + .description!, + style: const TextStyle( + fontSize: 14, + color: Colors.white, + fontFamily: 'hiragino', + fontWeight: FontWeight.w600, + height: 1.5, + ), + ), + ValueListenableBuilder( + valueListenable: + contentBytesController.progressNotifier, + builder: (context, value, _) { + return ProgressBar( + progress: value.current, + buffered: value.buffered, + total: value.total, + onSeek: contentBytesController.seek, + barHeight: 4, + thumbRadius: 6, + thumbGlowRadius: 15, + timeLabelTextStyle: TextStyle( + color: Colors.white, + ), + thumbColor: Colors.white, + baseBarColor: Colors.white.withOpacity(0.3), + progressBarColor: Colors.white, + bufferedBarColor: Colors.white.withOpacity(0.3), + ); + }, + ), ], ), ), - sizedBoxHeight(40.h), + Expanded( + flex: 1, + child: ValueListenableBuilder( + valueListenable: contentBytesController.buttonNotifier, + builder: (context, value, _) { + switch (value) { + case ButtonState.paused: + return IconButton( + icon: const Icon( + Icons.play_arrow_rounded, + color: Colors.white, + ), + iconSize: 50.0, + onPressed: () => contentBytesController.play( + contentBytesController + .indexForAudios.value), + ); + case ButtonState.playing: + return IconButton( + icon: const Icon(Icons.pause, + color: Colors.white), + iconSize: 50.0, + onPressed: contentBytesController.pause, + ); + } + }, + ), + ), ], ), - ), - ], - ), - ], + ) + : Container()), + backgroundColor: Colors.black, + extendBody: true, + appBar: const CommonAppbar(titleTxt: "Content Bytes"), + body: Stack( + children: [ + const CommonBlurLeft(), + const CommonBlurRight(), + Stack( + children: [ + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: ListView( + children: [ + const 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(), + Reads(mostread: mostread), + ], + ), + ), + ], + ), + ), + sizedBoxHeight(40.h), + ], + ), + ), + ], + ), + ], + ), ), ); } } -class Reads extends StatelessWidget { +class Reads extends StatefulWidget { const Reads({ super.key, required this.mostread, @@ -267,6 +261,13 @@ class Reads extends StatelessWidget { final List mostread; + @override + State createState() => _ReadsState(); +} + +class _ReadsState extends State { + ContentBytesController contentBytesController = + Get.put(ContentBytesController()); @override Widget build(BuildContext context) { return SingleChildScrollView( @@ -296,206 +297,181 @@ class Reads extends StatelessWidget { // ), 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: [ - const SizedBox( - width: 10, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const 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'), - ), - const Spacer() - ], - ), - const 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: [ - const SizedBox( - width: 10, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const 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'), - ), - const Spacer() - ], - ), - const 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) { + ListView.builder( + itemCount: + contentBytesController.contentBytesModel.data!.read!.length, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemBuilder: (ctx, 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), - const Color(0xFFFFFFFF).withOpacity(0.05), - ], - stops: [ - 0.1, - 1, + InkWell( + onTap: () { + 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, + child: text16W400( + '"${contentBytesController.contentBytesModel.data!.read![index].description}"'), + ), + const Spacer() + ], + ), + Column( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Image.network( + "${contentBytesController.contentBytesModel.data!.read![index].image}", + height: 110, + ), + ], + ) ], ), - 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), - const Color(0xFFFFFFFF).withOpacity(0.05), - ], - stops: [ - 0.1, - 1, - ], - ), - borderRadius: BorderRadius.circular(8), - ), - child: Row( - // mainAxisAlignment: - // MainAxisAlignment.start, - children: [ - const 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"), - ) - ], - ) - ], ), ), + sizedBoxHeight(20.h), ], ); - }, - ), - ), + }), + // 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), + // const 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), + // const Color(0xFFFFFFFF).withOpacity(0.05), + // ], + // stops: [ + // 0.1, + // 1, + // ], + // ), + // borderRadius: BorderRadius.circular(8), + // ), + // child: Row( + // // mainAxisAlignment: + // // MainAxisAlignment.start, + // children: [ + // const 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"), + // ) + // ], + // ) + // ], + // ), + // ), + // ], + // ); + // }, + // ), + // ), ], ), ); @@ -559,133 +535,143 @@ class _AudiosState extends State { itemCount: contentBytesController .contentBytesModel.data!.audio!.length, // 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), - const Color(0xFFFFFFFF).withOpacity(0.05), - ], - stops: [ - 0.1, - 1, + return InkWell( + onTap: () { + contentBytesController.init(0); + contentBytesController.isAudioSeekBarVisible.value = true; + //https://actions.google.com/sounds/v1/horror/aggressive_zombie_snarls.ogg + }, + 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: [ + 0.1, + 1, + ], + ), + borderRadius: BorderRadius.circular(8), + ), + child: Stack( + children: [ + Image.network( + contentBytesController + .contentBytesModel.data!.audio![index].image!, + ), + 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!), + ), + ], + ), + ), ], ), - borderRadius: BorderRadius.circular(8), - ), - child: Stack( - children: [ - Image.network( - contentBytesController - .contentBytesModel.data!.audio![index].image!, - ), - 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( - height: 20.h, - ), - text22W600("New Release"), - SizedBox( - height: 25.h, - ), - Container( - height: 250.h, - child: ListView.separated( - separatorBuilder: (context, index) { - return const SizedBox( - width: 10, - ); - }, - scrollDirection: Axis.horizontal, - itemCount: - contentBytesController.contentBytesModel.data!.audio!.length, - 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), - const Color(0xFFFFFFFF).withOpacity(0.05), - ], - stops: [ - 0.1, - 1, - ], - ), - borderRadius: BorderRadius.circular(8), - ), - child: Stack( - children: [ - Image.network( - contentBytesController - .contentBytesModel.data!.audio![index].image!, - ), - const Positioned( - right: 5, - top: 5, - child: CircleAvatar( - radius: 15, - child: Icon( - Icons.headphones, - size: 20, - ), - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - width: 148.w, - child: text14W500Overflow( - contentBytesController - .contentBytesModel.data!.audio![index].title!, - ), - ), - ], - ) - ], - ); - }, - ), - ) + // SizedBox( + // height: 20.h, + // ), + // text22W600("New Release"), + // SizedBox( + // height: 25.h, + // ), + // Container( + // height: 250.h, + // child: ListView.separated( + // separatorBuilder: (context, index) { + // return const SizedBox( + // width: 10, + // ); + // }, + // scrollDirection: Axis.horizontal, + // itemCount: + // contentBytesController.contentBytesModel.data!.audio!.length, + // 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), + // const Color(0xFFFFFFFF).withOpacity(0.05), + // ], + // stops: [ + // 0.1, + // 1, + // ], + // ), + // borderRadius: BorderRadius.circular(8), + // ), + // child: Stack( + // children: [ + // Image.network( + // contentBytesController + // .contentBytesModel.data!.audio![index].image!, + // ), + // const Positioned( + // right: 5, + // top: 5, + // child: CircleAvatar( + // radius: 15, + // child: Icon( + // Icons.headphones, + // size: 20, + // ), + // ), + // ), + // ], + // ), + // ), + // const SizedBox( + // height: 10, + // ), + // Row( + // mainAxisAlignment: MainAxisAlignment.start, + // children: [ + // SizedBox( + // width: 148.w, + // child: text14W500Overflow( + // contentBytesController + // .contentBytesModel.data!.audio![index].title!, + // ), + // ), + // ], + // ) + // ], + // ); + // }, + // ), + // ) ], ), ); @@ -820,7 +806,7 @@ class _VideosState extends State { child: commonGlassContainer( borderradius: 8, width: double.infinity, - height: 300.h, + height: 320.h, customWidget: Padding( padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w), child: Column( @@ -845,18 +831,20 @@ class _VideosState extends State { sizedBoxHeight(20.h), Row( children: [ - CircleAvatar( - radius: 23.r, - backgroundImage: const AssetImage( - 'assets/images/png/Ellipse 1494.png'), - ), + // CircleAvatar( + // radius: 23.r, + // backgroundImage: const AssetImage( + // 'assets/images/png/Ellipse 1494.png'), + // ), sizedBoxWidth(10.w), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ text18W500(video.title!), + text16W400(video.description!), // sizedBoxHeight(10.h), - text12W400_979797('20k views . 2 days ago'), + //text12W400_979797('20k views . 2 days ago'), + text12W400_979797('2 days ago'), ], ) ], diff --git a/lib/view/Sidemenu/ContentByte/read_pdf.dart b/lib/view/Sidemenu/ContentByte/read_pdf.dart new file mode 100644 index 0000000..88c327c --- /dev/null +++ b/lib/view/Sidemenu/ContentByte/read_pdf.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; +import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart'; + +class ReadPDF extends StatelessWidget { + ReadPDF({ + super.key, + required this.title, + required this.pdfUrfl, + }); + String? title; + String? pdfUrfl; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text(title!), + ), + body: SfPdfViewer.network( + 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', + ), + ); + } +} diff --git a/lib/view/Sidemenu/FaqScreen.dart b/lib/view/Sidemenu/FaqScreen.dart index 8782327..e7bbae1 100644 --- a/lib/view/Sidemenu/FaqScreen.dart +++ b/lib/view/Sidemenu/FaqScreen.dart @@ -335,7 +335,8 @@ class _FaqScreenState extends State { .userLikes![0] .status! == 1) - ? Icon(Icons.check) + ? SvgPicture.asset( + 'assets/images/svg/filled_thumb_up.svg') : SvgPicture.asset( 'assets/images/svg/thumbs-up.svg'), ], @@ -376,7 +377,8 @@ class _FaqScreenState extends State { .userLikes![0] .status! == 0) - ? Icon(Icons.cancel) + ? SvgPicture.asset( + 'assets/images/svg/filled_thumb_down.svg') : SvgPicture.asset( 'assets/images/svg/thumbs-down.svg'), ], diff --git a/pubspec.lock b/pubspec.lock index d30268e..8f32593 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -177,6 +177,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.10" + device_info_plus: + dependency: transitive + description: + name: device_info_plus + sha256: f52ab3b76b36ede4d135aab80194df8925b553686f0fa12226b4e2d658e45903 + url: "https://pub.dev" + source: hosted + version: "8.2.2" + device_info_plus_platform_interface: + dependency: transitive + description: + name: device_info_plus_platform_interface + sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64 + url: "https://pub.dev" + source: hosted + version: "7.0.0" dio: dependency: "direct main" description: @@ -420,10 +436,10 @@ packages: dependency: transitive description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "0.13.6" http_parser: dependency: transitive description: @@ -436,26 +452,26 @@ packages: dependency: "direct main" description: name: image_cropper - sha256: f4bad5ed2dfff5a7ce0dfbad545b46a945c702bb6182a921488ef01ba7693111 + sha256: "542c3453109d16bcc388e43ae2276044d2cd6a6d20c68bdcff2c94ab9363ea15" url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "4.0.1" image_cropper_for_web: dependency: transitive description: name: image_cropper_for_web - sha256: "865d798b5c9d826f1185b32e5d0018c4183ddb77b7b82a931e1a06aa3b74974e" + sha256: "89c936aa772a35b69ca67b78049ae9fa163a4fb8da2f6dee3893db8883fb49d2" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "2.0.0" image_cropper_platform_interface: dependency: transitive description: name: image_cropper_platform_interface - sha256: ee160d686422272aa306125f3b6fb1c1894d9b87a5e20ed33fa008e7285da11e + sha256: b232175c132b2f7ede3e1f101652bcd635cb4079a77c6dded8e6d32e6578d685 url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "4.0.0" image_picker: dependency: "direct main" description: @@ -532,10 +548,10 @@ packages: dependency: transitive description: name: intl - sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" url: "https://pub.dev" source: hosted - version: "0.19.0" + version: "0.18.1" js: dependency: transitive description: @@ -580,10 +596,10 @@ packages: dependency: "direct main" description: name: local_auth - sha256: "280421b416b32de31405b0a25c3bd42dfcef2538dfbb20c03019e02a5ed55ed0" + sha256: "27679ed8e0d7daab2357db6bb7076359e083a56b295c0c59723845301da6aed9" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.1.8" local_auth_android: dependency: transitive description: @@ -592,14 +608,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.37" - local_auth_darwin: + local_auth_ios: dependency: transitive description: - name: local_auth_darwin - sha256: "33381a15b0de2279523eca694089393bb146baebdce72a404555d03174ebc1e9" + name: local_auth_ios + sha256: eb283b530029b334698918f1e282d4483737cbca972ff21b9193be3d6de8e2b8 url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.1.6" local_auth_platform_interface: dependency: transitive description: @@ -909,14 +925,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" sqflite: dependency: transitive description: @@ -957,6 +965,62 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + syncfusion_flutter_core: + dependency: transitive + description: + name: syncfusion_flutter_core + sha256: "8db8f55c77f56968681447d3837c10f27a9e861e238a898fda116c7531def979" + url: "https://pub.dev" + source: hosted + version: "21.2.10" + syncfusion_flutter_pdf: + dependency: transitive + description: + name: syncfusion_flutter_pdf + sha256: e97daea47f9ac4cf25cc8fc11a0475580ad9c592056d9c2bdc809c73e276decf + url: "https://pub.dev" + source: hosted + version: "21.2.10" + syncfusion_flutter_pdfviewer: + dependency: "direct main" + description: + name: syncfusion_flutter_pdfviewer + sha256: fdd2ff565cd42247b8e86e26304329bae924fdfe8ddc1f4a3a264916f6c1ff1f + url: "https://pub.dev" + source: hosted + version: "21.2.10" + syncfusion_pdfviewer_macos: + dependency: transitive + description: + name: syncfusion_pdfviewer_macos + sha256: "8cc925cae532c0fa17e849165796d962107f45b86e66ee334dcaabf6b7305c82" + url: "https://pub.dev" + source: hosted + version: "21.2.10" + syncfusion_pdfviewer_platform_interface: + dependency: transitive + description: + name: syncfusion_pdfviewer_platform_interface + sha256: "08039ecdb8f79454fb367c6bf5a833846a666039415d2b5d76a7e59a5b3ff710" + url: "https://pub.dev" + source: hosted + version: "21.2.10" + syncfusion_pdfviewer_web: + dependency: transitive + description: + name: syncfusion_pdfviewer_web + sha256: "8e5ed0d313a1aa3869e4f2e8d079bc9bfa37ce79d91be7bb328e456f37b7995f" + url: "https://pub.dev" + source: hosted + version: "21.2.10" + syncfusion_pdfviewer_windows: + dependency: transitive + description: + name: syncfusion_pdfviewer_windows + sha256: "3e93f281135fb0562f7e6c343d2db741cf3cbd78c5b04884eef9af414408bc77" + url: "https://pub.dev" + source: hosted + version: "21.2.10" synchronized: dependency: transitive description: @@ -989,6 +1053,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c + url: "https://pub.dev" + source: hosted + version: "6.2.4" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745 + url: "https://pub.dev" + source: hosted + version: "6.3.0" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + url: "https://pub.dev" + source: hosted + version: "6.2.4" url_launcher_linux: dependency: transitive description: @@ -997,6 +1085,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 + url: "https://pub.dev" + source: hosted + version: "3.1.0" url_launcher_platform_interface: dependency: transitive description: @@ -1025,10 +1121,10 @@ packages: dependency: transitive description: name: uuid - sha256: "22c94e5ad1e75f9934b766b53c742572ee2677c56bc871d850a57dad0f82127f" + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" url: "https://pub.dev" source: hosted - version: "4.2.2" + version: "3.0.7" vector_graphics: dependency: transitive description: @@ -1183,7 +1279,5 @@ packages: source: hosted version: "6.3.0" sdks: - - dart: ">=3.2.3 <4.0.0" - flutter: ">=3.16.6" - + dart: ">=3.1.0 <4.0.0" + flutter: ">=3.13.0" diff --git a/pubspec.yaml b/pubspec.yaml index e9d4011..d128e7b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,7 +28,7 @@ dependencies: gap: ^3.0.1 image_picker: ^1.0.7 dotted_border: ^2.1.0 - image_cropper: ^5.0.1 + image_cropper: file_picker: any lottie: ^2.7.0 chewie: ^1.5.0 @@ -40,13 +40,13 @@ dependencies: dio: ^5.1.2 expansion_tile_group: ^1.2.4 - local_auth: ^2.2.0 + local_auth: scgateway_flutter_plugin: ^2.3.1 async: ^2.4.1 just_audio: ^0.9.37 audio_video_progress_bar: ^2.0.2 - + syncfusion_flutter_pdfviewer: dev_dependencies: flutter_test: