Files
Regroup/lib/Feed Module/sidemenu/Community/Admin/PopupItem/Community settings/ManageGroup.dart
2024-07-01 19:58:39 +05:30

189 lines
6.1 KiB
Dart

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/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class ManageGroups extends StatefulWidget {
const ManageGroups({super.key});
@override
State<ManageGroups> createState() => _ManageGroupsState();
}
class _ManageGroupsState extends State<ManageGroups> {
List groupData = [
{
"imagePath": "assets/images/png/img45.png",
"title": "Iron titans fitness crew",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Rectangle 25.png",
"title": "Body blitz brigade",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/img2.png",
"title": "Fit fusion squad",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/img2.png",
"title": "Power pulse posse",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/img2.png",
"title": "Wellness warriors collective",
"subtitle": "Lorem ipsum dummy text",
},
];
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
resizeToAvoidBottomInset: false,
appBar: CommonAppbar(
titleTxt: "Manage groups",
customActionWidget: InkWell(
onTap: () {},
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: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
), SingleChildScrollView(
child: Column(children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(20.h),
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 groups",
),
sizedBoxHeight(25.h),
Row(
children: [
commonGlassContainer(
opacity1: 0.24,
opacity2: 0.24,
width: 50.w,
height: 50.h,
borderradius: 100,
customWidget: Center(
child: Image.asset(
"assets/images/png/Black.png",
height: 30.h,
width: 30.w,
)),
border: 0.5),
sizedBoxWidth(8.w),
text18w400_FCFCFC("Create group"),
Spacer(),
Icon(
Icons.arrow_forward_ios_outlined,
color: Colors.white,
size: 14.sp,
),
],
),
sizedBoxHeight(30.h),
text18w700white("Groups"),
sizedBoxHeight(20.h),
]),
),
ListView.builder(
shrinkWrap: true,
itemCount: groupData.length,
itemBuilder: (context, index) {
return Column(
children: [
groupWidget(
imagePath: groupData[index]["imagePath"],
title: groupData[index]["title"],
subtitle: groupData[index]["subtitle"]),
commonDivider(),
],
);
},
)
]),
)
]));
}
}
Widget groupWidget({
required String imagePath,
required String title,
required String subtitle,
}) {
return Padding(
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
child: Row(
children: [
CircleAvatar(
backgroundImage: AssetImage(imagePath),
radius: 20.r,
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(title),
sizedBoxHeight(4.h),
text12w400_FCFCFC_blur(subtitle)
],
),
Spacer(),
Icon(
Icons.clear,
color: Color(0xFFFFFFFF),
weight: 1.88,
)
],
),
);
}