Files
Regroup/lib/Feed Module/Main_Screens/CalenderTab/ManageMenmbers/ManageMembersCal.dart
2024-06-25 20:14:03 +05:30

377 lines
13 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:glassmorphism/glassmorphism.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';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
class ManageMembersCal extends StatefulWidget {
const ManageMembersCal({super.key});
@override
State<ManageMembersCal> createState() => _ManageMembersCalState();
}
class _ManageMembersCalState extends State<ManageMembersCal> {
List memberData = [
{
"imagePath": "assets/images/png/Ellipse 52.png",
"title": "Ryan Dorwart",
"subtitle": "Row row row your boat",
},
{
"imagePath": "assets/images/png/Ellipse 48.png",
"title": "Ahmad Madsen",
"subtitle": "Football fever",
},
{
"imagePath": "assets/images/png/Ellipse 43.png",
"title": "Kaylynn Vaccaro",
"subtitle": "The athletic town",
},
{
"imagePath": "assets/images/png/cimg4.png",
"title": "Kianna Donin",
"subtitle": "Active alliance network",
},
{
"imagePath": "assets/images/png/cimg1.png",
"title": "Maria Herwitz",
"subtitle": "Football fever",
},
{
"imagePath": "assets/images/png/Ellipse 43.png",
"title": "Ahmad Madsen",
"subtitle": "The athletic town",
},
{
"imagePath": "assets/images/png/cimg4.png",
"title": "Kaylynn Vaccaro",
"subtitle": "Active alliance network",
},
];
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Manage members",
customActionWidget: InkWell(
onTap: () {
Get.toNamed(RouteName.addEvent);
},
child: Container(
height: 35.h,
width: 35.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Color(0x40000000),
offset: Offset(0, 6),
blurRadius: 8,
spreadRadius: 0,
),
],
),
child: Icon(Icons.add, color: Colors.white, weight: 2),
),
),
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(10.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.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,
),
),
),
hintText: "Search members",
),
),
sizedBoxHeight(25.h),
ListView.builder(
shrinkWrap: true,
itemCount: memberData.length,
itemBuilder: (context, index) {
return Column(
children: [
memberWidget(
index: index,
imagePath: memberData[index]["imagePath"],
title: memberData[index]["title"],
subtitle: memberData[index]["subtitle"],
),
if (index != memberData.length - 1) commonDivider(),
],
);
},
),
])))
]));
}
Widget memberWidget({
required int index,
required String imagePath,
required String title,
required String subtitle,
}) {
return Padding(
padding: EdgeInsets.symmetric(
vertical: 16.h,
),
child: Row(
children: [
sizedBoxWidth(16.w),
CircleAvatar(
backgroundImage: AssetImage(imagePath),
radius: 25.r,
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
SizedBox(width: 135.w, child: text16w400_FCFCFC(title)),
// sizedBoxWidth(4.w),
InkWell(
onTap: () {
dialogwidget();
},
child: Image.asset(
"assets/images/png/calender.png",
height: 14.h,
width: 14.w,
),
)
],
),
sizedBoxHeight(4.h),
text12w400_FCFCFC_blur(subtitle),
],
),
Spacer(),
Container(
height: 25.h,
width: 72.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.r),
border: Border.all(color: Color(0xFFFF002B), width: 1.w)),
child: Center(child: text10400white("Attending")),
),
sizedBoxWidth(8.w),
commonGlassContainer(
width: 25.w,
height: 25.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100.r,
customWidget: Center(
child: Image.asset(
"assets/images/png/alarm 1 (traced).png",
height: 13.h,
width: 13.w,
),
),
border: 0.5),
sizedBoxWidth(8.w),
commonGlassContainer(
width: 25.w,
height: 25.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100.r,
customWidget: Center(
child: Image.asset(
"assets/images/png/fluent_delete-28-regular.png",
height: 13.h,
width: 13.w,
),
),
border: 0.5),
sizedBoxWidth(12.w)
],
),
);
}
dialogwidget() {
Get.dialog(Dialog(
// backgroundColor: Colors.transparent,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.r),
color: Color(0xFF222935)),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text18w700_FCFCFC("Availability"),
sizedBoxHeight(16.h),
Row(
children: [
commonGlassContainer(
width: 40.w,
height: 40.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("M")),
border: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
width: 40.w,
height: 40.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("Tu")),
border: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
width: 40.w,
height: 40.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("W")),
border: 0.5),
Spacer(),
Row(
children: [
Image.asset(
"assets/images/png/clock.png",
height: 20.h,
width: 20.w,
),
sizedBoxWidth(8.w),
text16w400_FCFCFC("4pm - 8pm"),
],
)
],
),
sizedBoxHeight(20.h),
commonDivider(),
sizedBoxHeight(20.h),
Row(
children: [
commonGlassContainer(
width: 40.w,
height: 40.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("Th")),
border: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
width: 40.w,
height: 40.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("F")),
border: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
width: 40.w,
height: 40.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("Sa")),
border: 0.5),
Spacer(),
Row(
children: [
Image.asset(
"assets/images/png/clock.png",
height: 20.h,
width: 20.w,
),
sizedBoxWidth(8.w),
text16w400_FCFCFC("5pm - 9pm"),
],
)
],
),
sizedBoxHeight(20.h),
commonDivider(),
sizedBoxHeight(20.h),
Row(
children: [
GlassmorphicContainer(
width: 40.w,
height: 40.h,
borderRadius: 100,
border: 0.5,
linearGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFFD90B2E).withOpacity(0.18),
const Color(0xFFD90B2E).withOpacity(0.4),
],
stops: const [
0.1,
1,
],
),
borderGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xffD90B2E),
Color(0xFFD90B2E),
],
),
blur: 10,
child: Center(child: text16w400_FCFCFC("Su")),
),
sizedBoxWidth(8.w),
text16w400_FCFCFC("Not available")
],
),
],
),
),
),
],
),
));
}
}