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(), + ), ]; }