Merge pull request 'Development' (#5) from Development into main

Reviewed-on: #5
This commit is contained in:
2024-06-28 13:44:05 +00:00
29 changed files with 1212 additions and 723 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -316,7 +316,7 @@ GlassmorphicContainer bottomnavigationbar(MainController _mainController) {
bottom: 0,
child: Center(
child: Image.asset(
'assets/images/png/BottomBar/inactivePeople.png',
'assets/images/png/BottomBar/activePeople.png',
height: 30.h,
width: 30.w,
),

View File

@@ -1,4 +1,5 @@
import 'package:calendar_date_picker2/calendar_date_picker2.dart';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@@ -11,6 +12,7 @@ import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';
class CalenderTab extends StatefulWidget {
const CalenderTab({super.key});
@@ -51,6 +53,82 @@ class _CalenderTabState extends State<CalenderTab> {
},
];
CalendarController? _calendarController;
List<Appointment>? _appointments;
List<CalendarResource> _employeeCollection = <CalendarResource>[];
// final List<String> _nameCollection = <String>[];
// final List<String> _userImages = <String>[];
@override
void initState() {
super.initState();
_calendarController = CalendarController();
_appointments = <Appointment>[
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>[
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();
@override
Widget build(BuildContext context) {
@@ -196,40 +274,144 @@ class _CalenderTabState extends State<CalenderTab> {
),
sizedBoxHeight(25.h),
commonGlassContainer(
width: double.infinity,
height: 314.h,
borderradius: 1,
customWidget: CalendarDatePicker2(
config: CalendarDatePicker2Config(
calendarType: CalendarDatePicker2Type.range,
weekdayLabels: [
'Sun',
'Mon',
'Tue',
'Wed',
'Thu',
'Fri',
'Sat'
],
selectedYearTextStyle: TextStyle(color: Colors.white),
yearTextStyle: TextStyle(color: Colors.white),
selectedDayHighlightColor: Color(0xFFD90B2E),
controlsTextStyle: TextStyle(color: Colors.white),
dayTextStyle: TextStyle(color: Colors.white),
monthTextStyle: TextStyle(color: Colors.white),
weekdayLabelTextStyle: TextStyle(color: Colors.white),
nextMonthIcon: Icon(
Icons.arrow_forward_ios,
color: Colors.white,
),
lastMonthIcon: Icon(
Icons.arrow_back_ios_new,
color: Colors.white,
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),
weekNumberStyle:
WeekNumberStyle(textStyle: TextStyle(color: Colors.white)),
viewHeaderStyle: ViewHeaderStyle(
// backgroundColor: Colors.amber,
dateTextStyle: TextStyle(color: Colors.white),
dayTextStyle: TextStyle(
color: Color(0xFFD90B2E),
),
),
value: [selectedDate],
),
border: 0.9),
// 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,
),
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),
),
],
),
),
);
}),
),
// commonGlassContainer(
// width: double.infinity,
// height: 314.h,
// borderradius: 1,
// customWidget: CalendarDatePicker2(
// config: CalendarDatePicker2Config(
// calendarType: CalendarDatePicker2Type.range,
// weekdayLabels: [
// 'Sun',
// 'Mon',
// 'Tue',
// 'Wed',
// 'Thu',
// 'Fri',
// 'Sat'
// ],
// selectedYearTextStyle: TextStyle(color: Colors.white),
// yearTextStyle: TextStyle(color: Colors.white),
// selectedDayHighlightColor: Color(0xFFD90B2E),
// controlsTextStyle: TextStyle(color: Colors.white),
// dayTextStyle: TextStyle(color: Colors.white),
// monthTextStyle: TextStyle(color: Colors.white),
// weekdayLabelTextStyle: TextStyle(color: Colors.white),
// nextMonthIcon: Icon(
// Icons.arrow_forward_ios,
// color: Colors.white,
// ),
// lastMonthIcon: Icon(
// Icons.arrow_back_ios_new,
// color: Colors.white,
// ),
// ),
// value: [selectedDate],
// ),
// border: 0.9),
sizedBoxHeight(25.h),
Column(
children: List.generate(3, (index) {
@@ -406,41 +588,56 @@ class _CalenderTabState extends State<CalenderTab> {
border: 1),
),
sizedBoxHeight(25.h),
commonGlassContainer(
width: double.infinity,
height: 314.h,
borderradius: 1,
customWidget: CalendarDatePicker2(
config: CalendarDatePicker2Config(
calendarType: CalendarDatePicker2Type.range,
weekdayLabels: [
'Sun',
'Mon',
'Tue',
'Wed',
'Thu',
'Fri',
'Sat'
],
selectedYearTextStyle: TextStyle(color: Colors.white),
yearTextStyle: TextStyle(color: Colors.white),
selectedDayHighlightColor: Color(0xFFD90B2E),
controlsTextStyle: TextStyle(color: Colors.white),
dayTextStyle: TextStyle(color: Colors.white),
monthTextStyle: TextStyle(color: Colors.white),
weekdayLabelTextStyle: TextStyle(color: Colors.white),
nextMonthIcon: Icon(
Icons.arrow_forward_ios,
color: Colors.white,
),
lastMonthIcon: Icon(
Icons.arrow_back_ios_new,
color: Colors.white,
),
),
value: [selectedDate],
),
border: 0.9),
// SfCalendar(
// view: CalendarView.month,
// controller: _calendarController,
// onSelectionChanged: (CalendarSelectionDetails details) {
// setState(() {
// _startDate = details.date!;
// _endDate = details.date!
// .add(Duration(days: 6)); // assuming a week range
// });
// },
// monthViewSettings: MonthViewSettings(
// showAgenda: true,
// ),
// ),
// commonGlassContainer(
// width: double.infinity,
// height: 314.h,
// borderradius: 1,
// customWidget: CalendarDatePicker2(
// config: CalendarDatePicker2Config(
// calendarType: CalendarDatePicker2Type.range,
// weekdayLabels: [
// 'Sun',
// 'Mon',
// 'Tue',
// 'Wed',
// 'Thu',
// 'Fri',
// 'Sat'
// ],
// selectedYearTextStyle: TextStyle(color: Colors.white),
// yearTextStyle: TextStyle(color: Colors.white),
// selectedDayHighlightColor: Color(0xFFD90B2E),
// controlsTextStyle: TextStyle(color: Colors.white),
// dayTextStyle: TextStyle(color: Colors.white),
// monthTextStyle: TextStyle(color: Colors.white),
// weekdayLabelTextStyle: TextStyle(color: Colors.white),
// nextMonthIcon: Icon(
// Icons.arrow_forward_ios,
// color: Colors.white,
// ),
// lastMonthIcon: Icon(
// Icons.arrow_back_ios_new,
// color: Colors.white,
// ),
// ),
// value: [selectedDate],
// ),
// border: 0.9),
sizedBoxHeight(25.h),
Column(
children: List.generate(communityData.length, (index) {
@@ -454,102 +651,188 @@ class _CalenderTabState extends State<CalenderTab> {
),
);
}
}
Widget communitysessionCard({
required String title,
required String imagePath,
required String names,
}) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text18w700_FCFCFC(title),
sizedBoxHeight(25.h),
commonGlassContainer(
width: double.infinity,
height: 290.h,
borderradius: 10.r,
customWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 151.h,
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.r),
topLeft: Radius.circular(10.r))),
child: Image.asset(
imagePath,
fit: BoxFit.cover,
)),
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(16.h),
Row(
children: [
sizedBoxWidth(16.w),
Image.asset(
"assets/images/png/calender.png",
color: Colors.white.withOpacity(0.8),
height: 12.h,
width: 12.w,
),
sizedBoxWidth(8.w),
text10w400_FCFCFC_blur("29th april 2024"),
],
),
sizedBoxHeight(15.h),
Padding(
padding: EdgeInsets.only(left: 16.w),
child: text18w700_FCFCFC(names),
),
sizedBoxHeight(15.h),
Row(
children: [
sizedBoxWidth(16.w),
CircleAvatar(
radius: 12.r,
backgroundImage: AssetImage(
"assets/images/png/Ellipse 52.png"),
),
sizedBoxWidth(8.w),
text14w400_FCFCFC("Ryan dorwat"),
],
),
]),
Spacer(),
Container(
height: 138.h,
width: 143.w,
Widget communitysessionCard({
required String title,
required String imagePath,
required String names,
}) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text18w700_FCFCFC(title),
sizedBoxHeight(25.h),
commonGlassContainer(
width: double.infinity,
height: 290.h,
borderradius: 10.r,
customWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 151.h,
width: double.infinity,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(10.r),
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.r),
topLeft: Radius.circular(10.r))),
child: Image.asset(
imagePath,
fit: BoxFit.cover,
)),
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(16.h),
Row(
children: [
sizedBoxWidth(16.w),
Image.asset(
"assets/images/png/calender.png",
color: Colors.white.withOpacity(0.8),
height: 12.h,
width: 12.w,
),
sizedBoxWidth(8.w),
text10w400_FCFCFC_blur("29th april 2024"),
],
),
sizedBoxHeight(15.h),
Padding(
padding: EdgeInsets.only(left: 16.w),
child: text18w700_FCFCFC(names),
),
sizedBoxHeight(15.h),
Row(
children: [
sizedBoxWidth(16.w),
CircleAvatar(
radius: 12.r,
backgroundImage: AssetImage(
"assets/images/png/Ellipse 52.png"),
),
sizedBoxWidth(8.w),
text14w400_FCFCFC("Ryan dorwat"),
],
),
]),
Spacer(),
Container(
height: 138.h,
width: 143.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(10.r),
),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
text25700FCFCFC("14"),
text16w700_FCFCFCblur("April 2024"),
sizedBoxHeight(12.h),
text16w700_FCFCFC("3:00 pm")
],
),
)
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
text25700FCFCFC("14"),
text16w700_FCFCFCblur("April 2024"),
sizedBoxHeight(12.h),
text16w700_FCFCFC("3:00 pm")
],
),
)
],
),
],
),
border: 1)
],
),
);
}
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: <Widget>[
Text('Event: ${appointment.subject}'),
Text('From: ${appointment.startTime}'),
Text('To: ${appointment.endTime}'),
],
),
border: 1)
],
),
);
actions: <Widget>[
ElevatedButton(
child: Text('Close'),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
}
}
// 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<Appointment> source, List<CalendarResource> resourceColl) {
appointments = source;
resources = resourceColl;
}
}

View File

@@ -537,13 +537,16 @@ class _ChatListState extends State<ChatList> {
: Image.asset(
'assets/images/png/messagedelivered.png'),
sizedBoxWidth(5.w),
Text(
widget.message,
style: TextStyle(
color: Color(0xCCFCFCFC),
fontSize: 12.sp,
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400,
SizedBox(
width: 250,
child: Text(
widget.message,
style: TextStyle(
color: Color(0xCCFCFCFC),
fontSize: 12.sp,
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400,
),
),
),
],

View File

@@ -78,7 +78,7 @@ class _NewGroupPageState extends State<NewGroupPage> {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
child: Scaffold(
backgroundColor: Color.fromARGB(255, 18, 32, 47),
appBar: CommonAppbar(titleTxt: 'New group'),
@@ -132,7 +132,7 @@ class _NewGroupPageState extends State<NewGroupPage> {
(result) {
var file = File(result);
filePath.add(file);
setState(() {});
},
);
@@ -148,8 +148,10 @@ class _NewGroupPageState extends State<NewGroupPage> {
begin: Alignment(0.71, -0.70),
end: Alignment(-0.71, 0.7),
colors: [
Colors.white.withOpacity(0.30000001192092896),
Colors.white.withOpacity(0.30000001192092896)
Colors.white
.withOpacity(0.30000001192092896),
Colors.white
.withOpacity(0.30000001192092896)
],
),
shape: OvalBorder(
@@ -182,13 +184,13 @@ class _NewGroupPageState extends State<NewGroupPage> {
// ),
),
),
SizedBox(
width: 298,
sizedBoxWidth(10.w),
Expanded(
child: CustomTextFormField(
textEditingController: groupnamecontroller,
texttype: TextInputType.text,
hintText: "Group name",
// validatorText: "Enter your full name",
inputFormatters: [
// LengthLimitingTextInputFormatter(20),
@@ -202,7 +204,8 @@ class _NewGroupPageState extends State<NewGroupPage> {
sizedBoxHeight(20.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: text18w700_FCFCFC('Select contacts to add to group'),
child:
text18w700_FCFCFC('Select contacts to add to group'),
),
sizedBoxHeight(20.h),
Padding(
@@ -255,12 +258,10 @@ class _NewGroupPageState extends State<NewGroupPage> {
onPressed: () {
// Get.toNamed(RouteName.mainscreen);
Get.offUntil(
MaterialPageRoute(
builder: (context) => MainScreen()),
(Route<dynamic> route) => false)
;
}
),
MaterialPageRoute(
builder: (context) => MainScreen()),
(Route<dynamic> route) => false);
}),
sizedBoxHeight(20.h)
],
),

View File

@@ -172,48 +172,23 @@ Widget feedTab() {
mainImg: 'assets/images/png/Rectangle 24.png',
containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']),
sizedBoxHeight(20.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: double.infinity,
height: 47.h,
color: Color(0xFF009DAB),
child: Padding(
padding: EdgeInsets.only(left: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
text16w400_FCFCFC('#Announcement'),
],
),
),
),
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(
profileImg: 'assets/images/png/Ellipse 52.png',
title: 'Ryan Dorwat',
mainImg: 'assets/images/png/Rectangle 25.png',
containerTitle: [
'Football',
'Teams player',
'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(
profileImg: 'assets/images/png/Ellipse 52.png',
title: 'Ryan Dorwat',
mainImg: 'assets/images/png/Rectangle 25.png',
containerTitle: [
'Football',
'Teams player',
'Events',
'Marathon',
'Events'
]),
]));
}
@@ -234,13 +209,20 @@ Widget announcecardtile({
}
}
// MediaQuery.of(context).size.height
return commonGlassContainerblue(
width: double.infinity,
height: 570.h,
height: 610.h,
border: 0,
borderradius: 1,
customWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.only(left: 16.w),
child: text16w700_FCFCFC("#Announcement"),
),
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
@@ -377,7 +359,7 @@ Widget announcecardtile({
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
// Get.toNamed(RouteName.postdetailsScreen);
},
child: Container(
height: 163.h,
@@ -402,7 +384,7 @@ Widget announcecardtile({
padding: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.cyclescreen);
// Get.toNamed(RouteName.cyclescreen);
},
child: containertile(text: containerTitle[index])),
);
@@ -415,7 +397,7 @@ Widget announcecardtile({
Row(children: [
InkWell(
onTap: () {
Get.toNamed(RouteName.reactionview);
// Get.toNamed(RouteName.reactionview);
},
child: stackReaction(number: '20', containerImages: [
'assets/images/png/f7_hand-thumbsup.png',
@@ -481,8 +463,7 @@ Widget announcecardtile({
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/f7_hand-thumbsup.png'),
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png',
),
'assets/images/png/f7_hand-thumbsup.png'),
),
Reaction<String>(
value: 'heart',
@@ -502,10 +483,10 @@ Widget announcecardtile({
selectedReaction: Reaction<String>(
value: 'like',
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbs.png'),
'assets/images/png/f7_hand-thumbsup.png'),
),
boxColor: Colors.white,
boxElevation: 2,
boxElevation: 9,
boxRadius: 30,
itemsSpacing: 8,
itemScale: 0.4,
@@ -515,7 +496,6 @@ Widget announcecardtile({
itemAnimationDuration: Duration(milliseconds: 500),
hoverDuration: Duration(milliseconds: 700),
// toggle: false,
direction: ReactionsBoxAlignment.rtl,
child: _buildReactionsIcon(mainImage.value),
);
@@ -524,7 +504,7 @@ Widget announcecardtile({
),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
// Get.toNamed(RouteName.postdetailsScreen);
},
child: Column(
children: [
@@ -985,47 +965,22 @@ Widget latestTab() {
mainImg: 'assets/images/png/Rectangle 24.png',
containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']),
sizedBoxHeight(20.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: double.infinity,
height: 47.h,
color: Color(0xFFD90B2E),
child: Padding(
padding: EdgeInsets.only(left: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
text16w400_FCFCFC('#Announcement'),
],
),
),
),
normalcardtile(
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(
profileImg: 'assets/images/png/Ellipse 52.png',
title: 'Ryan Dorwat',
mainImg: 'assets/images/png/Rectangle 25.png',
containerTitle: [
'Football',
'Teams player',
'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(
profileImg: 'assets/images/png/Ellipse 52.png',
title: 'Ryan Dorwat',
mainImg: 'assets/images/png/Rectangle 25.png',
containerTitle: [
'Football',
'Teams player',
'Events',
'Marathon',
'Events'
]),
]));
}

View File

@@ -2,10 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:regroup/Common/CommonButton.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
@@ -24,14 +22,29 @@ class _ExploreScreenState extends State<ExploreScreen> {
GoogleMapController? _mapController;
double _zoomLevel = 18.0;
// BitmapDescriptor? _customIcon1;
// BitmapDescriptor? _customIcon2;
@override
void initState() {
super.initState();
// _loadCustomMarkers();
global.getLocation();
_showInitialBottomSheet();
super.initState();
}
// void _loadCustomMarkers() async {
// _customIcon1 = await BitmapDescriptor.fromAssetImage(
// ImageConfiguration(size: Size(48, 48)),
// 'assets/images/png/Group 58613.png',
// );
// _customIcon2 = await BitmapDescriptor.fromAssetImage(
// ImageConfiguration(size: Size(48, 48)),
// 'assets/images/custom_marker2.png',
// );
// setState(() {});
// }
Future<void> _showInitialBottomSheet() async {
await Future.delayed(Duration(milliseconds: 400));
exploreBottomSheet();
@@ -80,17 +93,27 @@ class _ExploreScreenState extends State<ExploreScreen> {
exploreBottomSheet2();
},
),
Marker(
markerId: MarkerId('currentP'),
icon: BitmapDescriptor.defaultMarker,
position: LatLng(19.155001, 72.84998),
onTap: () {
exploreBottomSheet2();
},
),
},
),
Positioned(
top: 50.h,
child: SizedBox(
width: 350.w,
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.searchgroup);
},
child: AbsorbPointer(
right: 0,
left: 0,
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.searchgroup);
},
child: AbsorbPointer(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16),
child: CustomTextFormField(
leadingIcon: SizedBox(
height: 23,

View File

@@ -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:regroup/Common/CommonButton.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonTabBar.dart';
import 'package:regroup/Common/CommonWidget.dart';
@@ -10,6 +11,7 @@ import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';
class GroupDetail extends StatefulWidget {
const GroupDetail({super.key});
@@ -38,6 +40,39 @@ class _GroupDetailState extends State<GroupDetail> {
},
];
CalendarController? _calendarController;
List<Appointment>? _appointments;
@override
void initState() {
super.initState();
_calendarController = CalendarController();
_appointments = <Appointment>[
Appointment(
startTime: DateTime(2024, 6, 25, 20, 0),
endTime: DateTime(2024, 6, 25, 23, 30),
subject: 'Lunch',
),
Appointment(
startTime: DateTime(2024, 6, 25, 10, 0),
endTime: DateTime(2024, 6, 25, 10, 30),
subject: 'Meeting',
),
Appointment(
startTime: DateTime.now(),
endTime: DateTime.now().add(Duration(hours: 3)),
subject: 'Match day',
// color: Colors.red,
),
Appointment(
startTime: DateTime.now(),
endTime: DateTime.now().add(Duration(hours: 3)),
subject: 'Muharram/Ashura',
// color: Colors.red,
),
];
}
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -444,6 +479,47 @@ class _GroupDetailState extends State<GroupDetail> {
),
),
sizedBoxHeight(25.h),
commonGlassContainer(
width: double.infinity,
height: 51.h,
borderradius: 10.r,
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(children: [
Image.asset(
"assets/images/png/marketing 1 (traced).png",
height: 28.h,
width: 28.w,
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
text16w700white("Announcements"),
text11w400_F91D42(
"11 New Announcements Request"),
],
),
Spacer(),
GestureDetector(
onTap: () {
// Get.toNamed(RouteName.addEvent);
},
child: Container(
height: 21.h,
width: 43.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.r),
color: Color(0xFFD90B2E),
),
child: Center(child: text12400white("11")),
),
)
]),
),
border: 1),
sizedBoxHeight(25.h),
],
),
),
@@ -454,19 +530,19 @@ class _GroupDetailState extends State<GroupDetail> {
children: [
CommonTabBar(tabs: const [
Tab(
text: 'Posts',
text: 'Announcement',
),
Tab(
text: 'Events',
text: 'sessions',
),
]),
SizedBox(
height: 600.h,
height: 700.h,
child: TabBarView(
// clipBehavior: Clip.none,
children: [
postsTab(),
eventsTab(),
announcementTab(),
sessionsTab(),
],
),
),
@@ -479,7 +555,7 @@ class _GroupDetailState extends State<GroupDetail> {
]));
}
Widget postsTab() {
Widget announcementTab() {
return Column(
children: [
sizedBoxHeight(30.h),
@@ -515,13 +591,20 @@ class _GroupDetailState extends State<GroupDetail> {
}
}
return commonGlassContainer(
// MediaQuery.of(context).size.height
return commonGlassContainerblue(
width: double.infinity,
height: 570.h,
height: 610.h,
border: 0,
borderradius: 1,
customWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.only(left: 16.w),
child: text16w700_FCFCFC("#Announcement"),
),
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
@@ -877,9 +960,83 @@ class _GroupDetailState extends State<GroupDetail> {
));
}
Widget eventsTab() {
Widget sessionsTab() {
return Column(
children: [],
children: [
sizedBoxHeight(40.h),
commonGlassContainer(
width: double.infinity,
height: 500.h,
borderradius: 1,
border: 0,
customWidget: SfCalendar(
view: CalendarView.day,
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: 1,
cellBorderColor: Colors.white,
todayHighlightColor: Color(0xFFD90B2E),
todayTextStyle: const TextStyle(color: Colors.white),
controller: _calendarController,
showNavigationArrow: true,
allowViewNavigation: true,
showDatePickerButton: true,
monthViewSettings: MonthViewSettings(
// agendaStyle: AgendaStyle(
// dateTextStyle: TextStyle(color: Colors.amber),
// ),
),
allowedViews: [
CalendarView.month,
CalendarView.day,
CalendarView.schedule,
],
viewNavigationMode: ViewNavigationMode.snap,
showCurrentTimeIndicator: true,
dataSource: MeetingDataSource(_appointments!),
onTap: calendarTapped,
timeSlotViewSettings: TimeSlotViewSettings(
timeTextStyle: TextStyle(
color: Colors.white,
),
),
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
),
),
);
},
),
),
sizedBoxHeight(30.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: CommonBtn(text: "Join the group"),
)
],
);
}
@@ -899,4 +1056,67 @@ class _GroupDetailState extends State<GroupDetail> {
],
);
}
void _showEventDetails(Appointment appointment) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text('Event Details'),
content: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text('Event: ${appointment.subject}'),
Text('From: ${appointment.startTime}'),
Text('To: ${appointment.endTime}'),
],
),
actions: <Widget>[
ElevatedButton(
child: Text('Close'),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
}
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: <Widget>[
Text('Event: ${appointment.subject}'),
Text('From: ${appointment.startTime}'),
Text('To: ${appointment.endTime}'),
],
),
actions: <Widget>[
ElevatedButton(
child: Text('Close'),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
}
}
}
class MeetingDataSource extends CalendarDataSource {
MeetingDataSource(List<Appointment> source) {
appointments = source;
}
}

View File

@@ -0,0 +1,100 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class Certificate extends StatefulWidget {
const Certificate({super.key});
@override
State<Certificate> createState() => _CertificateState();
}
class _CertificateState extends State<Certificate> {
List CertificateData = [
{
"imagePath": "assets/images/png/image 17.png",
"text": "Lorem ipsum is a dummy text",
},
{
"imagePath": "assets/images/png/image 18.png",
"text": "Lorem ipsum is a dummy text",
},
{
"imagePath": "assets/images/png/image 20.png",
"text": "Lorem ipsum is a dummy text",
},
{
"imagePath": "assets/images/png/image 17.png",
"text": "Lorem ipsum is a dummy text",
},
{
"imagePath": "assets/images/png/image 18.png",
"text": "Lorem ipsum is a dummy text",
},
{
"imagePath": "assets/images/png/image 20.png",
"text": "Lorem ipsum is a dummy text",
},
];
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Certifications/Qualifications",
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Column(children: [
sizedBoxHeight(25.h),
Container(
height: 600.h,
child: GridView.builder(
scrollDirection: Axis.vertical,
gridDelegate:
const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
mainAxisSpacing: 20,
crossAxisSpacing: 8,
childAspectRatio: 0.65,
),
itemCount: CertificateData.length,
itemBuilder: (context, index) {
return Column(
children: [
Image.asset(
CertificateData[index]["imagePath"],
height: 100.h,
width: 105.w,
),
Expanded(
child: Center(
child: text14w400_FCFCFC(
CertificateData[index]["text"],
textAlign: TextAlign.center,
),
),
),
],
);
}),
)
]))))
]));
}
}

View File

@@ -217,4 +217,5 @@ class _ClubsState extends State<Clubs> {
),
);
}
}

View File

@@ -68,14 +68,14 @@ class _ProfileTabState extends State<ProfileTab> {
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Column(children: [
Positioned(
child: commonGlassContainer(
border: 0.5,
width: double.infinity,
height: 840,
borderradius: 1,
customWidget: SingleChildScrollView(
Positioned.fill(
child: commonGlassContainer(
border: 0,
width: double.infinity,
height: MediaQuery.of(context).size.height,
borderradius: 1,
customWidget: SafeArea(
child: SingleChildScrollView(
child: Column(
children: [
Stack(
@@ -106,8 +106,10 @@ class _ProfileTabState extends State<ProfileTab> {
),
),
),
Positioned.fill(
top: 60.h,
Positioned(
bottom: 0,
right: 0,
left: 0,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
@@ -424,18 +426,37 @@ class _ProfileTabState extends State<ProfileTab> {
),
),
),
]),
SafeArea(
child: Positioned(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
children: [
sizedBoxHeight(20.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
commonGlassContainer(
),
Positioned.fill(
top: 40.h,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
children: [
sizedBoxHeight(20.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
commonGlassContainer(
border: 0.5,
width: 40.w,
height: 40.h,
borderradius: 100,
opacity1: 0.5,
opacity2: 0.4,
customWidget: Center(
child: Image.asset(
'assets/images/png/ph_arrow-up-thin.png',
height: 25.h,
width: 25.w,
)),
),
Spacer(),
InkWell(
onTap: () {
Get.toNamed(RouteName.settings);
},
child: commonGlassContainer(
border: 0.5,
width: 40.w,
height: 40.h,
@@ -444,35 +465,15 @@ class _ProfileTabState extends State<ProfileTab> {
opacity2: 0.4,
customWidget: Center(
child: Image.asset(
'assets/images/png/ph_arrow-up-thin.png',
height: 25.h,
width: 25.w,
'assets/images/png/setting2.png',
height: 20.h,
width: 20.w,
)),
),
Spacer(),
InkWell(
onTap: () {
Get.toNamed(RouteName.settings);
},
child: commonGlassContainer(
border: 0.5,
width: 40.w,
height: 40.h,
borderradius: 100,
opacity1: 0.5,
opacity2: 0.4,
customWidget: Center(
child: Image.asset(
'assets/images/png/setting2.png',
height: 20.h,
width: 20.w,
)),
),
),
],
),
],
),
),
],
),
],
),
),
),

View File

@@ -11,7 +11,6 @@ import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
class ChangePassword extends StatefulWidget {
const ChangePassword({super.key});
@@ -37,94 +36,97 @@ class _ChangePasswordState extends State<ChangePassword> {
Positioned.fill(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
sizedBoxHeight(25.h),
text16w400_FCFCFC("Current password"),
sizedBoxHeight(16.w),
CustomTextFormField(
isInputPassword: true,
// textEditingController: _password,
hintText: '',
leadingIcon: Image.asset(
'assets/images/png/lock.png',
width: 22.w,
height: 17.h,
),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(25.h),
text16w400_FCFCFC("Current password"),
sizedBoxHeight(16.w),
CustomTextFormField(
isInputPassword: true,
// textEditingController: _password,
hintText: '',
leadingIcon: Image.asset(
'assets/images/png/lock.png',
width: 22.w,
height: 17.h,
),
// const Icon(Icons.lock_outline),
// validationMessage: "Enter your password",
validator: (val) {
if (val == null || val.isEmpty) {
return 'Please enter your password';
}
return null;
},
inputFormatters: [
LengthLimitingTextInputFormatter(20),
RemoveEmojiInputFormatter()
],
),
sizedBoxHeight(25.h),
text16w400_FCFCFC("New password"),
sizedBoxHeight(16.w),
CustomTextFormField(
isInputPassword: true,
// textEditingController: _password,
hintText: '',
leadingIcon: Image.asset(
'assets/images/png/lock.png',
width: 22.w,
height: 17.h,
),
// const Icon(Icons.lock_outline),
// validationMessage: "Enter your password",
validator: (val) {
if (val == null || val.isEmpty) {
return 'Please enter your password';
}
return null;
},
inputFormatters: [
LengthLimitingTextInputFormatter(20),
RemoveEmojiInputFormatter()
],
),
sizedBoxHeight(25.h),
text16w400_FCFCFC("New password"),
sizedBoxHeight(16.w),
CustomTextFormField(
isInputPassword: true,
// textEditingController: _password,
hintText: '',
leadingIcon: Image.asset(
'assets/images/png/lock.png',
width: 22.w,
height: 17.h,
),
// const Icon(Icons.lock_outline),
// validationMessage: "Enter your password",
validator: (val) {
if (val == null || val.isEmpty) {
return 'Please enter your password';
}
return null;
},
inputFormatters: [
LengthLimitingTextInputFormatter(20),
RemoveEmojiInputFormatter()
],
),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Repeat password"),
sizedBoxHeight(16.w),
CustomTextFormField(
isInputPassword: true,
// textEditingController: _password,
hintText: '',
leadingIcon: Image.asset(
'assets/images/png/lock.png',
width: 22.w,
height: 17.h,
),
// const Icon(Icons.lock_outline),
// validationMessage: "Enter your password",
validator: (val) {
if (val == null || val.isEmpty) {
return 'Please enter your password';
}
return null;
},
inputFormatters: [
LengthLimitingTextInputFormatter(20),
RemoveEmojiInputFormatter()
],
),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Repeat password"),
sizedBoxHeight(16.w),
CustomTextFormField(
isInputPassword: true,
// textEditingController: _password,
hintText: '',
leadingIcon: Image.asset(
'assets/images/png/lock.png',
width: 22.w,
height: 17.h,
),
// const Icon(Icons.lock_outline),
// validationMessage: "Enter your password",
validator: (val) {
if (val == null || val.isEmpty) {
return 'Please enter your password';
}
return null;
},
inputFormatters: [
LengthLimitingTextInputFormatter(20),
RemoveEmojiInputFormatter()
],
),
sizedBoxHeight(50.h),
CommonBtn(
text: "Verify",
onTap: () {
Get.toNamed(RouteName.verifycode);
},
)
]),
// const Icon(Icons.lock_outline),
// validationMessage: "Enter your password",
validator: (val) {
if (val == null || val.isEmpty) {
return 'Please enter your password';
}
return null;
},
inputFormatters: [
LengthLimitingTextInputFormatter(20),
RemoveEmojiInputFormatter()
],
),
sizedBoxHeight(50.h),
CommonBtn(
text: "Verify",
onTap: () {
Get.toNamed(RouteName.verifycode);
},
)
]),
),
))
]));
}

View File

@@ -119,8 +119,9 @@ class _CustomPinCodeFieldState extends State<CustomPinCodeField> {
super.dispose();
}
String? _validate(String? value) {
if (_currentText.isEmpty) {
String? _validate(int index) {
// _currentText = _controllers.map((controller) => controller.text).join();
if (_currentText[index].isEmpty) {
return "Please Enter verification code";
} else if (_currentText.length < 4) {
return "OTP length should be at least 4";
@@ -134,6 +135,8 @@ class _CustomPinCodeFieldState extends State<CustomPinCodeField> {
});
if (value.length == 1 && index != 3) {
FocusScope.of(context).nextFocus();
} else if (value.isEmpty && index != 0) {
FocusScope.of(context).previousFocus();
}
widget.onChanged(_currentText);
@@ -148,34 +151,42 @@ class _CustomPinCodeFieldState extends State<CustomPinCodeField> {
key: _formKey,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: List.generate(4, (index) {
return Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 50,
child: TextFormField(
controller: _controllers[index],
focusNode: _focusNodes[index],
keyboardType: TextInputType.number,
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
LengthLimitingTextInputFormatter(1),
],
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 20.sp,
fontFamily: 'Helvetica',
Center(
child: Container(
width: 30,
height: 40,
// color: Colors.amber,
child: Center(
child: TextFormField(
controller: _controllers[index],
focusNode: _focusNodes[index],
keyboardType: TextInputType.number,
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
LengthLimitingTextInputFormatter(1),
],
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 20.sp,
fontFamily: 'Helvetica',
),
decoration: InputDecoration(
border: InputBorder.none,
errorStyle: TextStyle(height: 0),
),
onChanged: (value) => _onChanged(value, index),
validator: (value) {
if (index == 3) return _validate(index);
return null;
},
),
),
decoration: InputDecoration(
border: InputBorder.none,
errorStyle: TextStyle(height: 0),
),
onChanged: (value) => _onChanged(value, index),
validator: (value) {
if (index == 3) return _validate(value);
return null;
},
),
),
if (index != 3)

View File

@@ -95,8 +95,14 @@ class _ManageTagsState extends State<ManageTags> {
Widget tagsTab() {
List tags = ['Cycle', 'Sports', 'Fitness', 'Kayaking', 'Sports club'];
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: text16400white("Special Announcement Tags"),
),
sizedBoxHeight(15.h),
ListView.builder(
shrinkWrap: true,
itemCount: tags.length,

View File

@@ -604,7 +604,7 @@ class _CommunityDetailsState extends State<CommunityDetails> {
borderradius: 100,
customWidget: Center(
child: Image.asset(
'assets/images/png/Vector.png',
'assets/images/png/Frame 1000004088.png',
height: 13.h,
width: 13.w,
),
@@ -696,7 +696,7 @@ class _CommunityDetailsState extends State<CommunityDetails> {
child: Column(
children: [
Image.asset(
'assets/images/png/Vector.png',
'assets/images/png/Frame 1000004088.png',
height: 19.h,
width: 19.w,
),

View File

@@ -21,12 +21,14 @@ class _MyCommunityState extends State<MyCommunity> {
{
"imagePath": "assets/images/png/img2.png",
"text": "Active alliance network",
"members": "7 members"
"members": "7 members",
"index": 1,
},
{
"imagePath": "assets/images/png/img34.png",
"text": "FitFam federation",
"members": "7 members"
"members": "7 members",
"index": 2,
},
];
@@ -34,15 +36,27 @@ class _MyCommunityState extends State<MyCommunity> {
{
"imagePath": "assets/images/png/img45.png",
"text": "The athletic town",
"members": "7 members"
"members": "7 members",
"index": 3,
},
{
"imagePath": "assets/images/png/img2.png",
"text": "Football fever",
"members": "7 members"
"members": "7 members",
"index": 4,
},
];
var selectedContainerIndices = <int>{}.obs;
void toggleSelectedIndex(int index) {
if (selectedContainerIndices.contains(index)) {
selectedContainerIndices.remove(index);
} else {
selectedContainerIndices.add(index);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -50,7 +64,7 @@ class _MyCommunityState extends State<MyCommunity> {
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "My Community",
titleTxt: "My Communities",
customActionWidget: Row(
children: [
GestureDetector(
@@ -111,7 +125,8 @@ class _MyCommunityState extends State<MyCommunity> {
['imagePath'],
title: JoinedcommunityData[index]['text'],
members: JoinedcommunityData[index]
['members']);
['members'],
index: JoinedcommunityData[index]['index']);
}),
),
text18w700_FCFCFC("Requested communities"),
@@ -125,7 +140,8 @@ class _MyCommunityState extends State<MyCommunity> {
['imagePath'],
title: RequestcommunityData[index]['text'],
members: RequestcommunityData[index]
['members']);
['members'],
index: RequestcommunityData[index]['index']);
}),
)
]),
@@ -138,6 +154,7 @@ class _MyCommunityState extends State<MyCommunity> {
required String title,
required void Function()? ontap,
required String members,
required int index,
}) {
return Padding(
padding: EdgeInsets.only(bottom: 25.h),
@@ -180,20 +197,34 @@ class _MyCommunityState extends State<MyCommunity> {
sizedBoxHeight(10.h),
Row(
children: [
commonGlassContainer(
border: 0.9,
width: 30.w,
height: 30.h,
borderradius: 100.r,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(
child: Image.asset(
"assets/images/png/Black.png",
Stack(clipBehavior: Clip.none, children: [
commonGlassContainer(
border: 0.9,
width: 30.w,
height: 30.h,
borderradius: 100.r,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(
child: Image.asset(
"assets/images/png/Black.png",
height: 12.h,
width: 16.w,
),
)),
Positioned(
top: 0,
right: -4,
child: Container(
height: 12.h,
width: 16.w,
),
)),
width: 12.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Color(0xFFD90B2E),
),
child: Center(child: text6400white("2")),
))
]),
sizedBoxWidth(15.w),
text14w400_FCFCFCblur("10 groups")
],
@@ -295,20 +326,51 @@ class _MyCommunityState extends State<MyCommunity> {
sizedBoxHeight(16.h),
commonDivider(),
sizedBoxHeight(10.h),
Row(
children: [
stackContainers(
number: "+2",
containerImages: [
"assets/images/png/cimg3.png",
"assets/images/png/cimg2.png",
"assets/images/png/cimg3.png",
"assets/images/png/cimg2.png",
],
),
sizedBoxWidth(95.w),
text12w400_FCFCFC_blur(members),
],
Expanded(
child: Row(
children: [
stackContainers(
number: "+2",
containerImages: [
"assets/images/png/cimg3.png",
"assets/images/png/cimg2.png",
"assets/images/png/cimg3.png",
"assets/images/png/cimg2.png",
],
),
sizedBoxWidth(95.w),
text12w400_FCFCFC_blur(members),
Spacer(),
Obx(() {
return GestureDetector(
onTap: () {
toggleSelectedIndex(index);
},
child: Container(
width: selectedContainerIndices.contains(index)
? 118.w
: 100.w,
height: 30.h,
decoration: BoxDecoration(
color:
selectedContainerIndices.contains(index)
? null
: Color(0xFFD90B2E),
borderRadius: BorderRadius.all(
Radius.circular(30.r),
),
border: Border.all(
color: Color(0xFFD90B2E), width: 1.w)),
child: Center(
child:
selectedContainerIndices.contains(index)
? text14400white("Requested")
: text14400white("Joined")),
),
);
})
],
),
)
],
),
@@ -316,5 +378,4 @@ class _MyCommunityState extends State<MyCommunity> {
),
);
}
}

View File

@@ -32,6 +32,7 @@ Widget text20400white(String text) {
fontFamily: 'Helvetica'),
);
}
Widget text20400FCFCFC(String text) {
return Text(
text,
@@ -402,6 +403,17 @@ Widget text10400white(String text) {
);
}
Widget text6400white(String text) {
return Text(
text,
style: TextStyle(
fontSize: 6.sp,
color: Colors.white,
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400),
);
}
Widget text10400whiteblur(String text) {
return Text(
text,
@@ -562,6 +574,17 @@ Widget text11w400_FCFCFC(String text) {
);
}
Widget text11w400_F91D42(String text) {
return Text(
text,
style: TextStyle(
fontSize: 11.sp,
color: Color(0xFFF91D42),
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400),
);
}
Widget text11w400white(String text) {
return Text(
text,

View File

@@ -20,18 +20,7 @@ import 'package:shared_preferences/shared_preferences.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
SharedPreferences prefs = await SharedPreferences.getInstance();
// GlobalVariables globalVariables = GlobalVariables();
// token = prefs.getString('token');
// await Firebase.initializeApp(
// options: DefaultFirebaseOptions.currentPlatform,
// );
// FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
// PlatformDispatcher.instance.onError = (error, stack) {
// FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
// return true;
// };
// OnBoard = prefs.getBool("OnBoard");
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
]).then((value) => runApp(const MyApp()));
@@ -44,156 +33,7 @@ class MyApp extends StatefulWidget {
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
// var _connectionStatus = ConnectivityResult.values.toString();
// late StreamSubscription<List<ConnectivityResult>> subscription;
// Connectivity connectivity = Connectivity();
List<ConnectivityResult> _connectionStatus = [ConnectivityResult.none];
final Connectivity _connectivity = Connectivity();
late StreamSubscription<List<ConnectivityResult>> _connectivitySubscription;
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
initConnectivity();
_connectivitySubscription =
_connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
// connectivity = Connectivity();
// checkInternet();
// if (Platform.isAndroid) {
// _getStoragePermission();
// }
// _getStoragePermission();
// subscription = connectivity.onConnectivityChanged
// .listen((List<ConnectivityResult> result) {
// _connectionStatus = result.toString();
// if (result == ConnectivityResult.wifi ||
// result == ConnectivityResult.mobile) {
// setState(() {
// _connectionStatus = result.toString();
// Get.back(result: true);
// });
// } else if (result == ConnectivityResult.none) {
// setState(() {
// _connectionStatus = result.toString();
// Get.toNamed(RouteName.nointernet);
// });
// }
// });
// print(_connectionStatus);
}
Future<void> initConnectivity() async {
late List<ConnectivityResult> result;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
result = await _connectivity.checkConnectivity();
} on PlatformException catch (e) {
log('Couldn\'t check connectivity status', error: e);
return;
}
// If the widget was removed from the tree while the asynchronous platform
// message was in flight, we want to discard the reply rather than calling
// setState to update our non-existent appearance.
if (!mounted) {
return Future.value(null);
}
return _updateConnectionStatus(result);
}
Future<void> _updateConnectionStatus(List<ConnectivityResult> result) async {
// setState(() {
// _connectionStatus = result;
// });
if (result.contains(ConnectivityResult.wifi) ||
result.contains(ConnectivityResult.mobile)) {
setState(() {
_connectionStatus = result;
Get.back(result: true);
});
} else {
setState(() {
_connectionStatus = result;
Get.toNamed(RouteName.nointernet);
});
// Get.toNamed(RouteName.nointernet);
}
// ignore: avoid_print
print('Connectivity changed: $_connectionStatus');
}
Future<void> _getStoragePermission() async {
DeviceInfoPlugin plugin = DeviceInfoPlugin();
AndroidDeviceInfo android = await plugin.androidInfo;
if (android.version.sdkInt < 33) {
if (await Permission.storage.request().isGranted) {
// setState(() {
// permissionGranted = true;
// });
} else if (await Permission.storage.request().isPermanentlyDenied) {
await openAppSettings();
await utils.showToast("Permission denied.");
}
// else if (await Permission.audio.request().isDenied) {
// // setState(() {
// // permissionGranted = false;
// // });
// }
} else {
if (await Permission.photos.request().isGranted) {
// await utils.showToast("Permission granted.");
// setState(() {
// permissionGranted = true;
// });
} else if (await Permission.photos.request().isPermanentlyDenied) {
await openAppSettings();
await utils.showToast("Permission denied.");
} else if (await Permission.photos.request().isDenied) {
await openAppSettings();
await utils.showToast("Permission denied.");
// setState(() {
// permissionGranted = false;
// });
}
}
}
// Future<void> checkInternet() async {
// final connectivityResult = await (Connectivity().checkConnectivity());
// if (connectivityResult == ConnectivityResult.wifi ||
// connectivityResult == ConnectivityResult.mobile) {
// setState(() {
// _connectionStatus = connectivityResult.toString();
// });
// } else {
// setState(() {
// _connectionStatus = connectivityResult.toString();
// print(_connectionStatus.toString());
// Get.toNamed(RouteName.nointernet);
// // Navigator.pushReplacementNamed(context, "/noInternet");
// });
// }
// }
@override
void dispose() {
super.dispose();
WidgetsBinding.instance.removeObserver(this);
// subscription.cancel();
_connectivitySubscription.cancel();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return ScreenUtilInit(
@@ -206,9 +46,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
fontFamily: 'Cambria',
),
debugShowCheckedModeBanner: false,
initialRoute: RouteName.individualprofilestep1,
//initialRoute: RouteName.mainScreen,
initialRoute: RouteName.mainscreen,
getPages: AppRoutes.appRoutes(),
),
designSize: const Size(390, 848),

View File

@@ -388,7 +388,7 @@ class ActivityContainer extends StatelessWidget {
height: 120.h,
decoration: ShapeDecoration(
gradient: LinearGradient(
begin: Alignment(0.98, -0.21),
begin: const Alignment(0.98, -0.21),
end: Alignment(-0.98, 0.21),
colors: isSelected
? [

View File

@@ -35,14 +35,12 @@ class _SplashScreenState extends State<SplashScreen> {
setState(() {
_connectionStatus = connectivityResult;
// Navigator.pushReplacementNamed(context, "/noInternet");
});
}
}
Future<void> initConnectivity() async {
late List<ConnectivityResult> result;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
result = await _connectivity.checkConnectivity();
} on PlatformException catch (e) {
@@ -50,9 +48,7 @@ class _SplashScreenState extends State<SplashScreen> {
return;
}
// If the widget was removed from the tree while the asynchronous platform
// message was in flight, we want to discard the reply rather than calling
// setState to update our non-existent appearance.
if (!mounted) {
return Future.value(null);
}
@@ -73,7 +69,6 @@ class _SplashScreenState extends State<SplashScreen> {
void initState() {
// TODO: implement initState
super.initState();
// checkInternet();
initConnectivity();
log(_connectionStatus.toString());
@@ -83,46 +78,13 @@ class _SplashScreenState extends State<SplashScreen> {
if (result != null && result) {
Timer(const Duration(seconds: 1), () async {
Get.toNamed(RouteName.onboarding1);
// SharedPreferences prefs = await SharedPreferences.getInstance();
// token = prefs.getString('token');
// myusername = prefs.getString('name');
// phonenumber = prefs.getString('contact_number');
// OnBoard = prefs.getBool('OnBoard') ?? false;
// if (OnBoard == false) {
// Get.toNamed(RouteName.sliderscreen1);
// } else {
// if (token == null || token!.isEmpty) {
// Get.offAndToNamed(RouteName.loginScreen);
// } else {
// GetProfile().GetProfileAPI().then((value) {
// Get.toNamed(RouteName.mainScreen, arguments: 0);
// }
// );
// }
// }
});
}
} else {
Timer(const Duration(seconds: 2), () async {
Get.toNamed(RouteName.onboarding1);
// SharedPreferences prefs = await SharedPreferences.getInstance();
// token = prefs.getString('token');
// myusername = prefs.getString('name');
// phonenumber = prefs.getString('contact_number');
// OnBoard = prefs.getBool('OnBoard') ?? false;
// if (OnBoard == false) {
// Get.toNamed(RouteName.sliderscreen1);
// } else {
// if (token == null || token!.isEmpty) {
// Get.offAndToNamed(RouteName.loginScreen);
// } else {
// GetProfile().GetProfileAPI().then((value) {
// Get.toNamed(RouteName.mainScreen, arguments: 0);
// });
// }
// }
});
}
});

View File

@@ -91,6 +91,8 @@ class RouteName {
static const String newpost = '/newpost';
static const String groupevent = '/groupevent';
static const String connectcommunity = '/connectcommunity';
static const String certificate = '/certificate';
//subgroup
static const String subgroups = '/subgroups';

View File

@@ -30,6 +30,7 @@ import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/SubGroup/SubGro
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/SubGroup/SubgroupSetting.dart';
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/SubGroup/Subgroups.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Badges/Badges.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Certificate/Certificate.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Clubs/Clubs.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/EditProfile.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Followers/Followers.dart';
@@ -459,5 +460,10 @@ class AppRoutes {
name: RouteName.detailexplore,
page: () => const DetailExplore(),
),
GetPage(
name: RouteName.certificate,
page: () => const Certificate(),
),
];
}

View File

@@ -41,14 +41,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
calendar_date_picker2:
dependency: "direct main"
description:
name: calendar_date_picker2
sha256: "5fddc1fb78c8f218b2e0dd6bae239f7ac502784c62f34ef96f4b22a8cb5d5608"
url: "https://pub.dev"
source: hosted
version: "1.0.3"
characters:
dependency: transitive
description:
@@ -508,10 +500,10 @@ packages:
dependency: transitive
description:
name: intl
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
url: "https://pub.dev"
source: hosted
version: "0.19.0"
version: "0.18.1"
js:
dependency: transitive
description:
@@ -857,26 +849,26 @@ packages:
dependency: "direct main"
description:
name: syncfusion_flutter_calendar
sha256: "4c14947b6a398afbbb341b4ea069bc0c1a68d5459ff8b04c8668342ea6380820"
sha256: "31eb2bca4656dac4cd208b41ef0687e19b582272bc40414d7000384c1c9b5cae"
url: "https://pub.dev"
source: hosted
version: "25.2.7"
version: "21.2.10"
syncfusion_flutter_core:
dependency: transitive
description:
name: syncfusion_flutter_core
sha256: e17dcc7a1d0701e84d0a83c0040503cdcc6c72e44db0d733ab4c706dd5b8b9f8
sha256: "8db8f55c77f56968681447d3837c10f27a9e861e238a898fda116c7531def979"
url: "https://pub.dev"
source: hosted
version: "25.2.7"
version: "21.2.10"
syncfusion_flutter_datepicker:
dependency: transitive
description:
name: syncfusion_flutter_datepicker
sha256: ebe93b6b54937164ee8b19cd036f314f226a5d69c47da97d05ce07a0ecae4dee
sha256: "6b0dacfe2f968de2b9107e2dc24fcaa2499415ae655df8f0d3ad0356eb090213"
url: "https://pub.dev"
source: hosted
version: "25.2.7"
version: "21.2.10"
term_glyph:
dependency: transitive
description:
@@ -897,10 +889,10 @@ packages:
dependency: transitive
description:
name: timezone
sha256: a6ccda4a69a442098b602c44e61a1e2b4bf6f5516e875bbf0f427d5df14745d5
sha256: "1cfd8ddc2d1cfd836bc93e67b9be88c3adaeca6f40a00ca999104c30693cdca0"
url: "https://pub.dev"
source: hosted
version: "0.9.3"
version: "0.9.2"
typed_data:
dependency: transitive
description:

View File

@@ -59,11 +59,11 @@ dependencies:
dropdown_button2: ^2.3.9
flutter_reaction_button: any
syncfusion_flutter_calendar: ^25.2.7
calendar_date_picker2: ^1.0.3
# calendar_date_picker2: ^1.0.3
dotted_border: ^2.1.0
google_maps_flutter: ^2.2.8
geolocator: ^11.1.0
syncfusion_flutter_calendar: ^21.2.10
dev_dependencies:
@@ -91,7 +91,6 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/
- assets/icons/
- assets/images/png/
- assets/images/png/BottomBar/
- assets/images/png/sidemenu/