From 438ab33cea94b3fa01ea5828be2ba28fb3b28ead Mon Sep 17 00:00:00 2001 From: cj201199 Date: Thu, 4 Jul 2024 16:26:06 +0530 Subject: [PATCH] added new glass package --- assets/images/png/arrow.png | Bin 0 -> 498 bytes assets/images/png/file 1.png | Bin 0 -> 4546 bytes .../CalenderTab/Availabillity.dart | 2 +- .../Main_Screens/CalenderTab/CalenderTab.dart | 48 +- .../Main_Screens/Community/Community.dart | 512 +++++++++++++++++- .../GroupTab/View/GroupDetail.dart | 5 +- .../Main_Screens/GroupTab/View/NewPost.dart | 36 +- .../Main_Screens/GroupTab/View/Sessions.dart | 343 ++++++++++++ lib/Utils/texts.dart | 14 + lib/main.dart | 4 +- lib/resources/routes/route_name.dart | 2 + lib/resources/routes/routes.dart | 6 + pubspec.lock | 8 + pubspec.yaml | 1 + 14 files changed, 933 insertions(+), 48 deletions(-) create mode 100644 assets/images/png/arrow.png create mode 100644 assets/images/png/file 1.png create mode 100644 lib/Feed Module/Main_Screens/GroupTab/View/Sessions.dart diff --git a/assets/images/png/arrow.png b/assets/images/png/arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..54f4459e32e4868fb6695f3caf92a3e29ab92f51 GIT binary patch literal 498 zcmeAS@N?(olHy`uVBq!ia0vp^0YL1+!3HG7!Zs-YDb50q$YKTt9d8h3TxvUQB~XyD zILO_JVcj{Imp~3nx}&cn1H;CC?mvmFK)H5L7srqa#<#a0`W|wSX#eV;V zN6Fj8GvkB3`rC};@?SmHeZSjy%Et)*p9V_PPWQ4)$Zyz19mAX14 z8afy|Bo-JvI&`5I!~%1Hgv|wJK~}l+M~_=On3UKQk{GZP0ZMT-)e~p>8~@(_uGS~F z`qOIfw{vxtZpp~c>D&JE?AF}=-i2p2^+r_g*(sR6V%ObsXT{X+SB;Tm`Josq{Y}u{ z!G`f8%MoD#493$<%KMI3t4xhq@Su3%M8r9b-L6PP)5>)L(?M=;CHPWDsiXE*gRXY?xts1qeu~qF| zwOi5Jqqg$%{tv$oclX>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iA$|mL0DwUw*p5$7Yi|YRlzakLTap}%2L5m z<_=SdUN9ZC(cvrM^kb;v7O`{jG!$oNw()1qg8y=xEMEv@`cV5YMd`F0&JtP5U56RJ zm39v+lN?0nLYPPUw}A>(h^QpMiNyJm%_S?QC$ql?%dy{);$kY&*ru?UwM~1X!g~R{+6GDPobSZFO5=^S-G2Os@cF>G@wkjMb>lg z@-n39xPrk)0ovTOT}&XTP>4S{oH65uKdR4V32JYxv6uZKvr?d*VM)pSJB=9TSsM92}RN=zf%UHQNbktGq{FOGjwUgEui~} zJBLoj7g#fop$*)dBjt?J_hf;ZwZTS9DYuRoRHXQP{>*kG?ry}B zbZ}Sp0aFdV>jE`9uVwqSx0a~oK+Rgl8Orx*F?Ez;iqX3^h3Pem22gJ|%0>yrZ^HSw n(-W1f{*`FUVmwhyf5wtc_KzkZC9*GHE>ya31Fdom`-uMm)GC%) literal 0 HcmV?d00001 diff --git a/lib/Feed Module/Main_Screens/CalenderTab/Availabillity.dart b/lib/Feed Module/Main_Screens/CalenderTab/Availabillity.dart index 183930a..5afe764 100644 --- a/lib/Feed Module/Main_Screens/CalenderTab/Availabillity.dart +++ b/lib/Feed Module/Main_Screens/CalenderTab/Availabillity.dart @@ -155,7 +155,7 @@ class _AvailabilityState extends State { controller: _calendarController, showNavigationArrow: true, allowViewNavigation: true, - // showDatePickerButton: true, + showDatePickerButton: true, monthViewSettings: MonthViewSettings( navigationDirection: MonthNavigationDirection.horizontal, diff --git a/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart b/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart index 4c23e19..12f1914 100644 --- a/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart +++ b/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart @@ -99,7 +99,6 @@ class _CalenderTabState extends State { subject: 'Muharram/Ashura', ), ]; - } DateTime selectedDate = DateTime.now(); @@ -280,9 +279,9 @@ class _CalenderTabState extends State { todayTextStyle: const TextStyle(color: Colors.white), controller: _sessionCalController, showNavigationArrow: true, - // allowViewNavigation: true, + allowViewNavigation: true, allowDragAndDrop: true, - // showDatePickerButton: true, + showDatePickerButton: true, monthViewSettings: MonthViewSettings( navigationDirection: MonthNavigationDirection.horizontal, ), @@ -334,13 +333,6 @@ class _CalenderTabState extends State { dateTextStyle: TextStyle(color: Colors.white), dayTextStyle: TextStyle(color: Colors.white), )), - // scheduleViewMonthHeaderBuilder: (context, details) { - // return Container( - // height: 30, - // width: 30, - // color: Colors.amber, - // ); - // }, appointmentBuilder: (context, details) { final Appointment appointment = details.appointments.first; @@ -366,19 +358,30 @@ class _CalenderTabState extends State { }), ), Positioned( - top: 8.h, - right: 110.w, + top: 6.h, + left: 190.w, child: InkWell( - onTap: () { - Get.toNamed(RouteName.availability); - }, - child: Image.asset( - "assets/images/png/calender.png", - color: Colors.blue, - height: 18.h, - width: 18.w, - ), - )) + onTap: () { + Get.toNamed(RouteName.availability); + }, + child: Container( + height: 25.h, + width: 50.w, + decoration: BoxDecoration( + border: Border.all( + color: Colors.blue, + ), + borderRadius: BorderRadius.circular(15.r)), + child: Center(child: text10400white("view")), + ) + + // Image.asset( + // "assets/images/png/calender.png", + // color: Colors.blue, + // height: 18.h, + // width: 18.w, + // ), + )) ]), // commonGlassContainer( @@ -849,7 +852,6 @@ class _CalenderTabState extends State { ); } } - } class MeetingDataSource extends CalendarDataSource { diff --git a/lib/Feed Module/Main_Screens/Community/Community.dart b/lib/Feed Module/Main_Screens/Community/Community.dart index b2d3add..758a286 100644 --- a/lib/Feed Module/Main_Screens/Community/Community.dart +++ b/lib/Feed Module/Main_Screens/Community/Community.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_reaction_button/flutter_reaction_button.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:glass_kit/glass_kit.dart'; import 'package:regroup/Common/CommonBottomNavigationBar.dart'; import 'package:regroup/Common/CommonGlassmorphism.dart'; import 'package:regroup/Common/CommonTabBar.dart'; @@ -169,19 +170,43 @@ Widget feedTab() { return SingleChildScrollView( child: Column(children: [ sizedBoxHeight(16.h), - normalcardtile( + normalcardtile2( profileImg: 'assets/images/png/Ellipse 43.png', title: 'Edward Hackket', mainImg: 'assets/images/png/Rectangle 24.png', containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']), sizedBoxHeight(20.h), - announcecardtile( - profileImg: 'assets/images/png/Ellipse 48.png', - title: 'Jocelyn Dokidis', - mainImg: 'assets/images/png/Rectangle 46.png', - containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), + // announcecardtile( + // profileImg: 'assets/images/png/Ellipse 48.png', + // title: 'Jocelyn Dokidis', + // mainImg: 'assets/images/png/Rectangle 46.png', + // containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), sizedBoxHeight(20.h), - normalcardtile( + normalcardtile2( + profileImg: 'assets/images/png/Ellipse 52.png', + title: 'Ryan Dorwat', + mainImg: 'assets/images/png/Rectangle 25.png', + containerTitle: [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ]), + sizedBoxHeight(20.h), + normalcardtile2( + profileImg: 'assets/images/png/Ellipse 52.png', + title: 'Ryan Dorwat', + mainImg: 'assets/images/png/Rectangle 25.png', + containerTitle: [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ]), + sizedBoxHeight(20.h), + normalcardtile2( profileImg: 'assets/images/png/Ellipse 52.png', title: 'Ryan Dorwat', mainImg: 'assets/images/png/Rectangle 25.png', @@ -545,6 +570,419 @@ Widget announcecardtile({ )); } +Widget normalcardtile2({ + required String profileImg, + required String title, + required String mainImg, + required List containerTitle, +}) { + var mainImage = 'assets/images/png/uiw_like-o.png'.obs; + void updateImage(String reaction) { + if (reaction == 'like') { + mainImage.value = 'assets/images/png/f7_hand-thumbsup.png'; + } else if (reaction == 'heart') { + mainImage.value = 'assets/images/png/heart 2.png'; + } else if (reaction == 'party') { + mainImage.value = 'assets/images/png/party-popper 2.png'; + } + } + + return GlassContainer( + height: 580, + width: double.infinity, + blur: 6, + alignment: Alignment.center, + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xFFFFFFFF).withOpacity(0.04), + const Color(0xFFFFFFFF).withOpacity(0.05), + ], + stops: const [ + 0.1, + 1, + ], + ), + borderGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff434A53), + Color(0xff434A53), + ], + ), + elevation: 3.0, + isFrostedGlass: true, + frostedOpacity: 0.04, + child: Column( + children: [ + sizedBoxHeight(25.h), + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CircleAvatar( + foregroundImage: AssetImage(profileImg), + radius: 25.r, + ), + sizedBoxWidth(12.w), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text16w400_FCFCFC(title), + sizedBoxHeight(5.h), + Row( + children: [ + Image.asset( + 'assets/images/png/community 1 (traced).png', + height: 14.w, + width: 14.w, + ), + sizedBoxWidth(7.w), + text12w400_FCFCFC('Active alliance network'), + sizedBoxWidth(7.w), + Icon( + Icons.circle, + color: const Color(0xFFFCFCFC), + size: 4.sp, + ), + sizedBoxWidth(6.w), + text12w400_FCFCFC('1 Hour ago'), + ], + ) + ], + ), + const Spacer(), + PopupMenuButton( + surfaceTintColor: const Color(0xFF222935), + constraints: BoxConstraints.tightFor(width: 176.w), + offset: const Offset(0, 50), + color: const Color(0xFF222935), + tooltip: "", + itemBuilder: (BuildContext context) => [ + PopupMenuItem( + onTap: () {}, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 12.w), + child: Row( + children: [ + Text( + 'Report Post', + style: TextStyle( + fontSize: 16.sp, + color: Colors.white, + fontWeight: FontWeight.w800, + fontFamily: "Nunito Sans", + ), + ), + const Spacer(), + Image.asset( + "assets/images/png/Vector (5).png", + height: 15.h, + width: 15.w, + ) + ], + ), + ), + ), + const PopupMenuDivider(), + PopupMenuItem( + onTap: () {}, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 12.w), + child: Row( + children: [ + Text( + 'Share post', + style: TextStyle( + fontSize: 16.sp, + color: Colors.white, + fontWeight: FontWeight.w800, + fontFamily: "Nunito Sans", + ), + ), + const Spacer(), + Image.asset( + "assets/images/png/share.png", + height: 20.h, + width: 20.w, + ) + ], + ), + ), + ), + const PopupMenuDivider(), + PopupMenuItem( + onTap: () {}, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 12.w), + child: Row( + children: [ + Text( + 'Pin', + style: TextStyle( + fontSize: 16.sp, + color: Colors.white, + fontWeight: FontWeight.w800, + fontFamily: "Nunito Sans", + ), + ), + const Spacer(), + Image.asset( + "assets/images/png/f7_pin-fill (2).png", + height: 25.h, + width: 25.w, + ) + ], + ), + ), + ), + ], + child: Image.asset( + 'assets/images/png/Group 1000004071.png', + width: 16.w, + height: 18.h, + ), + ), + sizedBoxWidth(5.w) + ], + ), + ), + sizedBoxHeight(20.h), + GestureDetector( + onTap: () { + Get.toNamed(RouteName.postdetailsScreen); + }, + child: Container( + height: 163.h, + width: double.infinity, + child: Image.asset( + mainImg, + fit: BoxFit.cover, + ), + )), + sizedBoxHeight(20.h), + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: Column(children: [ + SizedBox( + height: 30.h, + child: ListView.builder( + scrollDirection: Axis.horizontal, + shrinkWrap: true, + itemCount: containerTitle.length, + itemBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(right: 12.w), + child: GestureDetector( + onTap: () { + Get.toNamed(RouteName.cyclescreen); + }, + child: containertile2( + text: ("#${containerTitle[index]}"))), + ); + }, + ), + ), + sizedBoxHeight(20.h), + text16w400_FCFCFC( + "Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."), + Row(children: [ + // InkWell( + // onTap: () { + // Get.toNamed(RouteName.reactionview); + // }, + // child: stackReaction(number: '20', containerImages: [ + // 'assets/images/png/f7_hand-thumbsup.png', + // 'assets/images/png/heart 2.png', + // 'assets/images/png/party-popper 2.png' + // ]), + // ), + const Spacer(), + GlassContainer( + height: 30, + width: 30, + blur: 6, + alignment: Alignment.center, + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xFFFFFFFF).withOpacity(0.05), + const Color(0xFFFFFFFF).withOpacity(0.06), + ], + stops: const [ + 0.1, + 1, + ], + ), + borderGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff434A53), + Color(0xff434A53), + ], + ), + elevation: 3.0, + isFrostedGlass: true, + frostedOpacity: 0.12, + borderRadius: BorderRadius.circular(100), + child: Center( + child: Image.asset( + 'assets/images/png/Frame 1000004088.png', + height: 13.h, + width: 13.w, + ), + ), + ), + sizedBoxWidth(12.w), + text14w400_FCFCFC('20'), + sizedBoxWidth(20.w), + GlassContainer( + height: 30, + width: 30, + blur: 6, + alignment: Alignment.center, + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xFFFFFFFF).withOpacity(0.05), + const Color(0xFFFFFFFF).withOpacity(0.06), + ], + stops: const [ + 0.1, + 1, + ], + ), + borderGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff434A53), + Color(0xff434A53), + ], + ), + elevation: 3.0, + isFrostedGlass: true, + frostedOpacity: 0.12, + borderRadius: BorderRadius.circular(100), + child: Center( + child: Image.asset( + 'assets/images/png/Vector (1).png', + height: 12.h, + width: 12.w, + ), + ), + ), + sizedBoxWidth(12.w), + text14w400_FCFCFC('10'), + ]), + sizedBoxHeight(12.h), + commonDivider(), + sizedBoxHeight(12.h), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Obx(() { + return ReactionButton( + onReactionChanged: (reaction) { + updateImage(reaction?.value ?? 'like'); + debugPrint('Selected value: ${reaction?.value}'); + }, + reactions: ?>[ + Reaction( + value: 'like', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/f7_hand-thumbsup.png'), + icon: _buildReactionsIcon( + 'assets/images/png/f7_hand-thumbsup.png', + ), + ), + Reaction( + value: 'heart', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/heart 2.png'), + icon: _buildReactionsIcon( + 'assets/images/png/heart 2.png'), + ), + Reaction( + value: 'party', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/party-popper 2.png'), + icon: _buildReactionsIcon( + 'assets/images/png/party-popper 2.png'), + ), + ], + selectedReaction: Reaction( + value: 'like', + icon: _buildReactionsIcon( + 'assets/images/png/f7_hand-thumbs.png'), + ), + boxColor: Colors.white, + boxElevation: 2, + boxRadius: 30, + itemsSpacing: 8, + itemScale: 0.4, + itemSize: const Size(45, 45), + boxPadding: const EdgeInsets.all(8), + boxAnimationDuration: + const Duration(milliseconds: 200), + itemAnimationDuration: + const Duration(milliseconds: 500), + hoverDuration: const Duration(milliseconds: 700), + // toggle: false, + direction: ReactionsBoxAlignment.rtl, + + child: _buildReactionsIcon(mainImage.value), + ); + }) + ], + ), + GestureDetector( + onTap: () { + Get.toNamed(RouteName.postdetailsScreen); + }, + child: Column( + children: [ + Image.asset( + 'assets/images/png/Frame 1000004088.png', + height: 19.h, + width: 19.w, + ), + sizedBoxHeight(8.h), + text11w400_FCFCFC('Comment') + ], + ), + ), + Column( + children: [ + Image.asset( + 'assets/images/png/Frame 1000004089.png', + height: 19.h, + width: 19.w, + ), + sizedBoxHeight(8.h), + text11w400_FCFCFC('Save') + ], + ) + ], + ), + sizedBoxHeight(12.h), + commonDivider(), + sizedBoxHeight(12.h), + ]), + ), + ], + )); +} + Widget normalcardtile({ required String profileImg, required String title, @@ -929,6 +1367,42 @@ Widget containertile({required String text}) { )); } +Widget containertile2({required String text}) { + return GlassContainer( + height: 30, + width: 130, + blur: 6, + alignment: Alignment.center, + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xFFFFFFFF).withOpacity(0.05), + const Color(0xFFFFFFFF).withOpacity(0.06), + ], + stops: const [ + 0.1, + 1, + ], + ), + borderGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xFFD90B2E), + Color(0xFFD90B2E), + ], + ), + elevation: 3.0, + isFrostedGlass: true, + frostedOpacity: 0.12, + borderRadius: BorderRadius.circular(30), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.w), + child: Center(child: text14w400_FCFCFC(text)), + )); +} + Widget popularTab() { return SingleChildScrollView( child: Column( @@ -946,6 +1420,30 @@ Widget popularTab() { 'Events' ]), sizedBoxHeight(20.h), + normalcardtile( + profileImg: 'assets/images/png/Ellipse 52.png', + title: 'Edward Hackket', + mainImg: 'assets/images/png/Rectangle 25.png', + containerTitle: [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ]), + sizedBoxHeight(20.h), + normalcardtile( + profileImg: 'assets/images/png/Ellipse 52.png', + title: 'Edward Hackket', + mainImg: 'assets/images/png/Rectangle 25.png', + containerTitle: [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ]), + sizedBoxHeight(20.h), normalcardtile( profileImg: 'assets/images/png/Ellipse 52.png', title: 'Edward Hackket', diff --git a/lib/Feed Module/Main_Screens/GroupTab/View/GroupDetail.dart b/lib/Feed Module/Main_Screens/GroupTab/View/GroupDetail.dart index f693809..be5ff22 100644 --- a/lib/Feed Module/Main_Screens/GroupTab/View/GroupDetail.dart +++ b/lib/Feed Module/Main_Screens/GroupTab/View/GroupDetail.dart @@ -103,7 +103,7 @@ class _GroupDetailState extends State { PopupMenuDivider(), PopupMenuItem( onTap: () { - Get.toNamed(RouteName.groupevent); + Get.toNamed(RouteName.sessions); }, child: Padding( padding: EdgeInsets.symmetric(horizontal: 8.w), @@ -259,7 +259,8 @@ class _GroupDetailState extends State { Container( decoration: const BoxDecoration( image: DecorationImage( - image: AssetImage("assets/images/png/Ellipse 1496.png"), fit: BoxFit.fill)), + image: AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), ), SingleChildScrollView( child: diff --git a/lib/Feed Module/Main_Screens/GroupTab/View/NewPost.dart b/lib/Feed Module/Main_Screens/GroupTab/View/NewPost.dart index 23b212b..52de928 100644 --- a/lib/Feed Module/Main_Screens/GroupTab/View/NewPost.dart +++ b/lib/Feed Module/Main_Screens/GroupTab/View/NewPost.dart @@ -48,7 +48,8 @@ class _NewPostState extends State { Container( decoration: const BoxDecoration( image: DecorationImage( - image: AssetImage("assets/images/png/Ellipse 1496.png"), fit: BoxFit.fill)), + image: AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), ), Padding( padding: EdgeInsets.symmetric(horizontal: 16.w), @@ -125,19 +126,26 @@ class _NewPostState extends State { padding: EdgeInsets.symmetric(vertical: 16.h), child: Column( - children: [ - Image.asset( - "assets/images/png/bi_download.png", - height: 36.h, - width: 36.w, - ), - sizedBoxHeight(10.h), - text14w400_FCFCFC("Upload image"), - sizedBoxHeight(8.h), - text8w400_8A8A8A( - "Allowed file extensions: jpg, png, gif Max file size: 10 MB"), - ], - ), + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Image.asset( + "assets/images/png/file 1.png", + height: 44.h, + width: 44.w, + ), + sizedBoxHeight(10.h), + Row( + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + text8w400_white( + "Drag and Drop file here or "), + text8w700_white("Choose file") + ], + ), + sizedBoxHeight(8.h), + ]), )), ), ), diff --git a/lib/Feed Module/Main_Screens/GroupTab/View/Sessions.dart b/lib/Feed Module/Main_Screens/GroupTab/View/Sessions.dart new file mode 100644 index 0000000..b2c7872 --- /dev/null +++ b/lib/Feed Module/Main_Screens/GroupTab/View/Sessions.dart @@ -0,0 +1,343 @@ +import 'dart:io'; + +import 'package:dotted_border/dotted_border.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:regroup/Common/CommonButton.dart'; +import 'package:regroup/Common/CommonGlassmorphism.dart'; +import 'package:regroup/Utils/Common/CommonAppbar.dart'; +import 'package:regroup/Utils/Common/CommonDropdown.dart'; +import 'package:regroup/Utils/Common/CustomTextformfield.dart'; +import 'package:regroup/Utils/Common/ImageUpload.dart'; +import 'package:regroup/Utils/Common/sized_box.dart'; +import 'package:regroup/Utils/texts.dart'; + +class Sessions extends StatefulWidget { + const Sessions({super.key}); + + @override + State createState() => _SessionsState(); +} + +RxBool isChecked = false.obs; +List bannerPath = []; +bool isbannerAdded = false; + +class _SessionsState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + // key: _scaffoldKey1, + resizeToAvoidBottomInset: false, + backgroundColor: Color(0xFF222935), + extendBody: true, + appBar: CommonAppbar( + titleTxt: "Sessions", + ), + body: Stack(children: [ + Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), + ), + SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + sizedBoxHeight(30.h), + text16w400_FCFCFC("Session Title"), + sizedBoxHeight(25.h), + CustomTextFormField( + hintText: "", + leadingIcon: Container( + height: 20.h, + width: 20.w, + child: Center( + child: Image.asset( + "assets/images/png/Vector (5)12.png", + height: 20.h, + width: 20.w, + ), + ), + ), + ), + sizedBoxHeight(25.h), + Text.rich( + TextSpan(children: [ + TextSpan( + text: 'Description ', + style: TextStyle( + color: const Color(0xFFFCFCFC), + fontSize: 16.sp, + fontFamily: 'Helvetica', + fontWeight: FontWeight.w400, + ), + ), + TextSpan( + text: '(optional)', + style: TextStyle( + color: const Color(0xFFFCFCFC), + fontSize: 14.sp, + fontFamily: 'Helvetica', + fontWeight: FontWeight.w400, + ), + ), + ]), + ), + sizedBoxHeight(25.h), + CustomTextFormField2(), + text16w400_FCFCFC('Type of session'), + sizedBoxHeight(25.h), + CustomDropDownRadio( + header: "", + title: "", + listData: ["hhh"], + onItemSelected: (p0) {}, + leadingImage: Image.asset( + "assets/images/png/Vector (5)12.png")), + sizedBoxHeight(25.h), + text16w400_FCFCFC('Sport'), + sizedBoxHeight(25.h), + CustomDropDownRadio( + header: "", + title: "", + listData: ["hhh"], + onItemSelected: (p0) {}, + leadingImage: Image.asset( + "assets/images/png/Vector (4).png")), + sizedBoxHeight(25.h), + text16w400_FCFCFC('Starts'), + sizedBoxHeight(25.h), + CustomTextFormField( + leadingIcon: Container( + height: 20.h, + width: 20.w, + child: Center( + child: Image.asset( + "assets/images/png/clock.png", + height: 20.h, + width: 20.w, + ), + )), + hintText: "Thu, Jan 20 08:00 pm", + ), + sizedBoxHeight(10.h), + Row( + children: [ + Obx(() { + return commonGlassContainer( + border: 1, + borderradius: 2, + height: 23.h, + width: 23.w, + opacity1: 0.24, + opacity2: 0.24, + customWidget: Transform.scale( + scale: 1.4, + child: Checkbox( + side: BorderSide(color: Color(0xFF434A53)), + value: isChecked.value, + activeColor: Colors.transparent, + checkColor: Colors.white, + onChanged: ((value) { + isChecked.value = value!; + }), + ), + ), + ); + }), + sizedBoxWidth(8.w), + text14w400_FCFCFC("Repeat event") + ], + ), + sizedBoxHeight(20.h), + text16w400_FCFCFC("Location"), + sizedBoxHeight(20.h), + CustomTextFormField( + hintText: "", + leadingIcon: Container( + height: 20.h, + width: 20.w, + child: Center( + child: Image.asset( + "assets/images/png/Group 58645.png", + height: 20.h, + width: 20.w, + ), + ), + ), + ), + sizedBoxHeight(25.h), + text16w400_FCFCFC("Post in"), + sizedBoxHeight(25.h), + CustomDropDownRadio( + header: "", + title: "", + listData: ["hryy"], + onItemSelected: (p0) {}, + leadingImage: + Image.asset("assets/images/png/Black.png")), + sizedBoxHeight(25.h), + text16w400_FCFCFC("Add Users"), + sizedBoxHeight(25.h), + CustomTextFormField( + hintText: "", + leadingIcon: Container( + height: 20.h, + width: 20.w, + child: Center( + child: Image.asset( + "assets/images/png/Group122.png", + height: 20.h, + width: 20.w, + ), + )), + suffixIcon: Container( + height: 20.h, + width: 20.h, + child: Center( + child: Image.asset( + "assets/images/png/arrow.png", + height: 20.h, + width: 20.h, + ), + ), + ), + ), + sizedBoxHeight(25.h), + text16w400_FCFCFC("Reminder"), + sizedBoxHeight(25.h), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + commonGlassContainer( + height: 50.h, + width: 127.w, + borderradius: 30.r, + border: 1, + customWidget: Center( + child: text16400white("2"), + )), + commonGlassContainer( + height: 50.h, + width: 215.w, + borderradius: 30.r, + border: 1, + customWidget: Center( + child: Row( + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + text16400white("Minutes"), + sizedBoxWidth(5.w), + Icon( + Icons.keyboard_arrow_down, + color: Colors.white, + ) + ], + ), + )) + ]), + sizedBoxHeight(20.h), + text16w400_FCFCFC("session image"), + sizedBoxHeight(25.h), + GestureDetector( + onTap: () { + ImageUploadBottomSheet().showModal( + context, + false, + (result) { + var file = File(result); + + bannerPath.add(file); + isbannerAdded = true; + setState(() {}); + }, + ); + }, + child: DottedBorder( + strokeWidth: 1, + dashPattern: [7, 4], + borderType: BorderType.RRect, + radius: Radius.circular(14.r), + color: Color(0xFF434A53), + child: commonGlassContainer( + border: 0, + width: double.infinity, + height: 130.h, + borderradius: 10.r, + customWidget: bannerPath.isNotEmpty && + isbannerAdded + ? Stack(children: [ + Image.file( + bannerPath[0]!, + fit: BoxFit.cover, + width: double.infinity, + ), + Positioned( + right: 5, + bottom: 5, + child: GestureDetector( + onTap: () { + bannerPath.clear(); + isbannerAdded = false; + setState(() {}); + }, + child: Container( + width: 27, + height: 27, + decoration: ShapeDecoration( + color: Color(0xFF7E7E7E), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 5)), + ), + child: Icon( + Icons + .delete_outline_outlined, + color: Colors.white, + ))), + ), + ]) + : Padding( + padding: EdgeInsets.symmetric( + vertical: 16.h), + child: Column( + children: [ + Image.asset( + "assets/images/png/bi_download.png", + height: 36.h, + width: 36.w, + ), + sizedBoxHeight(10.h), + text14w400_FCFCFC( + "Upload session image"), + sizedBoxHeight(8.h), + text8w400_8A8A8A( + "Allowed file extensions: jpg, png, gif Max file size: 10 MB"), + ], + ), + )), + ), + ), + sizedBoxHeight(25.h), + CustomDropDownRadio( + header: "More options", + title: "", + listData: [""], + onItemSelected: (p0) {}, + leadingImage: SizedBox()), + sizedBoxHeight(30.h), + CommonBtn(text: "Create event"), + sizedBoxHeight(50.h), + ]))) + ])); + } +} diff --git a/lib/Utils/texts.dart b/lib/Utils/texts.dart index 4d49394..40b5c1d 100644 --- a/lib/Utils/texts.dart +++ b/lib/Utils/texts.dart @@ -21,6 +21,7 @@ Widget text22400white(String text) { fontFamily: 'Helvetica'), ); } + Widget text22400FCFCFC(String text) { return Text( text, @@ -709,3 +710,16 @@ Widget text8w400_white(String text) { fontWeight: FontWeight.w400), ); } + +Widget text8w700_white(String text) { + return Text( + text, + style: TextStyle( + decoration: TextDecoration.underline, + decorationColor: Colors.white, + fontSize: 8.sp, + color: Colors.white, + fontFamily: 'Helvetica', + fontWeight: FontWeight.w700), + ); +} diff --git a/lib/main.dart b/lib/main.dart index 988e5da..2e52474 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,8 +18,10 @@ Future main() async { SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, - ]).then((value) => runApp(const MyApp())); + ]).then((value) => runApp(StatsFl( + align: Alignment.center, width: 200, height: 100, child: const MyApp()))); } + // runApp( // StatsFl( // align: Alignment.center, width: 200, height: 100, child: const MyApp()))); diff --git a/lib/resources/routes/route_name.dart b/lib/resources/routes/route_name.dart index ddfcda4..243d916 100644 --- a/lib/resources/routes/route_name.dart +++ b/lib/resources/routes/route_name.dart @@ -94,6 +94,8 @@ class RouteName { static const String groupevent = '/groupevent'; static const String connectcommunity = '/connectcommunity'; static const String certificate = '/certificate'; + static const String sessions = '/sessions'; + //subgroup diff --git a/lib/resources/routes/routes.dart b/lib/resources/routes/routes.dart index cfa02e7..995d921 100644 --- a/lib/resources/routes/routes.dart +++ b/lib/resources/routes/routes.dart @@ -26,6 +26,7 @@ import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/GroupManage.dar import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/GroupTab.dart'; import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/NewPost.dart'; import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/RequestedGroups.dart'; +import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/Sessions.dart'; import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/SubGroup/EditSubgroupInfo.dart'; import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/SubGroup/SubGroupInfo.dart'; import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/SubGroup/SubgroupSetting.dart'; @@ -470,5 +471,10 @@ class AppRoutes { name: RouteName.availability, page: () => const Availability(), ), + + GetPage( + name: RouteName.sessions, + page: () => const Sessions(), + ), ]; } diff --git a/pubspec.lock b/pubspec.lock index 4e96466..207ea86 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -344,6 +344,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.6.6" + glass_kit: + dependency: "direct main" + description: + name: glass_kit + sha256: ccb7c31b07403d757bd338901a0f4859c081db05a6593916be87d7c20f07d9b7 + url: "https://pub.dev" + source: hosted + version: "4.0.1" glassmorphism: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index a6fe0b6..d975b4a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -67,6 +67,7 @@ dependencies: glassmorphism_ui: ^0.3.0 show_fps: ^1.0.6 statsfl: ^2.3.0 + glass_kit: ^4.0.1