From 8a5ab90f2601aa45408487b990de2f85e9622c08 Mon Sep 17 00:00:00 2001 From: cj201199 Date: Wed, 3 Jul 2024 20:15:25 +0530 Subject: [PATCH 1/2] Calendar changes done --- lib/Common/CommonBottomNavigationBar.dart | 14 +- .../CalenderTab/Availabillity.dart | 277 ++++++++++ .../Main_Screens/CalenderTab/CalenderTab.dart | 521 +++++++++--------- .../Main_Screens/Chats/View/newgroup.dart | 21 +- .../View/PostDetailScreen.dart | 51 +- .../ExploreDesign/SearchGroup.dart | 171 +++--- lib/Utils/Common/CustomTextformfield.dart | 1 + lib/main.dart | 6 +- lib/resources/routes/route_name.dart | 2 + lib/resources/routes/routes.dart | 5 + 10 files changed, 696 insertions(+), 373 deletions(-) create mode 100644 lib/Feed Module/Main_Screens/CalenderTab/Availabillity.dart diff --git a/lib/Common/CommonBottomNavigationBar.dart b/lib/Common/CommonBottomNavigationBar.dart index d187bce..77e29d7 100644 --- a/lib/Common/CommonBottomNavigationBar.dart +++ b/lib/Common/CommonBottomNavigationBar.dart @@ -161,8 +161,8 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) { BottomNavigationBarItem( icon: Image.asset( 'assets/images/png/BottomBar/inactiveCal.png', - height: 25.h, - width: 25.w, + height: 22.h, + width: 22.w, ), activeIcon: Stack( clipBehavior: Clip.none, @@ -174,7 +174,7 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) { shape: BoxShape.circle, boxShadow: [ BoxShadow( - color: const Color(0xFFD90B2E).withOpacity(0.16), + color: const Color(0xFFD90B2E).withOpacity(0.5), spreadRadius: 15, blurRadius: 25, offset: const Offset(0, 10), @@ -224,7 +224,7 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) { shape: BoxShape.circle, boxShadow: [ BoxShadow( - color: const Color(0xFFD90B2E).withOpacity(0.16), + color: const Color(0xFFD90B2E).withOpacity(0.5), spreadRadius: 15, blurRadius: 25, offset: const Offset(0, 10), @@ -264,8 +264,8 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) { BottomNavigationBarItem( icon: Image.asset( 'assets/images/png/BottomBar/inactivePeople.png', - height: 25.h, - width: 25.w, + height: 22.h, + width: 22.w, ), activeIcon: Stack( clipBehavior: Clip.none, @@ -277,7 +277,7 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) { shape: BoxShape.circle, boxShadow: [ BoxShadow( - color: const Color(0xFFD90B2E).withOpacity(0.16), + color: const Color(0xFFD90B2E).withOpacity(0.5), spreadRadius: 15, blurRadius: 25, offset: const Offset(0, 10), diff --git a/lib/Feed Module/Main_Screens/CalenderTab/Availabillity.dart b/lib/Feed Module/Main_Screens/CalenderTab/Availabillity.dart new file mode 100644 index 0000000..183930a --- /dev/null +++ b/lib/Feed Module/Main_Screens/CalenderTab/Availabillity.dart @@ -0,0 +1,277 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:regroup/Common/CommonGlassmorphism.dart'; +import 'package:regroup/Utils/Common/CommonAppbar.dart'; +import 'package:regroup/Utils/Common/sized_box.dart'; +import 'package:syncfusion_flutter_calendar/calendar.dart'; + +class Availability extends StatefulWidget { + const Availability({super.key}); + + @override + State createState() => _AvailabilityState(); +} + +CalendarController? _calendarController; +List? _appointments; +List _employeeCollection = []; +// final List _nameCollection = []; +// final List _userImages = []; + +class _AvailabilityState extends State { + @override + void initState() { + super.initState(); + _calendarController = CalendarController(); + _appointments = [ + Appointment( + startTime: DateTime(2024, 6, 26, 9, 0), + endTime: DateTime(2024, 6, 26, 10, 30), + subject: 'Development Meeting', + resourceIds: [4], + color: Color(0XFFFC571D)), + Appointment( + startTime: DateTime(2024, 6, 26, 18, 0), + endTime: DateTime(2024, 6, 26, 18, 30), + subject: 'GeneralMeeting', + resourceIds: [2], + color: Color(0xFF8B1FA9)), + Appointment( + startTime: DateTime(2024, 6, 28, 9, 0), + endTime: DateTime(2024, 6, 28, 10, 30), + subject: 'Lunch', + resourceIds: [1], + ), + Appointment( + startTime: DateTime(2024, 6, 25, 10, 0), + endTime: DateTime(2024, 6, 25, 10, 30), + subject: 'Meeting', + resourceIds: [2], + ), + Appointment( + startTime: DateTime.now(), + endTime: DateTime.now().add(Duration(hours: 3)), + subject: 'Match day', + resourceIds: [3], + ), + Appointment( + startTime: DateTime.now(), + endTime: DateTime.now().add(Duration(hours: 3)), + subject: 'Muharram/Ashura', + resourceIds: [3], + ), + ]; + _employeeCollection = [ + CalendarResource( + id: 1, + image: AssetImage("assets/images/png/cimg1.png"), + displayName: 'Kaylly Vaccaro', + color: Colors.transparent, + ), + CalendarResource( + id: 2, + image: AssetImage("assets/images/png/cimg2.png"), + displayName: 'Ryan Dorwart', + color: Colors.transparent, + ), + CalendarResource( + id: 3, + image: AssetImage("assets/images/png/cimg3.png"), + displayName: 'Ahmad Rhiel', + color: Colors.transparent, + ), + CalendarResource( + id: 4, + image: AssetImage("assets/images/png/cimg3.png"), + displayName: 'Ahmad Rhiel', + color: Colors.transparent, + ), + CalendarResource( + id: 5, + image: AssetImage("assets/images/png/Ellipse 52.png"), + displayName: 'Ahmad Rhiel', + color: Colors.transparent, + ), + CalendarResource( + id: 6, + image: AssetImage("assets/images/png/Ellipse 48.png"), + displayName: 'Ahmad Rhiel', + color: Colors.transparent, + ), + ]; + } + + @override + Widget build(BuildContext context) { + return Scaffold( + // key: _scaffoldKey1, + backgroundColor: Color(0xFF222935), + extendBody: true, + resizeToAvoidBottomInset: false, + appBar: CommonAppbar( + titleTxt: "Availability", + ), + body: Stack(children: [ + Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), + ), + SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + commonGlassContainer( + width: double.infinity, + height: 670.h, + borderradius: 1, + border: 0, + customWidget: SfCalendar( + view: CalendarView.timelineMonth, + appointmentTextStyle: TextStyle(color: Colors.white), + headerStyle: CalendarHeaderStyle( + textStyle: TextStyle( + color: Colors.blue, + )), + // blackoutDatesTextStyle: TextStyle(color: Colors.white), + + weekNumberStyle: WeekNumberStyle( + textStyle: TextStyle(color: Colors.white)), + viewHeaderStyle: ViewHeaderStyle( + // backgroundColor: Colors.amber, + dateTextStyle: TextStyle(color: Colors.white), + dayTextStyle: TextStyle( + color: Color(0xFFD90B2E), + ), + ), + // blackoutDatesTextStyle: TextStyle(color: Colors.white), + // selectionDecoration: BoxDecoration(color: Colors.amber), + backgroundColor: Colors.transparent, + // firstDayOfWeek: 3, + cellBorderColor: Colors.white, + todayHighlightColor: Color(0xFFD90B2E), + todayTextStyle: const TextStyle(color: Colors.white), + controller: _calendarController, + showNavigationArrow: true, + allowViewNavigation: true, + // showDatePickerButton: true, + monthViewSettings: MonthViewSettings( + navigationDirection: + MonthNavigationDirection.horizontal, + ), + allowDragAndDrop: true, + allowedViews: [ + // CalendarView.month, + // CalendarView.day, + // CalendarView.schedule, + CalendarView.timelineMonth, + CalendarView.timelineDay + ], + viewNavigationMode: ViewNavigationMode.snap, + showCurrentTimeIndicator: true, + dataSource: MeetingDataSource( + _appointments!, _employeeCollection), + onTap: calendarTapped, + timeSlotViewSettings: TimeSlotViewSettings( + // minimumAppointmentDuration: Duration(hours: 5), + timeTextStyle: TextStyle( + color: Colors.white, + ), + timelineAppointmentHeight: 60.h, + // timeIntervalWidth: 100, + + // timeIntervalHeight: 50, + timeIntervalWidth: 70, + ), + monthCellBuilder: (context, details) { + return Container( + decoration: BoxDecoration( + color: Colors.transparent, + ), + child: Center( + child: Text( + details.date.day.toString(), + style: TextStyle( + color: + Colors.white), // Set text color to white + ), + ), + ); + }, + resourceViewSettings: ResourceViewSettings( + displayNameTextStyle: + TextStyle(color: Colors.white, fontSize: 10), + showAvatar: true, + ), + + // selectionDecoration: BoxDecoration( + // borderRadius: BorderRadius.circular(20.r)), + appointmentBuilder: (context, details) { + final Appointment appointment = + details.appointments.first; + + return Container( + decoration: BoxDecoration( + color: + details.appointments.first.color ?? Colors.blue, + borderRadius: BorderRadius.circular(4), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + appointment.subject, + style: TextStyle( + color: Colors.white, fontSize: 8.sp), + ), + ], + ), + ), + ); + }), + ), + ])) + ])); + } + + void calendarTapped(CalendarTapDetails details) { + if (details.targetElement == CalendarElement.appointment) { + Appointment appointment = details.appointments![0]; + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: Text('Event Details'), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text('Event: ${appointment.subject}'), + Text('From: ${appointment.startTime}'), + Text('To: ${appointment.endTime}'), + ], + ), + actions: [ + ElevatedButton( + child: Text('Close'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } + } +} + +class MeetingDataSource extends CalendarDataSource { + MeetingDataSource( + List source, List resourceColl) { + appointments = source; + resources = resourceColl; + } +} diff --git a/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart b/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart index 220dad4..4c23e19 100644 --- a/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart +++ b/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart @@ -53,80 +53,53 @@ class _CalenderTabState extends State { }, ]; - CalendarController? _calendarController; + CalendarController? _sessionCalController; + CalendarController? _comCalController; List? _appointments; - List _employeeCollection = []; // final List _nameCollection = []; // final List _userImages = []; - + DateTime? _startDate; + DateTime? _endDate; + bool _isRangeSelection = false; @override void initState() { super.initState(); - _calendarController = CalendarController(); + _sessionCalController = CalendarController(); + _comCalController = CalendarController(); + _appointments = [ Appointment( startTime: DateTime(2024, 6, 26, 9, 0), endTime: DateTime(2024, 6, 26, 10, 30), subject: 'Development Meeting', - resourceIds: [4], color: Color(0XFFFC571D)), Appointment( startTime: DateTime(2024, 6, 26, 18, 0), endTime: DateTime(2024, 6, 26, 18, 30), subject: 'GeneralMeeting', - resourceIds: [2], color: Color(0xFF8B1FA9)), Appointment( startTime: DateTime(2024, 6, 28, 9, 0), endTime: DateTime(2024, 6, 28, 10, 30), subject: 'Lunch', - resourceIds: [1], ), Appointment( startTime: DateTime(2024, 6, 25, 10, 0), endTime: DateTime(2024, 6, 25, 10, 30), subject: 'Meeting', - resourceIds: [2], ), Appointment( startTime: DateTime.now(), endTime: DateTime.now().add(Duration(hours: 3)), subject: 'Match day', - resourceIds: [3], ), Appointment( startTime: DateTime.now(), endTime: DateTime.now().add(Duration(hours: 3)), subject: 'Muharram/Ashura', - resourceIds: [3], - ), - ]; - _employeeCollection = [ - CalendarResource( - id: 1, - image: AssetImage("assets/images/png/cimg1.png"), - displayName: 'Kaylly Vaccaro', - color: Colors.transparent, - ), - CalendarResource( - id: 2, - image: AssetImage("assets/images/png/cimg2.png"), - displayName: 'Ryan Dorwart', - color: Colors.transparent, - ), - CalendarResource( - id: 3, - image: AssetImage("assets/images/png/cimg3.png"), - displayName: 'Ahmad Rhiel', - color: Colors.transparent, - ), - CalendarResource( - id: 4, - image: AssetImage("assets/images/png/cimg3.png"), - displayName: 'Ahmad Rhiel', - color: Colors.transparent, ), ]; + } DateTime selectedDate = DateTime.now(); @@ -195,7 +168,8 @@ class _CalenderTabState 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: const EdgeInsets.symmetric(vertical: 16), @@ -273,109 +247,139 @@ class _CalenderTabState extends State { border: 1), ), sizedBoxHeight(25.h), - commonGlassContainer( - width: double.infinity, - height: 350.h, - borderradius: 1, - border: 0, - customWidget: SfCalendar( - view: CalendarView.month, - appointmentTextStyle: TextStyle(color: Colors.white), - headerStyle: CalendarHeaderStyle( - textStyle: TextStyle( - color: Colors.blue, - )), - // blackoutDatesTextStyle: TextStyle(color: Colors.white), + Stack(children: [ + commonGlassContainer( + width: double.infinity, + height: 500.h, + borderradius: 1, + border: 0, + customWidget: SfCalendar( + view: CalendarView.month, + appointmentTextStyle: TextStyle(color: Colors.white), + headerStyle: CalendarHeaderStyle( + textStyle: TextStyle( + color: Colors.blue, + )), + // blackoutDatesTextStyle: TextStyle(color: Colors.white), - weekNumberStyle: - WeekNumberStyle(textStyle: TextStyle(color: Colors.white)), - viewHeaderStyle: ViewHeaderStyle( - // backgroundColor: Colors.amber, - dateTextStyle: TextStyle(color: Colors.white), - dayTextStyle: TextStyle( - color: Color(0xFFD90B2E), + weekNumberStyle: WeekNumberStyle( + textStyle: TextStyle(color: Colors.white)), + viewHeaderStyle: ViewHeaderStyle( + // backgroundColor: Colors.amber, + dateTextStyle: TextStyle(color: Colors.white), + dayTextStyle: TextStyle( + color: Color(0xFFD90B2E), + ), ), - ), - // blackoutDatesTextStyle: TextStyle(color: Colors.white), - // selectionDecoration: BoxDecoration(color: Colors.amber), - backgroundColor: Colors.transparent, - // firstDayOfWeek: 3, - cellBorderColor: Colors.white, - todayHighlightColor: Color(0xFFD90B2E), - todayTextStyle: const TextStyle(color: Colors.white), - controller: _calendarController, - showNavigationArrow: true, - allowViewNavigation: true, - showDatePickerButton: true, - monthViewSettings: MonthViewSettings( - navigationDirection: MonthNavigationDirection.horizontal, - ), - allowedViews: [ - CalendarView.month, - CalendarView.day, - CalendarView.schedule, - CalendarView.timelineMonth, - CalendarView.timelineDay - ], - viewNavigationMode: ViewNavigationMode.snap, - showCurrentTimeIndicator: true, - dataSource: - MeetingDataSource(_appointments!, _employeeCollection), - onTap: calendarTapped, - timeSlotViewSettings: TimeSlotViewSettings( - // minimumAppointmentDuration: Duration(hours: 5), - timeTextStyle: TextStyle( - color: Colors.white, + // blackoutDatesTextStyle: TextStyle(color: Colors.white), + // selectionDecoration: BoxDecoration(color: Colors.amber), + backgroundColor: Colors.transparent, + // firstDayOfWeek: 3, + cellBorderColor: Colors.white, + todayHighlightColor: Color(0xFFD90B2E), + todayTextStyle: const TextStyle(color: Colors.white), + controller: _sessionCalController, + showNavigationArrow: true, + // allowViewNavigation: true, + allowDragAndDrop: true, + // showDatePickerButton: true, + monthViewSettings: MonthViewSettings( + navigationDirection: MonthNavigationDirection.horizontal, ), - timelineAppointmentHeight: 60.h, - // timeIntervalWidth: 100, + allowedViews: [ + CalendarView.month, + // CalendarView.day, + CalendarView.schedule, + ], + viewNavigationMode: ViewNavigationMode.snap, + showCurrentTimeIndicator: true, + dataSource: MeetingDataSource(_appointments!), + onTap: calendarTapped, + timeSlotViewSettings: TimeSlotViewSettings( + // minimumAppointmentDuration: Duration(hours: 5), + timeTextStyle: TextStyle( + color: Colors.white, + ), + timelineAppointmentHeight: 60.h, + // timeIntervalWidth: 100, - // timeIntervalHeight: 50, - timeIntervalWidth: 70, - ), - monthCellBuilder: (context, details) { - return Container( - decoration: BoxDecoration( - color: Colors.transparent, - ), - child: Center( - child: Text( - details.date.day.toString(), - style: TextStyle( - color: Colors.white), // Set text color to white + // timeIntervalHeight: 50, + timeIntervalWidth: 70, + ), + monthCellBuilder: (context, details) { + return Container( + decoration: BoxDecoration( + color: Colors.transparent, ), - ), - ); - }, - resourceViewSettings: ResourceViewSettings( - displayNameTextStyle: - TextStyle(color: Colors.white, fontSize: 10), - showAvatar: true, - ), - appointmentBuilder: (context, details) { - final Appointment appointment = details.appointments.first; + child: Center( + child: Text( + details.date.day.toString(), + style: TextStyle( + color: Colors.white), // Set text color to white + ), + ), + ); + }, + resourceViewSettings: ResourceViewSettings( + displayNameTextStyle: + TextStyle(color: Colors.white, fontSize: 10), + showAvatar: true, + ), + // scheduleViewSettings: ScheduleViewSettings( + // appointmentTextStyle: TextStyle(color: Colors.red)), - return Container( - decoration: BoxDecoration( - color: details.appointments.first.color ?? Colors.blue, - borderRadius: BorderRadius.circular(4), - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - appointment.subject, - style: - TextStyle(color: Colors.white, fontSize: 8.sp), - ), - ], + scheduleViewSettings: ScheduleViewSettings( + placeholderTextStyle: TextStyle(color: Colors.white), + dayHeaderSettings: DayHeaderSettings( + 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; + + return Container( + decoration: BoxDecoration( + color: details.appointments.first.color ?? Colors.blue, + borderRadius: BorderRadius.circular(4), ), - ), - ); - }), - ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + appointment.subject, + style: TextStyle( + color: Colors.white, fontSize: 8.sp), + ), + ], + ), + ), + ); + }), + ), + Positioned( + top: 8.h, + right: 110.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, + ), + )) + ]), // commonGlassContainer( // width: double.infinity, @@ -413,14 +417,14 @@ class _CalenderTabState extends State { // ), // border: 0.9), sizedBoxHeight(25.h), - Column( - children: List.generate(3, (index) { - return sessionCard( - imagePath: sessionData[index]["imagePath"], - names: sessionData[index]["names"], - title: sessionData[index]["title"]); - }), - ) + // Column( + // children: List.generate(3, (index) { + // return sessionCard( + // imagePath: sessionData[index]["imagePath"], + // names: sessionData[index]["names"], + // title: sessionData[index]["title"]); + // }), + // ) ], ), ); @@ -534,60 +538,126 @@ class _CalenderTabState extends State { return SingleChildScrollView( child: Column( children: [ - sizedBoxHeight(20.h), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: CustomTextFormField( - leadingIcon: SizedBox( - height: 23, - width: 23, - child: Center( - child: Image.asset( - "assets/images/png/ion_search-outline.png", - height: 23, - width: 23, - ), - ), - ), - hintText: "Search community sessions", - ), - ), sizedBoxHeight(25.h), - Padding( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: commonGlassContainer( - width: double.infinity, - height: 136.h, - borderradius: 10.r, - customWidget: Row( - children: [ - Padding( - padding: EdgeInsets.only(left: 16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - width: 171.w, - child: text14w400_FCFCFC( - "Are you looking for resources ? We might have a solution"), - ), - sizedBoxHeight(12.h), - GestureDetector( - onTap: () { - Get.toNamed(RouteName.resourcepool); - }, - child: text16w700_FCFCFCline("View resources")) - ], - ), + + Stack(children: [ + commonGlassContainer( + width: double.infinity, + height: 530.h, + borderradius: 1, + border: 0, + customWidget: SfCalendar( + view: CalendarView.month, + appointmentTextStyle: TextStyle(color: Colors.white), + headerStyle: CalendarHeaderStyle( + textStyle: TextStyle( + color: Colors.blue, + )), + // blackoutDatesTextStyle: TextStyle(color: Colors.white), + + weekNumberStyle: WeekNumberStyle( + textStyle: TextStyle(color: Colors.white)), + viewHeaderStyle: ViewHeaderStyle( + // backgroundColor: Colors.amber, + dateTextStyle: TextStyle(color: Colors.white), + dayTextStyle: TextStyle( + color: Color(0xFFD90B2E), ), - Spacer(), - Image.asset("assets/images/png/Rectangle 45.png") + ), + // blackoutDatesTextStyle: TextStyle(color: Colors.white), + // selectionDecoration: BoxDecoration(color: Colors.amber), + backgroundColor: Colors.transparent, + // firstDayOfWeek: 3, + cellBorderColor: Colors.white, + todayHighlightColor: Color(0xFFD90B2E), + todayTextStyle: const TextStyle(color: Colors.white), + controller: _comCalController, + showNavigationArrow: true, + allowViewNavigation: true, + allowDragAndDrop: true, + // showDatePickerButton: true, + monthViewSettings: MonthViewSettings( + navigationDirection: MonthNavigationDirection.horizontal, + ), + allowedViews: [ + CalendarView.month, + // CalendarView.day, + CalendarView.schedule, ], - ), - border: 1), - ), - sizedBoxHeight(25.h), + viewNavigationMode: ViewNavigationMode.snap, + showCurrentTimeIndicator: true, + dataSource: MeetingDataSource(_appointments!), + onTap: calendarTapped, + timeSlotViewSettings: TimeSlotViewSettings( + // minimumAppointmentDuration: Duration(hours: 5), + timeTextStyle: TextStyle( + color: Colors.white, + ), + timelineAppointmentHeight: 60.h, + // timeIntervalWidth: 100, + + // timeIntervalHeight: 50, + timeIntervalWidth: 70, + ), + monthCellBuilder: (context, details) { + return Container( + decoration: BoxDecoration( + color: Colors.transparent, + ), + child: Center( + child: Text( + details.date.day.toString(), + style: TextStyle( + color: Colors.white), // Set text color to white + ), + ), + ); + }, + resourceViewSettings: ResourceViewSettings( + displayNameTextStyle: + TextStyle(color: Colors.white, fontSize: 10), + showAvatar: true, + ), + appointmentBuilder: (context, details) { + final Appointment appointment = details.appointments.first; + + return Container( + decoration: BoxDecoration( + color: details.appointments.first.color ?? Colors.blue, + borderRadius: BorderRadius.circular(4), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + appointment.subject, + style: TextStyle( + color: Colors.white, fontSize: 8.sp), + ), + ], + ), + ), + ); + }), + ), + Positioned( + top: 8.h, + right: 110.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, + ), + )) + ]), + // SfCalendar( // view: CalendarView.month, // controller: _calendarController, @@ -639,14 +709,14 @@ class _CalenderTabState extends State { // ), // border: 0.9), sizedBoxHeight(25.h), - Column( - children: List.generate(communityData.length, (index) { - return communitysessionCard( - imagePath: communityData[index]["imagePath"], - names: communityData[index]["names"], - title: communityData[index]["title"]); - }), - ) + // Column( + // children: List.generate(communityData.length, (index) { + // return communitysessionCard( + // imagePath: communityData[index]["imagePath"], + // names: communityData[index]["names"], + // title: communityData[index]["title"]); + // }), + // ) ], ), ); @@ -780,59 +850,12 @@ class _CalenderTabState extends State { } } - // void _addResources() { - // final Random random = Random(); - // for (int i = 0; i < _nameCollection.length; i++) { - // _employeeCollection.add(CalendarResource( - // displayName: _nameCollection[i], - // id: '000' + i.toString(), - // color: Color.fromRGBO( - // random.nextInt(255), random.nextInt(255), random.nextInt(255), 1), - // image: - // i < _userImages.length ? ExactAssetImage(_userImages[i]) : null)); - // } - // } } -// void _addResourceDetails() { -// _nameCollection.add('John'); -// _nameCollection.add('Bryan'); -// _nameCollection.add('Robert'); -// _nameCollection.add('Kenny'); -// _nameCollection.add('Tia'); -// _nameCollection.add('Theresa'); -// _nameCollection.add('Edith'); -// _nameCollection.add('Brooklyn'); -// _nameCollection.add('James William'); -// _nameCollection.add('Sophia'); -// _nameCollection.add('Elena'); -// _nameCollection.add('Stephen'); -// _nameCollection.add('Zoey Addison'); -// _nameCollection.add('Daniel'); -// _nameCollection.add('Emilia'); -// _nameCollection.add('Kinsley Elena'); -// _nameCollection.add('Daniel'); -// _nameCollection.add('William'); -// _nameCollection.add('Addison'); -// _nameCollection.add('Ruby'); - -// _userImages.add('images/People_Circle5.png'); -// _userImages.add('images/People_Circle8.png'); -// _userImages.add('images/People_Circle18.png'); -// _userImages.add('images/People_Circle23.png'); -// _userImages.add('images/People_Circle25.png'); -// _userImages.add('images/People_Circle20.png'); -// _userImages.add('images/People_Circle13.png'); -// _userImages.add('images/People_Circle11.png'); -// _userImages.add('images/People_Circle27.png'); -// _userImages.add('images/People_Circle26.png'); -// _userImages.add('images/People_Circle24.png'); -// _userImages.add('images/People_Circle15.png'); -// } class MeetingDataSource extends CalendarDataSource { MeetingDataSource( - List source, List resourceColl) { + List source, + ) { appointments = source; - resources = resourceColl; } } diff --git a/lib/Feed Module/Main_Screens/Chats/View/newgroup.dart b/lib/Feed Module/Main_Screens/Chats/View/newgroup.dart index ce261c7..a6b2d95 100644 --- a/lib/Feed Module/Main_Screens/Chats/View/newgroup.dart +++ b/lib/Feed Module/Main_Screens/Chats/View/newgroup.dart @@ -226,15 +226,18 @@ class _NewGroupPageState extends State { }, ), sizedBoxHeight(20.h), - CustomButton( - text: 'Create group', - onPressed: () { - // Get.toNamed(RouteName.mainscreen); - Get.offUntil( - MaterialPageRoute( - builder: (context) => MainScreen()), - (Route route) => false); - }), + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: CustomButton( + text: 'Create group', + onPressed: () { + // Get.toNamed(RouteName.mainscreen); + Get.offUntil( + MaterialPageRoute( + builder: (context) => MainScreen()), + (Route route) => false); + }), + ), sizedBoxHeight(20.h) ], ), diff --git a/lib/Feed Module/Main_Screens/Community/PostDetailScreen/View/PostDetailScreen.dart b/lib/Feed Module/Main_Screens/Community/PostDetailScreen/View/PostDetailScreen.dart index ea71e04..4233d18 100644 --- a/lib/Feed Module/Main_Screens/Community/PostDetailScreen/View/PostDetailScreen.dart +++ b/lib/Feed Module/Main_Screens/Community/PostDetailScreen/View/PostDetailScreen.dart @@ -32,7 +32,8 @@ class _PostDetailsScreenState 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: Column( @@ -51,9 +52,8 @@ class _PostDetailsScreenState extends State { ]), sizedBoxHeight(35.h), Padding( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Column( - children: [ + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: Column(children: [ Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -78,24 +78,33 @@ class _PostDetailsScreenState extends State { ], ), sizedBoxHeight(50.h), - CustomTextFormField( - hintText: "Add comment", - suffixIcon: Container( - height: 20.h, - width: 25.w, - child: Center( - child: Image.asset( - "assets/images/png/iconoir_send.png", - height: 20.h, - width: 25.w, + Align( + alignment: Alignment.bottomCenter, + child: Padding( + padding: EdgeInsets.only(top: 15, bottom: 15), + child: Row( + children: [ + Expanded( + child: CustomTextFormField( + hintText: "Add comment", + suffixIcon: Container( + height: 20.h, + width: 25.w, + child: Center( + child: Image.asset( + "assets/images/png/iconoir_send.png", + height: 20.h, + width: 25.w, + ), + ), + ), + ), + ) + ], ), - ), - ), - ) - ], - ), - ), - sizedBoxHeight(85.h) + )), + sizedBoxHeight(85.h) + ])) ])) ])); } diff --git a/lib/Feed Module/Main_Screens/ExploreDesign/SearchGroup.dart b/lib/Feed Module/Main_Screens/ExploreDesign/SearchGroup.dart index df42dc6..5a17d8e 100644 --- a/lib/Feed Module/Main_Screens/ExploreDesign/SearchGroup.dart +++ b/lib/Feed Module/Main_Screens/ExploreDesign/SearchGroup.dart @@ -25,98 +25,99 @@ class _SearchGroupState extends State { extendBody: true, body: SafeArea( child: Stack(children: [ - const CommonBlurLeftRed(), - const CommonBlurRightRed(), - const CommonBlurLeft(), - const CommonBlurRight(), - Positioned.fill( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: Column(children: [ - sizedBoxHeight(20.h), - commonDivider(), - sizedBoxHeight(20.h), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - SizedBox( - width: 300.w, - child: CustomTextFormField( - leadingIcon: SizedBox( + Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Column(children: [ + sizedBoxHeight(20.h), + commonDivider(), + sizedBoxHeight(20.h), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + width: 300.w, + child: CustomTextFormField( + leadingIcon: SizedBox( + height: 23, + width: 23, + child: Center( + child: Image.asset( + "assets/images/png/ion_search-outline.png", height: 23, width: 23, - child: Center( - child: Image.asset( - "assets/images/png/ion_search-outline.png", - height: 23, - width: 23, - ), - ), ), - hintText: "Search groups", ), ), - text14400white("Cancel"), - ], + hintText: "Search groups", + ), ), - sizedBoxHeight(25.h), - Row( - children: [ - text18w700white("Recent"), - Spacer(), - text16w400_FCFCFCblur("See all"), - ], + text14400white("Cancel"), + ], + ), + sizedBoxHeight(25.h), + Row( + children: [ + text18w700white("Recent"), + Spacer(), + text16w400_FCFCFCblur("See all"), + ], + ), + sizedBoxHeight(30.h), + GestureDetector( + onTap: () { + Get.toNamed(RouteName.detailexplore); + }, + child: rowTile( + imagePath: "assets/images/png/ion_search-outline.png", + title: "Athletes"), + ), + sizedBoxHeight(12.h), + commonDivider(), + sizedBoxHeight(16.h), + Row( + children: [ + CircleAvatar( + radius: 15.r, + backgroundImage: + AssetImage("assets/images/png/cimg3.png"), ), - sizedBoxHeight(30.h), - GestureDetector( - onTap: () { - Get.toNamed(RouteName.detailexplore); - }, - child: rowTile( - imagePath: "assets/images/png/ion_search-outline.png", - title: "Athletes"), - ), - sizedBoxHeight(12.h), - commonDivider(), - sizedBoxHeight(16.h), - Row( - children: [ - CircleAvatar( - radius: 15.r, - backgroundImage: - AssetImage("assets/images/png/cimg3.png"), - ), - sizedBoxWidth(12.w), - text16400white("Kartikey gautam"), - Spacer(), - Icon( - Icons.clear, - color: Colors.white, - ) - ], - ), - sizedBoxHeight(12.h), - commonDivider(), - sizedBoxHeight(16.h), - rowTile( - imagePath: "assets/images/png/Black.png", - title: "Athletes"), - sizedBoxHeight(12.h), - commonDivider(), - sizedBoxHeight(16.h), - rowTile( - imagePath: "assets/images/png/Vector (5)aa.png", - title: "Athletes"), - sizedBoxHeight(12.h), - commonDivider(), - sizedBoxHeight(16.h), - rowTile( - imagePath: "assets/images/png/calender.png", - title: "Athletes"), - sizedBoxHeight(12.h), - commonDivider(), - sizedBoxHeight(16.h), - ]))) + sizedBoxWidth(12.w), + text16400white("Kartikey gautam"), + Spacer(), + Icon( + Icons.clear, + color: Colors.white, + ) + ], + ), + sizedBoxHeight(12.h), + commonDivider(), + sizedBoxHeight(16.h), + rowTile( + imagePath: "assets/images/png/Black.png", + title: "Athletes"), + sizedBoxHeight(12.h), + commonDivider(), + sizedBoxHeight(16.h), + rowTile( + imagePath: "assets/images/png/Vector (5)aa.png", + title: "Athletes"), + sizedBoxHeight(12.h), + commonDivider(), + sizedBoxHeight(16.h), + rowTile( + imagePath: "assets/images/png/calender.png", + title: "Athletes"), + sizedBoxHeight(12.h), + commonDivider(), + sizedBoxHeight(16.h), + ])) ]), )); } diff --git a/lib/Utils/Common/CustomTextformfield.dart b/lib/Utils/Common/CustomTextformfield.dart index a6caef8..24b617e 100644 --- a/lib/Utils/Common/CustomTextformfield.dart +++ b/lib/Utils/Common/CustomTextformfield.dart @@ -116,6 +116,7 @@ class _CustomTextFormFieldState extends State { enableInteractiveSelection: false, maxLines: widget.maxlines, obscureText: obscureText, + controller: widget.textEditingController, decoration: InputDecoration( hintText: widget.hintText, diff --git a/lib/main.dart b/lib/main.dart index 41732c0..988e5da 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,9 +18,11 @@ Future main() async { SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, - ]).then((value) => runApp(StatsFl( - align: Alignment.center, width: 200, height: 100, child: const MyApp()))); + ]).then((value) => runApp(const MyApp())); } +// runApp( +// StatsFl( +// align: Alignment.center, width: 200, height: 100, child: const MyApp()))); class MyApp extends StatefulWidget { const MyApp({super.key}); diff --git a/lib/resources/routes/route_name.dart b/lib/resources/routes/route_name.dart index 7696e5c..ddfcda4 100644 --- a/lib/resources/routes/route_name.dart +++ b/lib/resources/routes/route_name.dart @@ -79,6 +79,8 @@ class RouteName { static const String changepassword = '/changepassword'; static const String addtimeline = '/addtimeline'; static const String verifycode = '/verifycode'; + static const String availability = '/availability'; + //Group Tab diff --git a/lib/resources/routes/routes.dart b/lib/resources/routes/routes.dart index 2e258de..cfa02e7 100644 --- a/lib/resources/routes/routes.dart +++ b/lib/resources/routes/routes.dart @@ -3,6 +3,7 @@ import 'package:get/get_navigation/src/routes/get_route.dart'; import 'package:regroup/Feed%20Module/Main_Screens/CalenderTab/AddEvent/AddEvent.dart'; import 'package:regroup/Feed%20Module/Main_Screens/CalenderTab/AddUsers/AddUsers.dart'; +import 'package:regroup/Feed%20Module/Main_Screens/CalenderTab/Availabillity.dart'; import 'package:regroup/Feed%20Module/Main_Screens/CalenderTab/EventDetails.dart'; import 'package:regroup/Feed%20Module/Main_Screens/CalenderTab/ManageMenmbers/ManageMembersCal.dart'; import 'package:regroup/Feed%20Module/Main_Screens/CalenderTab/Resource%20Pool/ResourcePool.dart'; @@ -465,5 +466,9 @@ class AppRoutes { name: RouteName.certificate, page: () => const Certificate(), ), + GetPage( + name: RouteName.availability, + page: () => const Availability(), + ), ]; } From 438ab33cea94b3fa01ea5828be2ba28fb3b28ead Mon Sep 17 00:00:00 2001 From: cj201199 Date: Thu, 4 Jul 2024 16:26:06 +0530 Subject: [PATCH 2/2] 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 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 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