Community Setting screen done

This commit is contained in:
cj201199
2024-05-31 20:07:06 +05:30
parent b9c3498554
commit 4184f1fa99
10 changed files with 236 additions and 47 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

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/CommonWidget.dart';
import 'package:regroup/Feed%20Module/Main_Screens/Community/Community.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
@@ -63,9 +64,29 @@ class _CycleScreenState extends State<CycleScreen> {
Widget CyclepopularTab() {
return SingleChildScrollView(
child: Column(children: [
normalcardtile(),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 52.png',
title: 'Ryan Dorwat',
mainImg: 'assets/images/png/img322.png',
containerTitle: [
'Football',
'Teams player',
'Events',
'Marathon',
'Events'
]),
sizedBoxHeight(30.h),
normalcardtile(),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 43.png',
title: 'Edward Hackket',
mainImg: 'assets/images/png/Rectangle 24.png',
containerTitle: [
'Cycle',
'Marathon',
'Events',
'Marathon',
'Events'
]),
]),
);
}
@@ -73,12 +94,27 @@ Widget CyclepopularTab() {
Widget CyclelatestTab() {
return SingleChildScrollView(
child: Column(children: [
normalcardtile(),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 43.png',
title: 'Edward Hackket',
mainImg: 'assets/images/png/Rectangle 24.png',
containerTitle: [
'Cycle',
'Marathon',
'Events',
'Marathon',
'Events'
]),
]),
);
}
Widget normalcardtile() {
Widget normalcardtile({
required String profileImg,
required String title,
required String mainImg,
required List<String> containerTitle,
}) {
var mainImage = 'assets/images/png/uiw_like-o.png'.obs;
void updateImage(String reaction) {
if (reaction == 'like') {
@@ -99,14 +135,14 @@ Widget normalcardtile() {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircleAvatar(
foregroundImage: AssetImage('assets/images/png/Ellipse 43.png'),
foregroundImage: AssetImage(profileImg),
radius: 25.r,
),
sizedBoxWidth(12.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC('Edward Hackket'),
text16w400_FCFCFC(title),
sizedBoxHeight(5.h),
Row(
children: [
@@ -217,7 +253,7 @@ Widget normalcardtile() {
],
child: Image.asset(
'assets/images/png/Group 1000004071.png',
width: 4.w,
width: 16.w,
height: 18.h,
),
),
@@ -230,7 +266,14 @@ Widget normalcardtile() {
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
child: Image.asset('assets/images/png/Rectangle 22.png')),
child: Container(
height: 163.h,
width: double.infinity,
child: Image.asset(
mainImg,
fit: BoxFit.cover,
),
)),
sizedBoxHeight(20.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
@@ -240,7 +283,7 @@ Widget normalcardtile() {
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: titles.length,
itemCount: containerTitle.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 12.w),
@@ -248,7 +291,7 @@ Widget normalcardtile() {
onTap: () {
Get.toNamed(RouteName.cyclescreen);
},
child: containertile(text: titles[index])),
child: containertile(text: containerTitle[index])),
);
},
),
@@ -257,6 +300,11 @@ Widget normalcardtile() {
text16w400_FCFCFC(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
Row(children: [
stackReaction(number: '20', containerImages: [
'assets/images/png/f7_hand-thumbsup.png',
'assets/images/png/heart 2.png',
'assets/images/png/party-popper 2.png'
]),
Spacer(),
commonGlassContainer(
border: 0.9,
@@ -354,11 +402,6 @@ Widget normalcardtile() {
'assets/images/png/party-popper 2.png'),
),
],
// placeholder: Reaction<String>(
// value: 'like',
// icon: _buildReactionsIcon(
// 'assets/images/png/f7_hand-thumbsup.png'),
// ),
selectedReaction: Reaction<String>(
value: 'like',
icon: _buildReactionsIcon(
@@ -388,16 +431,21 @@ Widget normalcardtile() {
text11w400_FCFCFC('Like')
],
),
Column(
children: [
Image.asset(
'assets/images/png/Vector.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Comment')
],
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
child: Column(
children: [
Image.asset(
'assets/images/png/Vector.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Comment')
],
),
),
Column(
children: [

View File

@@ -0,0 +1,72 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.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 CommunitySetting extends StatefulWidget {
const CommunitySetting({super.key});
@override
State<CommunitySetting> createState() => _CommunitySettingState();
}
class _CommunitySettingState extends State<CommunitySetting> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Community settings",
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: Column(children: [
sizedBoxHeight(40.h),
GestureDetector(
onTap: () {
},
child: rowTile(text: 'Edit community info')),
sizedBoxHeight(20.h),
commonDivider(),
sizedBoxHeight(20.h),
rowTile(text: 'Manage members'),
sizedBoxHeight(20.h),
commonDivider(),
sizedBoxHeight(20.h),
rowTile(text: 'Manage groups'),
sizedBoxHeight(20.h),
commonDivider(),
sizedBoxHeight(20.h),
rowTile(text: 'Manage tags'),
sizedBoxHeight(20.h),
]))
]));
}
Widget rowTile({
required String text,
}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(children: [
text18w400_FCFCFC(text),
Spacer(),
Icon(
Icons.arrow_forward_ios,
color: Colors.white,
size: 20,
)
]),
);
}
}

View File

@@ -0,0 +1,33 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
class EditCommunity extends StatefulWidget {
const EditCommunity({super.key});
@override
State<EditCommunity> createState() => _EditCommunityState();
}
class _EditCommunityState extends State<EditCommunity> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Community settings",
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: Column(children: [
sizedBoxHeight(40.h),]))]));
}
}

View File

@@ -29,7 +29,7 @@ class _CommunityDetailsState extends State<CommunityDetails> {
customActionWidget: PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 180.w),
offset: Offset(0, 20),
offset: Offset(0, 40),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
@@ -122,11 +122,31 @@ class _CommunityDetailsState extends State<CommunityDetails> {
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {
Get.toNamed(RouteName.communitysetting);
},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Edit community"),
Spacer(),
Image.asset(
"assets/images/png/setting2.png",
height: 18.h,
width: 18.w,
)
],
),
),
),
],
child: Image.asset(
'assets/images/png/Group 1000004071.png',
height: 22.h,
width: 4.w,
height: 20.h,
width: 10.w,
)),
),
body: Stack(children: [

View File

@@ -216,8 +216,7 @@ class _SideMenuState extends State<SideMenu> {
}) {
return ListTile(
leading: commonGlassContainer(
border: 0.9,
border: 0.9,
width: 29.w,
height: 29.h,
borderradius: 100,
@@ -229,24 +228,27 @@ class _SideMenuState extends State<SideMenu> {
),
)),
title: text14w400_FCFCFC(text),
trailing: Obx(
() {
return selectedIndices.contains(index)
? Image.asset(
"assets/images/png/sidemenu/f7_pin-fill.png",
width: 19,
height: 19,
)
: Image.asset(
"assets/images/png/sidemenu/f7_pin-fill (1).png",
width: 19,
height: 19,
);
trailing: InkWell(
onTap: () {
toggleSelectedIndex(index);
},
child: Obx(
() {
return selectedIndices.contains(index)
? Image.asset(
"assets/images/png/sidemenu/f7_pin-fill.png",
width: 19,
height: 19,
)
: Image.asset(
"assets/images/png/sidemenu/f7_pin-fill (1).png",
width: 19,
height: 19,
);
},
),
),
onTap: () {
toggleSelectedIndex(index);
},
onTap: () {},
);
}

View File

@@ -206,7 +206,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
fontFamily: 'Cambria',
),
debugShowCheckedModeBanner: false,
initialRoute: RouteName.splashScreen,
initialRoute: RouteName.mainscreen,
//initialRoute: RouteName.mainScreen,
getPages: AppRoutes.appRoutes(),

View File

@@ -21,6 +21,10 @@ class RouteName {
static const String communityInfo = '/communityInfo';
static const String announcement = '/announcement';
static const String group = '/group';
static const String communitysetting = '/communitysetting';
static const String editcommunity = '/editcommunity';

View File

@@ -1,4 +1,6 @@
import 'package:get/get_navigation/src/routes/get_route.dart';
import 'package:regroup/Feed%20Module/sidemenu/Community/Admin/PopupItem/Community%20settings/CommunitySetting.dart';
import 'package:regroup/Feed%20Module/sidemenu/Community/Admin/PopupItem/Community%20settings/EditCommunity/EditCommunity.dart';
import 'package:regroup/Login/View/loginscreen.dart';
@@ -109,6 +111,14 @@ class AppRoutes {
name: RouteName.group,
page: () => const Group(),
),
GetPage(
name: RouteName.communitysetting,
page: () => const CommunitySetting(),
),
GetPage(
name: RouteName.editcommunity,
page: () => const EditCommunity(),
),
];
}