Community Setting pages edit community, manage members and tags done

This commit is contained in:
cj201199
2024-06-04 13:02:13 +05:30
parent 9fe683107c
commit 2de41454e3
27 changed files with 1327 additions and 196 deletions

View File

@@ -4,6 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonBottomNavigationBar.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonTabBar.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Common/controller/MainScreen.dart';
import 'package:regroup/Feed%20Module/sidemenu/sidemenu.dart';
@@ -89,7 +90,17 @@ class _CommunityScreenState extends State<CommunityScreen> {
// initialIndex: selectedIndex.value,
child: Column(
children: [
MyTabBar(),
CommonTabBar(tabs: const [
Tab(
text: 'Feed',
),
Tab(
text: 'Popular',
),
Tab(
text: 'Latest',
),
]),
SizedBox(
height: 600.h,
child: TabBarView(
@@ -631,36 +642,3 @@ Widget latestTab() {
children: [],
);
}
class MyTabBar extends StatelessWidget {
// Set the desired height
@override
Widget build(BuildContext context) {
return TabBar(
dividerColor: Color(0xFFFFFFFF).withOpacity(0.07),
labelStyle: TextStyle(
fontSize: 14.sp,
color: Color(0xFFFCFCFC),
fontWeight: FontWeight.w400,
fontFamily: 'Helvetica'),
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: const Color(0xFFD90B2E),
// labelColor: Colors.white,
indicatorWeight: 2.h,
dividerHeight: 2.h,
unselectedLabelColor: Color(0xFFFCFCFC),
overlayColor: MaterialStateProperty.all(const Color(0xFFD90B2E)),
tabs: const [
Tab(
text: 'Feed',
),
Tab(
text: 'Popular',
),
Tab(
text: 'Latest',
),
]);
}
}

View File

@@ -3,6 +3,7 @@ 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/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonTabBar.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Feed%20Module/Main_Screens/Community/Community.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
@@ -44,7 +45,14 @@ class _CycleScreenState extends State<CycleScreen> {
// initialIndex: selectedIndex.value,
child: Column(
children: [
CycleTabBar(),
CommonTabBar(tabs: const [
Tab(
text: 'Popular',
),
Tab(
text: 'Latest',
),
]),
SizedBox(
height: 670.h,
child: TabBarView(
@@ -484,33 +492,3 @@ Widget _buildReactionsIcon(String assetPath) {
width: 19.w,
);
}
class CycleTabBar extends StatelessWidget {
// Set the desired height
@override
Widget build(BuildContext context) {
return TabBar(
dividerColor: Color(0xFFFFFFFF).withOpacity(0.07),
labelStyle: TextStyle(
fontSize: 14.sp,
color: Color(0xFFFCFCFC),
fontWeight: FontWeight.w400,
fontFamily: 'Helvetica'),
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: const Color(0xFFD90B2E),
// labelColor: Colors.white,
indicatorWeight: 2.h,
dividerHeight: 2.h,
unselectedLabelColor: Color(0xFFFCFCFC),
overlayColor: MaterialStateProperty.all(const Color(0xFFD90B2E)),
tabs: const [
Tab(
text: 'Popular',
),
Tab(
text: 'Latest',
),
]);
}
}

View File

@@ -61,7 +61,7 @@ class _PostScreenState extends State<PostScreen> {
sizedBoxHeight(25.h),
text16w400_FCFCFC("Media"),
sizedBoxHeight(18.h),
commonGlassContainer(
commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 130.h,

View File

@@ -1,10 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.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';
import 'package:regroup/resources/routes/route_name.dart';
class CommunitySetting extends StatefulWidget {
const CommunitySetting({super.key});
@@ -30,24 +32,26 @@ class _CommunitySettingState extends State<CommunitySetting> {
const CommonBlurRight(),
Positioned.fill(
child: Column(children: [
sizedBoxHeight(40.h),
sizedBoxHeight(30.h),
GestureDetector(
onTap: () {
},
child: rowTile(text: 'Edit community info')),
sizedBoxHeight(20.h),
onTap: () {
Get.toNamed(RouteName.editcommunity);
},
child: rowTile(text: 'Edit community info')),
commonDivider(),
sizedBoxHeight(20.h),
rowTile(text: 'Manage members'),
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.managemembers);
},
child: rowTile(text: 'Manage members')),
commonDivider(),
sizedBoxHeight(20.h),
rowTile(text: 'Manage groups'),
sizedBoxHeight(20.h),
commonDivider(),
sizedBoxHeight(20.h),
rowTile(text: 'Manage tags'),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.managetags);
},
child: rowTile(text: 'Manage tags')),
sizedBoxHeight(20.h),
]))
]));
@@ -57,7 +61,7 @@ class _CommunitySettingState extends State<CommunitySetting> {
required String text,
}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
child: Row(children: [
text18w400_FCFCFC(text),
Spacer(),

View File

@@ -1,8 +1,13 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Common/CommonDropDown.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CustomNextButton.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/Utils/Common/CustomTextformfield.dart';
class EditCommunity extends StatefulWidget {
const EditCommunity({super.key});
@@ -12,6 +17,17 @@ class EditCommunity extends StatefulWidget {
}
class _EditCommunityState extends State<EditCommunity> {
TextEditingController communitynameController = TextEditingController();
TextEditingController descriptionController = TextEditingController();
@override
void initState() {
communitynameController.text = 'Active alliance network';
descriptionController.text =
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer .";
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -19,7 +35,7 @@ class _EditCommunityState extends State<EditCommunity> {
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Community settings",
titleTxt: "Edit community info",
),
body: Stack(children: [
const CommonBlurLeftRed(),
@@ -27,7 +43,157 @@ class _EditCommunityState extends State<EditCommunity> {
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: Column(children: [
sizedBoxHeight(40.h),]))]));
child: SingleChildScrollView(
child: Column(children: [
sizedBoxHeight(30.h),
Stack(
clipBehavior: Clip.none,
children: [
Container(
height: 100.h,
width: 100.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
border:
Border.all(color: Color(0xFF434A53), width: 0.5.w),
),
child: Center(
child: Image.asset('assets/images/png/Ellipse 37.png',
fit: BoxFit.cover),
),
),
Positioned(
right: -10,
bottom: 0,
child: Container(
height: 35.h,
width: 35.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
shape: BoxShape.circle,
border: Border.all(
color: Color(0xFFD90B2E), width: 0.5.w)),
child: Center(
child: Image.asset(
'assets/images/png/cameraicon.png',
height: 14.h,
width: 15.w,
),
),
))
],
),
sizedBoxHeight(25.h),
text16w400_white("Edit community profile picture"),
sizedBoxHeight(30.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC("Community banner image"),
sizedBoxHeight(16.h),
commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 150.h,
borderradius: 10.r,
customWidget: Padding(
padding: EdgeInsets.symmetric(vertical: 16.h),
child: Column(
children: [
Image.asset(
"assets/images/png/cameraicon2.png",
height: 36.h,
width: 36.w,
),
sizedBoxHeight(10.h),
text14w400white('Upload banner image'),
sizedBoxHeight(8.h),
SizedBox(
width: 270.w,
child: text10w400_whiteCenter(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s"),
),
],
),
),
),
sizedBoxHeight(16.w),
commonGlassContainer(
width: double.infinity,
height: 60.h,
borderradius: 10.r,
customWidget: Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(children: [
Container(
height: 40.h,
width: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.r)),
child: Image.asset(
"assets/images/png/img2.png",
fit: BoxFit.cover,
),
),
sizedBoxWidth(8.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
text14400white("group1.png"),
sizedBoxHeight(2.h),
text12w400_FCFCFC_blur("10 kb")
],
),
Spacer(),
Image.asset(
'assets/images/png/cancelicon.png',
height: 20.h,
width: 20.w,
)
]),
),
),
border: 1),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Community name"),
sizedBoxHeight(14.h),
CustomTextFormField(
textEditingController: communitynameController,
),
text16w400_FCFCFC("Group description"),
sizedBoxHeight(14.h),
CustomTextFormField2(
maxlines: 3,
textEditingController: descriptionController,
),
text16w400_FCFCFC("Type of community"),
sizedBoxHeight(14.h),
CommonDropdownradioBtn(
hint: '',
items: ["Public", "Private - Request to join"]),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Location*"),
sizedBoxHeight(14.h),
CommonDropdownradioBtn(
hint: '',
items: ["Public", "Private - Request to join"]),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Primary activity*"),
sizedBoxHeight(14.h),
CommonDropdownradioBtn(
hint: '', items: ["Sports", "Hobby"]),
sizedBoxHeight(50.h),
CustomButton(text: 'Save changes', onPressed: () {}),
sizedBoxHeight(50.h),
],
),
)
]),
))
]));
}
}
}

View File

@@ -0,0 +1,226 @@
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/CommonTabBar.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';
import 'package:regroup/resources/routes/route_name.dart';
class ManageTags extends StatefulWidget {
const ManageTags({super.key});
@override
State<ManageTags> createState() => _ManageTagsState();
}
class _ManageTagsState extends State<ManageTags> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Manage tags",
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: SingleChildScrollView(
child: Column(children: [
sizedBoxHeight(20.h),
DefaultTabController(
length: 2,
// initialIndex: selectedIndex.value,
child: Column(children: [
CommonTabBar(tabs: const [
Tab(
text: 'Tags',
),
Tab(
text: 'Tag requests',
),
]),
SizedBox(
height: 600.h,
child: TabBarView(
children: [
tagsTab(),
tagrequestsrTab(),
],
),
),
]))
])))
]),
floatingActionButtonLocation: CustomFloatingActionButtonLocation(60.0),
floatingActionButton: Container(
height: 55.h,
width: 55.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Color(0x40000000), // Hex color with 40% opacity
offset: Offset(0, 6),
blurRadius: 8,
),
],
),
child: FloatingActionButton(
onPressed: () {
Get.toNamed(RouteName.newtag);
},
backgroundColor: Color(0xFFD90B2E),
autofocus: true,
shape: CircleBorder(),
child: Image.asset(
"assets/images/png/iconamoon_edit-thin.png",
height: 30.h,
width: 30.w,
),
),
));
}
}
Widget tagsTab() {
List tags = ['Cycle', 'Sports', 'Fitness', 'Kayaking' 'Sports club'];
return Column(
children: [
sizedBoxHeight(25.h),
ListView.builder(
shrinkWrap: true,
itemCount: tags.length,
itemBuilder: (context, index) {
return Column(
children: [
rowTagsTile(text: tags[index]),
if (index != tags.length - 1) commonDivider()
],
);
},
)
],
);
}
Widget rowTagsTile({
required String text,
}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 18.h),
child: Row(children: [
text16w400_FCFCFC(text),
Spacer(),
Image.asset(
"assets/images/png/Group 1000004071.png",
width: 5.w,
height: 22.h,
)
]),
);
}
Widget tagrequestsrTab() {
List tagrequest = [
'Running',
'Fit fam friday',
];
return Column(
children: [
sizedBoxHeight(30.h),
ListView.builder(
shrinkWrap: true,
itemCount: tagrequest.length,
itemBuilder: (context, index) {
return Column(
children: [
rowTagRequestTile(title: tagrequest[index]),
sizedBoxHeight(20.h)
],
);
},
)
],
);
}
Widget rowTagRequestTile({
required String title,
}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: commonGlassContainer(
width: double.infinity,
height: 60.h,
borderradius: 10.r,
customWidget: Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(children: [
text16w700_FCFCFC(title),
Spacer(),
commonGlassContainer(
width: 35.w,
height: 35.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100,
customWidget: Center(
child: Icon(
Icons.clear,
size: 20,
color: Colors.white,
weight: 1,
)),
border: 0.5),
sizedBoxWidth(16.w),
Container(
height: 35.h,
width: 35.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
shape: BoxShape.circle,
),
child: Icon(
Icons.check,
size: 20,
color: Colors.white,
weight: 1,
),
)
]),
),
),
border: 1),
);
}
class CustomFloatingActionButtonLocation extends FloatingActionButtonLocation {
final double offset;
CustomFloatingActionButtonLocation(this.offset);
@override
Offset getOffset(ScaffoldPrelayoutGeometry scaffoldGeometry) {
// Calculate the position
double fabX = scaffoldGeometry.scaffoldSize.width -
scaffoldGeometry.floatingActionButtonSize.width -
16.0;
double fabY = scaffoldGeometry.scaffoldSize.height -
scaffoldGeometry.floatingActionButtonSize.height -
16.0 -
offset;
return Offset(fabX, fabY);
}
}

View File

@@ -0,0 +1,50 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Common/controller/CommonTextFormField.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CustomNextButton.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class NewTag extends StatefulWidget {
const NewTag({super.key});
@override
State<NewTag> createState() => _NewTagState();
}
class _NewTagState extends State<NewTag> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "New tag",
),
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(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
children: [
sizedBoxHeight(30.h),
text16w400_FCFCFC("Tag name"),
sizedBoxHeight(16.h),
CustomTextFormField(),
sizedBoxHeight(80.h),
CustomButton(text: "Add", onPressed: () {})
]),
)))
]));
}
}

View File

@@ -0,0 +1,127 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonGlassmorphism.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';
import 'package:regroup/resources/routes/route_name.dart';
class AnnouncementRequest extends StatefulWidget {
const AnnouncementRequest({super.key});
@override
State<AnnouncementRequest> createState() => _AnnouncementRequestState();
}
class _AnnouncementRequestState extends State<AnnouncementRequest> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Announcement requests",
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16),
child: Column(
children: [
sizedBoxHeight(25.h),
Announcementtile(
profileImg: "assets/images/png/Ellipse 43.png",
title: "title",
mainImg: "assets/images/png/Rectangle 22.png")
],
))))
]));
}
Widget Announcementtile({
required String profileImg,
required String title,
required String mainImg,
}) {
return commonGlassContainer(
width: double.infinity,
height: 400.h,
borderradius: 10.r,
border: 1,
customWidget: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Column(children: [
sizedBoxHeight(25.h),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CircleAvatar(
foregroundImage: AssetImage(profileImg),
radius: 25.r,
),
sizedBoxWidth(12.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(title),
sizedBoxHeight(5.h),
text12w400_FCFCFC_blur('Iron titans fitness crew'),
],
),
Spacer(),
text12w400_FCFCFC_blur("11-04-2024"),
],
),
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
child: Container(
height: 109.h,
width: double.infinity,
decoration:
BoxDecoration(borderRadius: BorderRadius.circular(5.r)),
child: Image.asset(
mainImg,
fit: BoxFit.cover,
),
)),
sizedBoxHeight(20.h),
text16w400_FCFCFC(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
sizedBoxHeight(20.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
commonGlassContainer(
width: 149.w,
height: 30.h,
opacity1: 0.05,
opacity2: 0.07,
borderradius: 30.r,
customWidget: Center(child: text12w400_FCFCFC("Decline")),
border: 1),
Container(
height: 30.h,
width: 150.h,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
borderRadius: BorderRadius.circular(30.r),
),
child: Center(child: text12w400_FCFCFC("Accept")),
)
],
)
]),
));
}
}

View File

@@ -0,0 +1,398 @@
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/CommonTabBar.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Common/controller/CommonTextFormField.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 ManageMembers extends StatefulWidget {
const ManageMembers({super.key});
@override
State<ManageMembers> createState() => _ManageMembersState();
}
class _ManageMembersState extends State<ManageMembers> {
List members = [
{"imagePath": "assets/images/png/cimg1.png", "title": "Ryan Dorwart"},
{"imagePath": "assets/images/png/cimg2.png", "title": "Ahmad Rhiel Madsen"},
{"imagePath": "assets/images/png/cimg3.png", "title": "Kaylynn Vaccaro"},
{"imagePath": "assets/images/png/cimg4.png", "title": "Kianna Donin"},
{"imagePath": "assets/images/png/cimg1.png", "title": "Maria Herwitz"},
{"imagePath": "assets/images/png/cimg4.png", "title": "Ahmad Rhiel Madsen"},
];
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Manage members",
customActionWidget: 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: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(20.h),
DefaultTabController(
length: 4,
child: Column(
children: [
CommonTabBar(tabs: const [
Tab(
text: 'Members',
),
Tab(
text: 'Admins',
),
Tab(
text: 'Requests',
),
Tab(
text: 'Invites',
),
]),
SizedBox(
height: 655.h,
child: TabBarView(
children: [
membersTab(),
AdminsTab(),
RequestsTab(),
InvitesTab(),
],
),
),
],
))
]))
]));
}
Widget membersTab() {
return SingleChildScrollView(
child: Column(children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Column(
children: [
sizedBoxHeight(25.h),
CustomTextFormField(
leadingIcon: Container(
height: 20.h,
width: 20.w,
child: Center(
child: Image.asset(
"assets/images/png/Frame 58575.png",
height: 20.h,
width: 20.w,
),
),
),
hintText: "Search members",
),
sizedBoxHeight(20.h),
Row(
children: [
SizedBox(
width: 300.w,
child: CustomTextFormField(
leadingIcon: Container(
height: 17.h,
width: 17.w,
child: Center(
child: Image.asset(
"assets/images/png/calender.png",
height: 17.h,
width: 17.w,
),
),
),
hintText: "Start date - End date",
)),
Spacer(),
commonGlassContainer(
width: 40.w,
height: 40.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(
child: Image.asset(
"assets/images/png/bi_filter.png",
height: 23.h,
width: 23.w,
),
),
border: 0.5)
],
),
],
),
),
sizedBoxHeight(30.h),
Column(
children: List.generate(members.length, (index) {
return Column(
children: [
rowTile(
imagePath: members[index]["imagePath"],
title: members[index]["title"]),
if (index != members.length - 1) commonDivider(),
],
);
}),
)
]),
);
}
Widget rowTile({
required String imagePath,
required String title,
}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
child: Row(
children: [
CircleAvatar(
backgroundImage: AssetImage(imagePath),
radius: 17.5.r,
),
sizedBoxWidth(10.w),
text16w400_FCFCFC(title),
sizedBoxWidth(8.w),
InkWell(
onTap: () {
dialogwidget();
},
child: Image.asset(
"assets/images/png/calender.png",
height: 15.h,
width: 15.w,
),
),
Spacer(),
Image.asset(
"assets/images/png/Group 1000004071.png",
height: 22.h,
width: 5.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"),
Text(
"title",
style: TextStyle(),
),
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")
],
),
],
),
),
),
],
),
));
}
Widget AdminsTab() {
return Column(
children: [],
);
}
Widget RequestsTab() {
return Column(
children: [],
);
}
Widget InvitesTab() {
return Column(
children: [],
);
}
Widget membersCard() {
return Column(
children: [
Row(
children: [],
)
],
);
}
}

View File

@@ -0,0 +1,64 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CustomNextButton.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 NewAnnouncement extends StatefulWidget {
const NewAnnouncement({super.key});
@override
State<NewAnnouncement> createState() => _NewAnnouncementState();
}
class _NewAnnouncementState extends State<NewAnnouncement> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "New announcement",
),
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(crossAxisAlignment: CrossAxisAlignment.start, children: [
sizedBoxHeight(20.h),
text16w400_FCFCFC("Description"),
sizedBoxHeight(30.h),
commonGlassContainer(
width: double.infinity,
height: 150.h,
borderradius: 10.r,
customWidget: Padding(
padding:
EdgeInsets.symmetric(horizontal: 12.w, vertical: 12.h),
child: text14w400_FCFCFCblur(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . .Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
),
border: 1),
sizedBoxHeight(80.h),
CustomButton(
text: "Post",
onPressed: () {
Get.toNamed(RouteName.announcement);
})
]),
)))
]));
}
}

View File

@@ -1,10 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonGlassmorphism.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';
import 'package:regroup/resources/routes/route_name.dart';
class Announcements extends StatefulWidget {
const Announcements({super.key});
@@ -41,41 +43,82 @@ class _AnnouncementsState extends State<Announcements> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Announcements",
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Announcements",
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(25.h),
Row(
children: [
Spacer(),
InkWell(
onTap: () {
Get.toNamed(RouteName.announcementrequest);
},
child: text16w700_FCFCFCUnderline(
"View announcement requests"),
),
],
),
sizedBoxHeight(30.h),
Column(
children: List.generate(announcement.length, (index) {
return Column(
children: [
announcementWidget(
imagepath: announcement[index]["imagepath"],
title: announcement[index]["title"],
date: announcement[index]["date"],
subtitle: announcement[index]["subtitle"]),
sizedBoxHeight(16.h)
],
);
}),
)
]))))
]),
floatingActionButton: Container(
height: 55.h,
width: 55.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Color(0x40000000), // Hex color with 40% opacity
offset: Offset(0, 6),
blurRadius: 8,
),
],
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(20.h),
Column(
children: List.generate(announcement.length, (index) {
return Column(
children: [
announcementWidget(
imagepath: announcement[index]["imagepath"],
title: announcement[index]["title"],
date: announcement[index]["date"],
subtitle: announcement[index]["subtitle"]),
sizedBoxHeight(16.h)
],
);
}),
)
]))))
]));
child: FloatingActionButton(
onPressed: () {
Get.toNamed(RouteName.newannouncement);
},
backgroundColor: Color(0xFFD90B2E),
autofocus: true,
shape: CircleBorder(),
child: Image.asset(
"assets/images/png/iconamoon_edit-thin.png",
height: 30.h,
width: 30.w,
),
),
),
);
}
}

View File

@@ -3,6 +3,7 @@ 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/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonTabBar.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
@@ -345,7 +346,14 @@ class _CommunityDetailsState extends State<CommunityDetails> {
// initialIndex: selectedIndex.value,
child: Column(
children: [
MyTabBar(),
CommonTabBar(tabs: const [
Tab(
text: 'Posts',
),
Tab(
text: 'Events',
),
]),
SizedBox(
height: 600.h,
child: TabBarView(
@@ -745,33 +753,3 @@ class _CommunityDetailsState extends State<CommunityDetails> {
));
}
}
class MyTabBar extends StatelessWidget {
// Set the desired height
@override
Widget build(BuildContext context) {
return TabBar(
dividerColor: Color(0xFFFFFFFF).withOpacity(0.07),
labelStyle: TextStyle(
fontSize: 14.sp,
color: Color(0xFFFCFCFC),
fontWeight: FontWeight.w400,
fontFamily: 'Helvetica'),
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: const Color(0xFFD90B2E),
// labelColor: Colors.white,
indicatorWeight: 2.h,
dividerHeight: 2.h,
unselectedLabelColor: Color(0xFFFCFCFC),
overlayColor: MaterialStateProperty.all(const Color(0xFFD90B2E)),
tabs: const [
Tab(
text: 'Posts',
),
Tab(
text: 'Events',
),
]);
}
}