169 lines
5.8 KiB
Dart
169 lines
5.8 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/sized_box.dart';
|
|
import 'package:regroup/Utils/texts.dart';
|
|
|
|
class ConnectCommunity extends StatefulWidget {
|
|
const ConnectCommunity({super.key});
|
|
|
|
@override
|
|
State<ConnectCommunity> createState() => _ConnectCommunityState();
|
|
}
|
|
|
|
class _ConnectCommunityState extends State<ConnectCommunity> {
|
|
List communityData = [
|
|
{
|
|
"imagePath": "assets/images/png/img2.png",
|
|
"text": "Active alliance network",
|
|
"members": "7 members"
|
|
},
|
|
{
|
|
"imagePath": "assets/images/png/img34.png",
|
|
"text": "FitFam federation",
|
|
"members": "7 members"
|
|
},
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
// key: _scaffoldKey1,
|
|
backgroundColor: const Color(0xFF222935),
|
|
extendBody: true,
|
|
resizeToAvoidBottomInset: false,
|
|
appBar: const CommonAppbar(
|
|
titleTxt: "Connect with communities",
|
|
),
|
|
body: Stack(children: [
|
|
Container(
|
|
decoration: const BoxDecoration(
|
|
image: DecorationImage(
|
|
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
|
fit: BoxFit.fill)),
|
|
),Padding(
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
|
child:
|
|
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
sizedBoxHeight(30.h),
|
|
Expanded(
|
|
child: ListView.builder(
|
|
shrinkWrap: true,
|
|
physics: const BouncingScrollPhysics(),
|
|
itemCount: communityData.length,
|
|
itemBuilder: (context, index) {
|
|
return communityCard(
|
|
ontap: () {},
|
|
imagepath: communityData[index]['imagePath'],
|
|
title: communityData[index]['text'],
|
|
members: communityData[index]['members']);
|
|
},
|
|
),
|
|
)
|
|
]),
|
|
)
|
|
]));
|
|
}
|
|
|
|
Widget communityCard({
|
|
required String imagepath,
|
|
required String title,
|
|
required void Function()? ontap,
|
|
required String members,
|
|
}) {
|
|
return Padding(
|
|
padding: EdgeInsets.only(bottom: 25.h),
|
|
child: GestureDetector(
|
|
onTap: ontap,
|
|
child: commonGlassUI(
|
|
borderwidth: 0.9,
|
|
width: double.infinity,
|
|
height: 162.h,
|
|
borderRadius: BorderRadius.circular( 10.r),
|
|
customWidget: Padding(
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
|
|
child: Column(
|
|
children: [
|
|
Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Container(
|
|
height: 65.h,
|
|
width: 65.h,
|
|
decoration: const BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
// color: Colors.amber,
|
|
),
|
|
child:
|
|
// Center(
|
|
// child: Image.asset(imagepath, fit: BoxFit.cover)),
|
|
|
|
CircleAvatar(
|
|
backgroundImage: AssetImage(
|
|
imagepath,
|
|
),
|
|
),
|
|
),
|
|
sizedBoxWidth(13.w),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
text18w700_FCFCFC(title),
|
|
sizedBoxHeight(10.h),
|
|
Row(
|
|
children: [
|
|
Image.asset(
|
|
"assets/images/png/community 1 (traced).png",
|
|
height: 20.h,
|
|
width: 20.w,
|
|
),
|
|
sizedBoxWidth(3.w),
|
|
text14w400_FCFCFCblur("10 groups")
|
|
],
|
|
),
|
|
],
|
|
),
|
|
const Spacer(),
|
|
],
|
|
),
|
|
sizedBoxHeight(16.h),
|
|
commonDivider(),
|
|
sizedBoxHeight(10.h),
|
|
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),
|
|
const Spacer(),
|
|
Container(
|
|
height: 30.h,
|
|
width: 123.w,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(30.r),
|
|
color: const Color(0xFFD90B2E)),
|
|
child: Center(
|
|
child: text14w400_FCFCFC("Request to join")),
|
|
)
|
|
],
|
|
),
|
|
)
|
|
],
|
|
),
|
|
)),
|
|
),
|
|
);
|
|
}
|
|
}
|