Merge pull request 'Development' (#3) from Development into main

Reviewed-on: #3
This commit is contained in:
2024-06-19 14:33:38 +00:00
46 changed files with 6895 additions and 1702 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 MiB

View File

@@ -9,6 +9,7 @@ Widget commonGlassContainer({
required double border,
double opacity1 = 0.04,
double opacity2 = 0.05,
Color borderColor = const Color(0xff434A53),
}) {
return GlassmorphicContainer(
width: width,
@@ -32,50 +33,11 @@ Widget commonGlassContainer({
borderGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xff434A53),
Color(0xFF434A53),
],
colors: [
borderColor,
borderColor,
],
),
child: customWidget);
}
// Widget commonGlassContainerOpacity(
// {required double width,
// required double height,
// required double borderradius,
// required Widget customWidget,
// required double border,
// double opacity1,
// double opacity2,
// }) {
// return GlassmorphicContainer(
// width: width,
// height: height,
// borderRadius: borderradius,
// blur: 10,
// alignment: Alignment.topCenter,
// border: border,
// linearGradient: LinearGradient(
// begin: Alignment.topLeft,
// end: Alignment.bottomRight,
// colors: [
// Color(0xFFFFFFFF).withOpacity(opacity1),
// const Color(0xFFFFFFFF).withOpacity(opacity2),
// ],
// stops: const [
// 0.1,
// 1,
// ],
// ),
// borderGradient: LinearGradient(
// begin: Alignment.topLeft,
// end: Alignment.bottomRight,
// colors: [
// Color(0xff434A53),
// Color(0xFF434A53),
// ],
// ),
// child: customWidget);
// }

View File

@@ -6,6 +6,7 @@ import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
import 'package:path/path.dart' as path;
import 'package:intl/intl.dart';
// ignore: must_be_immutable
class TextInputField extends StatefulWidget {
@@ -141,6 +142,69 @@ String extractFileName(String filePath) {
return path.basename(filePath);
}
Future<void> datePicker(
BuildContext context, TextEditingController controller) async {
final ThemeData customTheme = Theme.of(context).copyWith(
colorScheme: const ColorScheme.light(
primary: Color(0xFFD90B2E),
surfaceTint: Color(0xFF222935),
surface: Color(0xFF222935),
onPrimary: Colors.white,
onSurface: Colors.white,
onSecondary: Colors.white),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: Color(0xFFD90B2E),
),
));
final DateTime? picked = await showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime(1900),
lastDate: DateTime(2100),
builder: (BuildContext context, Widget? child) {
return Theme(
data: customTheme,
child: child!,
);
},
);
if (picked != null) {
controller.text = DateFormat('dd-MM-yyyy').format(picked);
}
}
Future<TimeOfDay?> showCustomTimePicker(BuildContext context,
{TimeOfDay? initialTime}) {
final ThemeData customTheme2 = Theme.of(context).copyWith(
colorScheme: const ColorScheme.light(
primary: Color(0xFFD90B2E),
surfaceTint: Color(0xFF222935),
surface: Color(0xFF222935),
onPrimary: Colors.white,
onSurface: Colors.white,
),
textTheme: Theme.of(context).textTheme.copyWith(
headline6: TextStyle(color: Colors.blue), // Change the title color
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: Color(0xFFD90B2E),
),
));
return showTimePicker(
context: context,
initialTime: initialTime ?? TimeOfDay.now(),
builder: (BuildContext context, Widget? child) {
return Theme(
data: customTheme2,
child: child!,
);
},
);
}
Widget stackContainers({
required String number,
required List<String> containerImages,
@@ -171,7 +235,7 @@ Widget stackContainers({
),
),
Positioned(
left: 20,
left: 22.w,
child: SizedBox(
height: 30,
width: 50,
@@ -179,7 +243,7 @@ Widget stackContainers({
clipBehavior: Clip.none,
children: List.generate(containerImages.length, (index) {
return Positioned(
left: index * 22.0,
left: index * 22.w,
child: Container(
height: 30,
width: 30,

View File

@@ -5,6 +5,7 @@ import 'package:regroup/Feed%20Module/Main_Screens/CalenderTab/CalenderTab.dart'
import 'package:regroup/Feed%20Module/Main_Screens/Chats/View/chatsmainscreen.dart';
import 'package:regroup/Feed%20Module/Main_Screens/Community/Community.dart';
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/GroupTab.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/ProfileTab.dart';
class MainController extends GetxController {
@@ -12,7 +13,7 @@ class MainController extends GetxController {
var currentTab = [
const CommunityScreen(),
const CommunityScreen(),
const GroupTab(),
const CalenderTab(),
const ChatsMainScreen(),
const ProfileTab(),

View File

@@ -1,16 +1,21 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonButton.dart';
import 'package:regroup/Common/CommonDropDown.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/controller/CommonTextFormField.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CustomNextButton.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/ImageUpload.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';
import 'package:intl/intl.dart';
class AddEvent extends StatefulWidget {
const AddEvent({super.key});
@@ -21,6 +26,23 @@ class AddEvent extends StatefulWidget {
class _AddEventState extends State<AddEvent> {
RxBool isChecked = false.obs;
List<File?> bannerPath = [];
bool isbannerAdded = false;
TextEditingController dateController = TextEditingController();
TextEditingController dateController2 = TextEditingController();
TimeOfDay? starttime = TimeOfDay(hour: 15, minute: 0);
TimeOfDay? endtime = TimeOfDay(hour: 15, minute: 0);
String formatTimeOfDay(TimeOfDay time) {
final now = DateTime.now();
final dt = DateTime(now.year, now.month, now.day, time.hour, time.minute);
final format =
MediaQuery.of(context).alwaysUse24HourFormat ? 'HH:mm' : 'h:mm a';
return DateFormat(format).format(dt);
}
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -59,30 +81,75 @@ class _AddEventState extends State<AddEvent> {
),
hintText: "Tri-sport challenge",
),
sizedBoxHeight(20.h),
text16400white("Event image"),
sizedBoxHeight(20.h),
commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 130.h,
borderradius: 10.r,
customWidget: Padding(
padding: EdgeInsets.symmetric(vertical: 16.h),
child: Column(
children: [
Image.asset(
"assets/images/png/bi_download.png",
height: 36.h,
width: 36.w,
),
sizedBoxHeight(10.h),
text14w400white("Upload event image"),
sizedBoxHeight(8.h),
text8w400_8A8A8A(
"Allowed file extensions: jpg, png, gif Max file size: 10 MB"),
],
),
GestureDetector(
onTap: () {
ImageUploadBottomSheet().showModal(
context,
false,
(result) {
var file = File(result);
bannerPath.add(file);
isbannerAdded = true;
setState(() {});
},
);
},
child: commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 130.h,
borderradius: 10.r,
customWidget: bannerPath.isNotEmpty && isbannerAdded
? Stack(children: [
Image.file(
bannerPath[0]!,
fit: BoxFit.cover,
width: double.infinity,
),
Positioned(
right: 5,
bottom: 5,
child: GestureDetector(
onTap: () {
bannerPath.clear();
isbannerAdded = false;
setState(() {});
},
child: Container(
width: 27,
height: 27,
decoration: ShapeDecoration(
color: Color(0xFF7E7E7E),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(5)),
),
child: Icon(
Icons.delete_outline_outlined,
color: Colors.white,
))),
),
])
: Padding(
padding: EdgeInsets.symmetric(vertical: 16.h),
child: Column(
children: [
Image.asset(
"assets/images/png/bi_download.png",
height: 36.h,
width: 36.w,
),
sizedBoxHeight(10.h),
text14w400white("Upload event image"),
sizedBoxHeight(8.h),
text8w400_8A8A8A(
"Allowed file extensions: jpg, png, gif Max file size: 10 MB"),
],
),
),
),
),
sizedBoxHeight(20.h),
@@ -124,7 +191,7 @@ class _AddEventState extends State<AddEvent> {
),
),
border: 1),
sizedBoxHeight(16.h),
sizedBoxHeight(20.h),
text16400white("Type of event"),
sizedBoxHeight(14.h),
CommonDropdownBtn(
@@ -140,7 +207,7 @@ class _AddEventState extends State<AddEvent> {
),
),
),
sizedBoxHeight(16.h),
sizedBoxHeight(20.h),
text16400white("Sport"),
sizedBoxHeight(14.h),
CommonDropdownBtn(
@@ -156,61 +223,71 @@ class _AddEventState extends State<AddEvent> {
),
),
),
sizedBoxHeight(16.h),
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16400white("Start date"),
sizedBoxHeight(14.h),
commonGlassContainer(
width: 174.w,
height: 50.h,
borderradius: 30.r,
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
Image.asset(
"assets/images/png/calender.png",
height: 20.h,
width: 20.w,
),
sizedBoxWidth(8.w),
text16w400_white("1-4-2024")
]),
),
border: 1)
],
),
Spacer(),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16400white("End date"),
sizedBoxHeight(14.h),
commonGlassContainer(
width: 174.w,
height: 50.h,
borderradius: 30.r,
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
Image.asset(
"assets/images/png/calender.png",
height: 20.h,
width: 20.w,
),
sizedBoxWidth(8.w),
text16w400_white("4-4-2024")
]),
),
border: 1)
],
),
],
),
sizedBoxHeight(20.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16400white("Start date "),
sizedBoxHeight(10.h),
GestureDetector(
onTap: () =>
datePicker(context, dateController),
child: AbsorbPointer(
child: CustomTextFormField(
textEditingController: dateController,
hintText: "1-4-2024",
leadingIcon: Container(
height: 20.h,
width: 20.w,
child: Center(
child: Image.asset(
"assets/images/png/calender.png",
height: 20.h,
width: 20.w,
),
),
),
),
),
)
],
),
),
sizedBoxWidth(10.h),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16400white("End date"),
sizedBoxHeight(10.h),
GestureDetector(
onTap: () =>
datePicker(context, dateController2),
child: AbsorbPointer(
child: CustomTextFormField(
textEditingController: dateController2,
hintText: "4-4-2024",
leadingIcon: Container(
height: 20.h,
width: 20.w,
child: Center(
child: Image.asset(
"assets/images/png/calender.png",
height: 20.h,
width: 20.w,
),
),
),
),
),
),
]))
]),
Row(
children: [
Column(
@@ -218,23 +295,36 @@ class _AddEventState extends State<AddEvent> {
children: [
text16400white("Start time"),
sizedBoxHeight(14.h),
commonGlassContainer(
width: 174.w,
height: 50.h,
borderradius: 30.r,
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
Image.asset(
"assets/images/png/clock.png",
height: 20.h,
width: 20.w,
),
sizedBoxWidth(8.w),
text16w400_white("3:00 pm")
]),
),
border: 1)
GestureDetector(
onTap: () async {
final TimeOfDay? pickedTime =
await showCustomTimePicker(context,
initialTime: starttime);
if (pickedTime != null) {
setState(() {
starttime = pickedTime;
});
}
},
child: commonGlassContainer(
width: 174.w,
height: 50.h,
borderradius: 30.r,
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
Image.asset(
"assets/images/png/clock.png",
height: 20.h,
width: 20.w,
),
sizedBoxWidth(8.w),
text16w400_white(
formatTimeOfDay(starttime!)),
]),
),
border: 1),
)
],
),
Spacer(),
@@ -243,23 +333,36 @@ class _AddEventState extends State<AddEvent> {
children: [
text16400white("End time"),
sizedBoxHeight(14.h),
commonGlassContainer(
width: 174.w,
height: 50.h,
borderradius: 30.r,
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
Image.asset(
"assets/images/png/clock.png",
height: 20.h,
width: 20.w,
),
sizedBoxWidth(8.w),
text16w400_white("5:00 pm")
]),
),
border: 1)
GestureDetector(
onTap: () async {
final TimeOfDay? pickedTime =
await showCustomTimePicker(context,
initialTime: endtime);
if (pickedTime != null) {
setState(() {
endtime = pickedTime;
});
}
},
child: commonGlassContainer(
width: 174.w,
height: 50.h,
borderradius: 30.r,
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
Image.asset(
"assets/images/png/clock.png",
height: 20.h,
width: 20.w,
),
sizedBoxWidth(8.w),
text16w400_white(
formatTimeOfDay(endtime!)),
]),
),
border: 1),
)
],
),
],
@@ -293,7 +396,7 @@ class _AddEventState extends State<AddEvent> {
text14w400_FCFCFC("Repeat event")
],
),
sizedBoxHeight(16.h),
sizedBoxHeight(20.h),
text16400white("Post in"),
sizedBoxHeight(14.h),
CommonDropdownBtn(
@@ -307,7 +410,7 @@ class _AddEventState extends State<AddEvent> {
),
),
),
sizedBoxHeight(16.h),
sizedBoxHeight(20.h),
text16400white("Add Users"),
sizedBoxHeight(14.h),
CustomTextFormField(
@@ -359,9 +462,8 @@ class _AddEventState extends State<AddEvent> {
),
hintText: "Elm street, London, United kingdom",
),
sizedBoxHeight(25.h),
text16400white("Reminder"),
sizedBoxHeight(22.h),
sizedBoxHeight(14.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [

View File

@@ -121,29 +121,31 @@ class _CalenderTabState extends State<CalenderTab> {
Padding(
padding: const EdgeInsets.symmetric(vertical: 16),
child: Column(children: [
DefaultTabController(
length: 2,
// initialIndex: selectedIndex.value,
child: Column(
children: [
CommonTabBar(tabs: const [
Tab(
text: 'My sessions',
Expanded(
child: DefaultTabController(
length: 2,
// initialIndex: selectedIndex.value,
child: Column(
children: [
CommonTabBar(tabs: const [
Tab(
text: 'My sessions',
),
Tab(
text: 'Community session',
),
]),
Expanded(
child: TabBarView(
children: [
MySessionsTab(),
ComSessionTab(),
],
),
),
Tab(
text: 'Community session',
),
]),
SizedBox(
height: 600.h,
child: TabBarView(
children: [
MySessionsTab(),
ComSessionTab(),
],
),
),
],
sizedBoxHeight(90.h),
],
),
),
),
]))

View File

@@ -90,33 +90,35 @@ class _CommunityScreenState extends State<CommunityScreen> {
Padding(
padding: const EdgeInsets.symmetric(vertical: 16),
child: Column(children: [
DefaultTabController(
length: 3,
// initialIndex: selectedIndex.value,
child: Column(
children: [
CommonTabBar(tabs: const [
Tab(
text: 'Feed',
Expanded(
child: DefaultTabController(
length: 3,
// initialIndex: selectedIndex.value,
child: Column(
children: [
CommonTabBar(tabs: const [
Tab(
text: 'Feed',
),
Tab(
text: 'Popular',
),
Tab(
text: 'Latest',
),
]),
Expanded(
child: TabBarView(
children: [
feedTab(),
popularTab(),
latestTab(),
],
),
),
Tab(
text: 'Popular',
),
Tab(
text: 'Latest',
),
]),
SizedBox(
height: 600.h,
child: TabBarView(
children: [
feedTab(),
popularTab(),
latestTab(),
],
),
),
],
sizedBoxHeight(90.h)
],
),
),
),
]))
@@ -157,22 +159,43 @@ class _CommunityScreenState extends State<CommunityScreen> {
Widget feedTab() {
return SingleChildScrollView(
child: Column(
child: Column(children: [
sizedBoxHeight(16.h),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 43.png',
title: 'Edward Hackket',
mainImg: 'assets/images/png/Rectangle 24.png',
containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']),
sizedBoxHeight(20.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: double.infinity,
height: 47.h,
color: Color(0xFFD90B2E),
child: Padding(
padding: EdgeInsets.only(left: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
text16w400_FCFCFC('#Announcement'),
],
),
),
),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 43.png',
title: 'Edward Hackket',
mainImg: 'assets/images/png/Rectangle 24.png',
profileImg: 'assets/images/png/Ellipse 48.png',
title: 'Jocelyn Dokidis',
mainImg: 'assets/images/png/Rectangle 46.png',
containerTitle: [
'Cycle',
'Marathon',
'Race',
'Swimming',
'Events',
'Marathon',
'Events'
]),
sizedBoxHeight(20.h),
tagCardTile(),
sizedBoxHeight(20.h),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 52.png',
title: 'Ryan Dorwat',
@@ -186,7 +209,7 @@ Widget feedTab() {
])
],
),
);
]));
}
Widget normalcardtile({
@@ -206,252 +229,239 @@ Widget normalcardtile({
}
}
return Column(
children: [
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircleAvatar(
foregroundImage: AssetImage(profileImg),
radius: 25.r,
),
sizedBoxWidth(12.w),
Column(
return commonGlassContainer(
width: double.infinity,
height: 570.h,
border: 0,
borderradius: 1,
customWidget: Column(
children: [
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(title),
sizedBoxHeight(5.h),
Row(
CircleAvatar(
foregroundImage: AssetImage(profileImg),
radius: 25.r,
),
sizedBoxWidth(12.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
'assets/images/png/community 1 (traced).png',
height: 14.w,
width: 14.w,
),
sizedBoxWidth(7.w),
text12w400_FCFCFC('Active alliance network'),
sizedBoxWidth(7.w),
Icon(
Icons.circle,
color: Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
text12w400_FCFCFC('1 Hour ago'),
text16w400_FCFCFC(title),
sizedBoxHeight(5.h),
Row(
children: [
Image.asset(
'assets/images/png/community 1 (traced).png',
height: 14.w,
width: 14.w,
),
sizedBoxWidth(7.w),
text12w400_FCFCFC('Active alliance network'),
sizedBoxWidth(7.w),
Icon(
Icons.circle,
color: Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
text12w400_FCFCFC('1 Hour ago'),
],
)
],
)
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 176.w),
offset: Offset(0, 50),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Report Post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/Vector (5).png",
height: 15.h,
width: 15.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Share post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Pin',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
width: 25.w,
)
],
),
),
),
],
child: Image.asset(
'assets/images/png/Group 1000004071.png',
width: 16.w,
height: 18.h,
),
),
sizedBoxWidth(5.w)
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 176.w),
offset: Offset(0, 50),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Report Post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/Vector (5).png",
height: 15.h,
width: 15.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Share post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Pin',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
width: 25.w,
)
],
),
),
),
],
child: Image.asset(
'assets/images/png/Group 1000004071.png',
width: 16.w,
height: 18.h,
),
),
sizedBoxWidth(5.w)
],
),
),
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
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),
child: Column(children: [
SizedBox(
height: 30.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: containerTitle.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.cyclescreen);
},
child: containertile(text: containerTitle[index])),
);
},
),
),
sizedBoxHeight(20.h),
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.43,
width: 30.w,
height: 30.h,
opacity1: 0.05,
opacity2: 0.06,
borderradius: 100,
customWidget: Center(
child: ReactionButton<String>(
itemSize: Size.fromHeight(20),
onReactionChanged: (Reaction<String>? reaction) {
debugPrint('Selected value: ${reaction?.value}');
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
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),
child: Column(children: [
SizedBox(
height: 30.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: containerTitle.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.cyclescreen);
},
child: containertile(text: containerTitle[index])),
);
},
reactions: <Reaction<String>>[
Reaction<String>(
value: 'message',
icon: Image.asset(
'assets/images/png/Vector.png',
height: 13.h,
width: 13.w,
),
),
],
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('20'),
sizedBoxWidth(20.w),
commonGlassContainer(
border: 0.43,
width: 30.w,
height: 30.h,
borderradius: 100,
opacity1: 0.05,
opacity2: 0.06,
customWidget: Center(
child: ReactionButton<String>(
itemSize: Size.fromHeight(20),
onReactionChanged: (Reaction<String>? reaction) {
debugPrint('Selected value: ${reaction?.value}');
sizedBoxHeight(20.h),
text16w400_FCFCFC(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
Row(children: [
InkWell(
onTap: () {
Get.toNamed(RouteName.reactionview);
},
reactions: <Reaction<String>>[
Reaction<String>(
value: 'message',
icon: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
],
child: stackReaction(number: '20', containerImages: [
'assets/images/png/f7_hand-thumbsup.png',
'assets/images/png/heart 2.png',
'assets/images/png/party-popper 2.png'
]),
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('10'),
]),
sizedBoxHeight(30.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Column(
Spacer(),
commonGlassContainer(
border: 0.43,
width: 30.w,
height: 30.h,
opacity1: 0.05,
opacity2: 0.06,
borderradius: 100,
customWidget: Center(
child: Image.asset(
'assets/images/png/Frame 1000004088.png',
height: 13.h,
width: 13.w,
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('20'),
sizedBoxWidth(20.w),
commonGlassContainer(
border: 0.43,
width: 30.w,
height: 30.h,
borderradius: 100,
opacity1: 0.05,
opacity2: 0.06,
customWidget: Center(
child: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('10'),
]),
sizedBoxHeight(12.h),
commonDivider(),
sizedBoxHeight(12.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
Column(
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -492,62 +502,63 @@ Widget normalcardtile({
'assets/images/png/f7_hand-thumbsup.png'),
),
boxColor: Colors.white,
boxElevation: 5,
boxRadius: 50,
boxElevation: 9,
boxRadius: 30,
itemsSpacing: 8,
itemScale: 0.3,
itemSize: Size(40.0, 40.0),
boxPadding: EdgeInsets.all(4),
itemScale: 0.4,
itemSize: Size(45, 45),
boxPadding: EdgeInsets.all(8),
boxAnimationDuration: Duration(milliseconds: 200),
itemAnimationDuration:
Duration(milliseconds: 100),
hoverDuration: Duration(milliseconds: 400),
toggle: false,
direction: ReactionsBoxAlignment.ltr,
Duration(milliseconds: 500),
hoverDuration: Duration(milliseconds: 700),
// toggle: false,
child: _buildReactionsIcon(mainImage.value),
);
})
],
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Like')
],
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Like')
],
),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
child: Column(
children: [
Image.asset(
'assets/images/png/Vector.png',
height: 19.h,
width: 19.w,
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
child: Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004088.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Comment')
],
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Comment')
],
),
),
Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004089.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Save')
Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004089.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Save')
],
)
],
)
],
)
]),
),
],
);
),
sizedBoxHeight(12.h),
commonDivider(),
sizedBoxHeight(12.h),
]),
),
],
));
}
Widget _buildReactionsPreviewIcon(String assetPath) {
@@ -569,41 +580,13 @@ Widget _buildReactionsIcon(String assetPath) {
);
}
Widget tagCardTile() {
return commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 580.h,
borderradius: 1,
customWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(16.h),
Padding(
padding: EdgeInsets.only(left: 16.w),
child: text16w400_FCFCFC('#Announcement'),
),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 48.png',
title: 'Jocelyn Dokidis',
mainImg: 'assets/images/png/Rectangle 46.png',
containerTitle: [
'Race',
'Swimming',
'Events',
'Marathon',
'Events'
]),
],
));
}
Widget containertile({required String text}) {
return commonGlassContainer(
border: 0.9,
border: 1,
width: 100.w,
height: 30.h,
borderradius: 30.r,
borderColor: Color(0xFFD90B2E),
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Center(child: text14w400_FCFCFC(text)),
@@ -614,40 +597,86 @@ Widget popularTab() {
return SingleChildScrollView(
child: Column(
children: [
Column(
children: [
normalcardtile(
profileImg: 'assets/images/png/Ellipse 43.png',
title: 'Edward Hackket',
mainImg: 'assets/images/png/Rectangle 24.png',
containerTitle: [
'Race',
'Swimming',
'Events',
'Marathon',
'Events'
]),
sizedBoxHeight(20.h),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 52.png',
title: 'Edward Hackket',
mainImg: 'assets/images/png/Rectangle 25.png',
containerTitle: [
'Football',
'Teams player',
'Events',
'Marathon',
'Events'
])
],
),
sizedBoxHeight(20.h),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 43.png',
title: 'Edward Hackket',
mainImg: 'assets/images/png/Rectangle 24.png',
containerTitle: [
'Race',
'Swimming',
'Events',
'Marathon',
'Events'
]),
sizedBoxHeight(20.h),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 52.png',
title: 'Edward Hackket',
mainImg: 'assets/images/png/Rectangle 25.png',
containerTitle: [
'Football',
'Teams player',
'Events',
'Marathon',
'Events'
])
],
),
);
}
Widget latestTab() {
return Column(
children: [],
);
return SingleChildScrollView(
child: Column(children: [
sizedBoxHeight(16.h),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 43.png',
title: 'Edward Hackket',
mainImg: 'assets/images/png/Rectangle 24.png',
containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']),
sizedBoxHeight(20.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: double.infinity,
height: 47.h,
color: Color(0xFFD90B2E),
child: Padding(
padding: EdgeInsets.only(left: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
text16w400_FCFCFC('#Announcement'),
],
),
),
),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 48.png',
title: 'Jocelyn Dokidis',
mainImg: 'assets/images/png/Rectangle 46.png',
containerTitle: [
'Race',
'Swimming',
'Events',
'Marathon',
'Events'
]),
sizedBoxHeight(20.h),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 52.png',
title: 'Ryan Dorwat',
mainImg: 'assets/images/png/Rectangle 25.png',
containerTitle: [
'Football',
'Teams player',
'Events',
'Marathon',
'Events'
])
],
),
]));
}

View File

@@ -72,6 +72,7 @@ class _CycleScreenState extends State<CycleScreen> {
Widget CyclepopularTab() {
return SingleChildScrollView(
child: Column(children: [
sizedBoxHeight(20.h),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 52.png',
title: 'Ryan Dorwat',
@@ -102,6 +103,7 @@ Widget CyclepopularTab() {
Widget CyclelatestTab() {
return SingleChildScrollView(
child: Column(children: [
sizedBoxHeight(20.h),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 43.png',
title: 'Edward Hackket',
@@ -134,248 +136,239 @@ Widget normalcardtile({
}
}
return Column(
children: [
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircleAvatar(
foregroundImage: AssetImage(profileImg),
radius: 25.r,
),
sizedBoxWidth(12.w),
Column(
return commonGlassContainer(
width: double.infinity,
height: 570.h,
border: 0,
borderradius: 1,
customWidget: Column(
children: [
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(title),
sizedBoxHeight(5.h),
Row(
CircleAvatar(
foregroundImage: AssetImage(profileImg),
radius: 25.r,
),
sizedBoxWidth(12.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
'assets/images/png/community 1 (traced).png',
height: 14.w,
width: 14.w,
),
sizedBoxWidth(7.w),
text12w400_FCFCFC('Active alliance network'),
sizedBoxWidth(7.w),
Icon(
Icons.circle,
color: Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
text12w400_FCFCFC('1 Hour ago'),
text16w400_FCFCFC(title),
sizedBoxHeight(5.h),
Row(
children: [
Image.asset(
'assets/images/png/community 1 (traced).png',
height: 14.w,
width: 14.w,
),
sizedBoxWidth(7.w),
text12w400_FCFCFC('Active alliance network'),
sizedBoxWidth(7.w),
Icon(
Icons.circle,
color: Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
text12w400_FCFCFC('1 Hour ago'),
],
)
],
)
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 176.w),
offset: Offset(0, 50),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Report Post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/Vector (5).png",
height: 15.h,
width: 15.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Share post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Pin',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
width: 25.w,
)
],
),
),
),
],
child: Image.asset(
'assets/images/png/Group 1000004071.png',
width: 16.w,
height: 18.h,
),
),
sizedBoxWidth(5.w)
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 176.w),
offset: Offset(0, 50),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Report Post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/Vector (5).png",
height: 15.h,
width: 15.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Share post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Pin',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
width: 25.w,
)
],
),
),
),
],
child: Image.asset(
'assets/images/png/Group 1000004071.png',
width: 16.w,
height: 18.h,
),
),
sizedBoxWidth(5.w)
],
),
),
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
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),
child: Column(children: [
SizedBox(
height: 30.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: containerTitle.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.cyclescreen);
},
child: containertile(text: containerTitle[index])),
);
},
),
),
sizedBoxHeight(20.h),
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,
width: 30.w,
height: 30.h,
borderradius: 100,
customWidget: Center(
child: ReactionButton<String>(
itemSize: Size.fromHeight(20),
onReactionChanged: (Reaction<String>? reaction) {
debugPrint('Selected value: ${reaction?.value}');
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
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),
child: Column(children: [
SizedBox(
height: 30.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: containerTitle.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.cyclescreen);
},
child: containertile(text: containerTitle[index])),
);
},
reactions: <Reaction<String>>[
Reaction<String>(
value: 'message',
icon: Image.asset(
'assets/images/png/Vector.png',
height: 13.h,
width: 13.w,
),
),
],
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('20'),
sizedBoxWidth(20.w),
commonGlassContainer(
border: 0.9,
width: 30.w,
height: 30.h,
borderradius: 100,
customWidget: Center(
child: ReactionButton<String>(
itemSize: Size.fromHeight(20),
onReactionChanged: (Reaction<String>? reaction) {
debugPrint('Selected value: ${reaction?.value}');
sizedBoxHeight(20.h),
text16w400_FCFCFC(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
Row(children: [
InkWell(
onTap: () {
Get.toNamed(RouteName.reactionview);
},
reactions: <Reaction<String>>[
Reaction<String>(
value: 'message',
icon: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
],
child: stackReaction(number: '20', containerImages: [
'assets/images/png/f7_hand-thumbsup.png',
'assets/images/png/heart 2.png',
'assets/images/png/party-popper 2.png'
]),
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('10'),
]),
sizedBoxHeight(30.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Column(
Spacer(),
commonGlassContainer(
border: 0.43,
width: 30.w,
height: 30.h,
opacity1: 0.05,
opacity2: 0.06,
borderradius: 100,
customWidget: Center(
child: Image.asset(
'assets/images/png/Frame 1000004088.png',
height: 13.h,
width: 13.w,
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('20'),
sizedBoxWidth(20.w),
commonGlassContainer(
border: 0.43,
width: 30.w,
height: 30.h,
borderradius: 100,
opacity1: 0.05,
opacity2: 0.06,
customWidget: Center(
child: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('10'),
]),
sizedBoxHeight(12.h),
commonDivider(),
sizedBoxHeight(12.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
Column(
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -415,63 +408,64 @@ Widget normalcardtile({
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png'),
),
boxColor: Colors.white,
boxElevation: 5,
boxRadius: 50,
boxColor: Colors.white,
boxElevation: 9,
boxRadius: 30,
itemsSpacing: 8,
itemScale: 0.3,
itemSize: Size(40.0, 40.0),
boxPadding: EdgeInsets.all(4),
itemScale: 0.4,
itemSize: Size(45, 45),
boxPadding: EdgeInsets.all(8),
boxAnimationDuration: Duration(milliseconds: 200),
itemAnimationDuration:
Duration(milliseconds: 100),
hoverDuration: Duration(milliseconds: 400),
toggle: false,
direction: ReactionsBoxAlignment.ltr,
Duration(milliseconds: 500),
hoverDuration: Duration(milliseconds: 700),
// toggle: false,
child: _buildReactionsIcon(mainImage.value),
);
})
],
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Like')
],
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Like')
],
),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
child: Column(
children: [
Image.asset(
'assets/images/png/Vector.png',
height: 19.h,
width: 19.w,
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
child: Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004088.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Comment')
],
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Comment')
],
),
),
Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004089.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Save')
Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004089.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Save')
],
)
],
)
],
)
]),
),
],
);
),
sizedBoxHeight(12.h),
commonDivider(),
sizedBoxHeight(12.h),
]),
),
],
));
}
Widget _buildReactionsPreviewIcon(String assetPath) {

View File

@@ -48,9 +48,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
'Marathon',
'Events'
]),
sizedBoxHeight(30.h),
commonDivider(),
sizedBoxHeight(30.h),
sizedBoxHeight(35.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
@@ -118,329 +116,335 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
}
}
return Column(
children: [
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircleAvatar(
foregroundImage: AssetImage(profileImg),
radius: 25.r,
),
sizedBoxWidth(12.w),
Column(
return commonGlassContainer(
width: double.infinity,
height: 570.h,
border: 0,
borderradius: 0,
customWidget: Column(
children: [
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(title),
sizedBoxHeight(5.h),
Row(
children: [
Image.asset(
'assets/images/png/community 1 (traced).png',
height: 14.w,
width: 14.w,
),
sizedBoxWidth(7.w),
text12w400_FCFCFC('Active alliance network'),
sizedBoxWidth(7.w),
Icon(
Icons.circle,
color: Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
text12w400_FCFCFC('1 Hour ago'),
],
)
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 176.w),
offset: Offset(0, 50),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Report Post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/Vector (5).png",
height: 15.h,
width: 15.w,
)
],
),
),
CircleAvatar(
foregroundImage: AssetImage(profileImg),
radius: 25.r,
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Share post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
sizedBoxWidth(12.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
text16w400_FCFCFC(title),
Spacer(),
commonGlassContainer(
width: 72.w,
height: 26.h,
borderradius: 5.r,
borderColor: Color(0xFFD90B2E),
customWidget:
Center(child: text14400white("Follow")),
border: 1),
sizedBoxWidth(6.w),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints:
BoxConstraints.tightFor(width: 176.w),
offset: Offset(0, 50),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) =>
<PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Report Post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/Vector (5).png",
height: 15.h,
width: 15.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Share post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Pin',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
width: 25.w,
)
],
),
),
),
],
child: Image.asset(
'assets/images/png/Group 1000004071.png',
width: 16.w,
height: 18.h,
),
),
),
Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Pin',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
],
),
sizedBoxHeight(5.h),
Row(
children: [
Image.asset(
'assets/images/png/community 1 (traced).png',
height: 14.w,
width: 14.w,
),
),
Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
width: 25.w,
)
],
),
sizedBoxWidth(7.w),
text12w400_FCFCFC('Active alliance network'),
sizedBoxWidth(7.w),
Icon(
Icons.circle,
color: Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
text12w400_FCFCFC('1 Hour ago'),
],
)
],
),
),
],
child: Image.asset(
'assets/images/png/Group 1000004071.png',
width: 16.w,
height: 18.h,
),
),
sizedBoxWidth(5.w)
],
),
),
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
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),
child: Column(children: [
SizedBox(
height: 30.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: containerTitle.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.cyclescreen);
},
child: containertile(text: containerTitle[index])),
);
},
),
),
sizedBoxHeight(20.h),
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,
width: 30.w,
height: 30.h,
borderradius: 100,
customWidget: Center(
child: ReactionButton<String>(
itemSize: Size.fromHeight(20),
onReactionChanged: (Reaction<String>? reaction) {
debugPrint('Selected value: ${reaction?.value}');
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
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),
child: Column(children: [
SizedBox(
height: 30.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: containerTitle.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.cyclescreen);
},
child: containertile(text: containerTitle[index])),
);
},
reactions: <Reaction<String>>[
Reaction<String>(
value: 'message',
icon: Image.asset(
'assets/images/png/Vector.png',
height: 13.h,
width: 13.w,
),
),
],
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('20'),
sizedBoxWidth(20.w),
commonGlassContainer(
border: 0.9,
width: 30.w,
height: 30.h,
borderradius: 100,
customWidget: Center(
child: ReactionButton<String>(
itemSize: Size.fromHeight(20),
onReactionChanged: (Reaction<String>? reaction) {
debugPrint('Selected value: ${reaction?.value}');
},
reactions: <Reaction<String>>[
Reaction<String>(
value: 'message',
icon: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
sizedBoxHeight(20.h),
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,
width: 30.w,
height: 30.h,
borderradius: 100,
customWidget: Center(
child: Image.asset(
'assets/images/png/Frame 1000004088.png',
height: 13.h,
width: 13.w,
),
],
),
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('10'),
]),
sizedBoxHeight(30.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Column(
sizedBoxWidth(12.w),
text14w400_FCFCFC('20'),
sizedBoxWidth(20.w),
commonGlassContainer(
border: 0.9,
width: 30.w,
height: 30.h,
borderradius: 100,
customWidget: Center(
child: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('10'),
]),
sizedBoxHeight(12.h),
commonDivider(),
sizedBoxHeight(12.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
Column(
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Obx(() {
return ReactionButton<String>(
onReactionChanged: (reaction) {
updateImage(reaction?.value ?? 'like');
debugPrint(
'Selected value: ${reaction?.value}');
},
reactions: <Reaction<String>?>[
Reaction<String>(
value: 'like',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/f7_hand-thumbsup.png'),
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png'),
),
Reaction<String>(
value: 'heart',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/heart 2.png'),
icon: _buildReactionsIcon(
'assets/images/png/heart 2.png'),
),
Reaction<String>(
value: 'party',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/party-popper 2.png'),
icon: _buildReactionsIcon(
'assets/images/png/party-popper 2.png'),
),
],
selectedReaction: Reaction<String>(
value: 'like',
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png'),
),
boxColor: Colors.white,
boxElevation: 5,
boxRadius: 50,
itemsSpacing: 8,
itemScale: 0.3,
itemSize: Size(40.0, 40.0),
boxPadding: EdgeInsets.all(4),
boxAnimationDuration:
Duration(milliseconds: 200),
itemAnimationDuration:
Duration(milliseconds: 100),
hoverDuration: Duration(milliseconds: 400),
toggle: false,
direction: ReactionsBoxAlignment.ltr,
child: _buildReactionsIcon(mainImage.value),
);
})
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Obx(() {
return ReactionButton<String>(
onReactionChanged: (reaction) {
updateImage(reaction?.value ?? 'like');
debugPrint(
'Selected value: ${reaction?.value}');
},
reactions: <Reaction<String>?>[
Reaction<String>(
value: 'like',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/f7_hand-thumbsup.png'),
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png'),
),
Reaction<String>(
value: 'heart',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/heart 2.png'),
icon: _buildReactionsIcon(
'assets/images/png/heart 2.png'),
),
Reaction<String>(
value: 'party',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/party-popper 2.png'),
icon: _buildReactionsIcon(
'assets/images/png/party-popper 2.png'),
),
],
selectedReaction: Reaction<String>(
value: 'like',
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png'),
),
boxColor: Colors.white,
boxElevation: 9,
boxRadius: 30,
itemsSpacing: 8,
itemScale: 0.4,
itemSize: Size(45, 45),
boxPadding: EdgeInsets.all(8),
boxAnimationDuration: Duration(milliseconds: 200),
itemAnimationDuration:
Duration(milliseconds: 500),
hoverDuration: Duration(milliseconds: 700),
// toggle: false,
child: _buildReactionsIcon(mainImage.value),
);
})
],
),
],
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Like')
],
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Like')
Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004089.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Save')
],
)
],
),
Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004089.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Save')
],
)
],
)
]),
),
],
);
sizedBoxHeight(12.h),
commonDivider(),
sizedBoxHeight(12.h),
]),
),
],
));
}
Widget containertile({required String text}) {
@@ -449,6 +453,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
width: 100.w,
height: 30.h,
borderradius: 30.r,
borderColor: Color(0xFFD90B2E),
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Center(child: text14w400_FCFCFC(text)),

View File

@@ -0,0 +1,315 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.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';
class ReactionView extends StatefulWidget {
const ReactionView({super.key});
@override
State<ReactionView> createState() => _ReactionViewState();
}
class _ReactionViewState extends State<ReactionView> {
List allTabData = [
{
"imagePath": "assets/images/png/cimg1.png",
"reactionimg": "assets/images/png/f7_hand-thumbsup.png",
"title": "Edward Hackket"
},
{
"imagePath": "assets/images/png/cimg2.png",
"reactionimg": "assets/images/png/heart 2.png",
"title": "Dulce Vaccaro"
},
{
"imagePath": "assets/images/png/cimg3.png",
"reactionimg": "assets/images/png/party-popper 2.png",
"title": "Edward Hackket"
},
{
"imagePath": "assets/images/png/cimg4.png",
"reactionimg": "assets/images/png/f7_hand-thumbsup.png",
"title": "Dulce Vaccaro"
},
{
"imagePath": "assets/images/png/Rectangle 65.png",
"reactionimg": "assets/images/png/heart 2.png",
"title": "Edward Hackket"
},
{
"imagePath": "assets/images/png/Ellipse 43.png",
"reactionimg": "assets/images/png/party-popper 2.png",
"title": "Dulce Vaccaro"
},
{
"imagePath": "assets/images/png/cimg4.png",
"reactionimg": "assets/images/png/f7_hand-thumbsup.png",
"title": "Dulce Vaccaro"
},
{
"imagePath": "assets/images/png/cimg3.png",
"reactionimg": "assets/images/png/party-popper 2.png",
"title": "Edward Hackket"
},
{
"imagePath": "assets/images/png/cimg4.png",
"reactionimg": "assets/images/png/f7_hand-thumbsup.png",
"title": "Dulce Vaccaro"
},
];
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Post",
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(10.h),
Expanded(
child: DefaultTabController(
length: 4,
// initialIndex: selectedIndex.value,
child: Column(children: [
CommonTabBar(tabs: [
Tab(
text: 'All',
),
Tab(
child: Row(children: [
commonGlassContainer(
borderColor: Color(0xFF1E3A46),
opacity1: 0.05,
opacity2: 0.06,
width: 30.w,
height: 30.h,
borderradius: 100,
customWidget: Center(
child: Image.asset(
"assets/images/png/f7_hand-thumbsup.png",
height: 17.h,
width: 17.w,
),
),
border: 1.71),
Spacer(),
text14400white("110K"),
]),
),
Tab(
child: Row(children: [
commonGlassContainer(
borderColor: Color(0xFF1E3A46),
opacity1: 0.05,
opacity2: 0.06,
width: 30.w,
height: 30.h,
borderradius: 100,
customWidget: Center(
child: Image.asset(
"assets/images/png/heart 2.png",
height: 17.h,
width: 17.w,
),
),
border: 1.71),
Spacer(),
text14400white("9.7K"),
]),
),
Tab(
child: Row(children: [
commonGlassContainer(
borderColor: Color(0xFF1E3A46),
opacity1: 0.05,
opacity2: 0.06,
width: 30.w,
height: 30.h,
borderradius: 100,
customWidget: Center(
child: Image.asset(
"assets/images/png/party-popper 2.png",
height: 17.h,
width: 17.w,
),
),
border: 1.71),
Spacer(),
text14400white("7.4K"),
]),
),
]),
Expanded(
child: TabBarView(
children: [
allTab(),
likeTab(),
favouriteTab(),
partyTab(),
],
),
),
sizedBoxHeight(20.h)
])),
)
]))
]));
}
Widget allTab() {
return Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
itemCount: allTabData.length,
shrinkWrap: true,
itemBuilder: (context, index) {
return Column(
children: [
commonReaction(
imagePath: allTabData[index]["imagePath"],
reactionimg: allTabData[index]["reactionimg"],
title: allTabData[index]["title"]),
if (allTabData.length - 1 != index) commonDivider(),
],
);
},
),
)
],
);
}
Widget likeTab() {
return Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
itemCount: allTabData.length,
shrinkWrap: true,
itemBuilder: (context, index) {
return Column(
children: [
commonReaction(
imagePath: allTabData[index]["imagePath"],
reactionimg: allTabData[index]["reactionimg"],
title: allTabData[index]["title"]),
if (allTabData.length - 1 != index) commonDivider(),
],
);
},
),
)
],
);
}
Widget favouriteTab() {
return Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
itemCount: allTabData.length,
shrinkWrap: true,
itemBuilder: (context, index) {
return Column(
children: [
commonReaction(
imagePath: allTabData[index]["imagePath"],
reactionimg: allTabData[index]["reactionimg"],
title: allTabData[index]["title"]),
if (allTabData.length - 1 != index) commonDivider(),
],
);
},
),
)
],
);
}
Widget partyTab() {
return Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
itemCount: allTabData.length,
shrinkWrap: true,
itemBuilder: (context, index) {
return Column(
children: [
commonReaction(
imagePath: allTabData[index]["imagePath"],
reactionimg: allTabData[index]["reactionimg"],
title: allTabData[index]["title"]),
if (allTabData.length - 1 != index) commonDivider(),
],
);
},
),
)
],
);
}
Widget commonReaction(
{required String imagePath,
required String reactionimg,
required String title}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 25.w, vertical: 18.h),
child: Row(
children: [
Stack(children: [
CircleAvatar(
radius: 25.r,
backgroundImage: AssetImage(imagePath),
),
Positioned(
bottom: 0,
right: 0,
child: Container(
height: 22.h,
width: 22.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Color(0xFF1E3A46),
border: Border.all(
color: Color(0xFFFCFCFC).withOpacity(0.18),
width: 0.6)),
child: Center(
child: Image.asset(
reactionimg,
height: 12.h,
width: 12.w,
),
),
)),
]),
sizedBoxWidth(10.w),
text17400white(title),
],
),
);
}
}

View File

@@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_reaction_button/flutter_reaction_button.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@@ -6,7 +8,9 @@ import 'package:regroup/Common/CommonButton.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/CommonDropdown.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/ImageUpload.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
@@ -20,6 +24,8 @@ class PostScreen extends StatefulWidget {
}
class _PostScreenState extends State<PostScreen> {
List<File?> bannerPath = [];
bool isbannerAdded = false;
var selectedContainerIndices = <int>{}.obs;
void toggleSelectedIndex(int index) {
@@ -54,50 +60,115 @@ class _PostScreenState extends State<PostScreen> {
text16w400_FCFCFC("Caption"),
sizedBoxHeight(18.h),
CustomTextFormField2(
CustomTextFormField2(
maxlines: 3,
),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Media"),
sizedBoxHeight(18.h),
commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 130.h,
borderradius: 10.r,
customWidget: Padding(
padding: EdgeInsets.symmetric(vertical: 16.h),
child: Column(
children: [
Image.asset(
"assets/images/png/bi_download.png",
height: 36.h,
width: 36.w,
),
sizedBoxHeight(10.h),
text14w400_FCFCFC("Upload image"),
sizedBoxHeight(8.h),
text8w400_8A8A8A(
"Allowed file extensions: jpg, png, gif Max file size: 10 MB"),
],
),
)),
GestureDetector(
onTap: () {
ImageUploadBottomSheet().showModal(
context,
false,
(result) {
var file = File(result);
bannerPath.add(file);
isbannerAdded = true;
setState(() {});
},
);
},
child: commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 130.h,
borderradius: 10.r,
customWidget: bannerPath.isNotEmpty && isbannerAdded
? Stack(children: [
Image.file(
bannerPath[0]!,
fit: BoxFit.cover,
width: double.infinity,
),
Positioned(
right: 5,
bottom: 5,
child: GestureDetector(
onTap: () {
bannerPath.clear();
isbannerAdded = false;
setState(() {});
},
child: Container(
width: 27,
height: 27,
decoration: ShapeDecoration(
color: Color(0xFF7E7E7E),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(5)),
),
child: Icon(
Icons.delete_outline_outlined,
color: Colors.white,
))),
),
])
: Padding(
padding: EdgeInsets.symmetric(vertical: 16.h),
child: Column(
children: [
Image.asset(
"assets/images/png/bi_download.png",
height: 36.h,
width: 36.w,
),
sizedBoxHeight(10.h),
text14w400_FCFCFC("Upload image"),
sizedBoxHeight(8.h),
text8w400_8A8A8A(
"Allowed file extensions: jpg, png, gif Max file size: 10 MB"),
],
),
)),
),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Tags"),
sizedBoxHeight(18.h),
CustomTextFormField(
suffixIcon: Container(
height: 20.h,
width: 20.w,
child: Center(
child: Image.asset(
"assets/images/png/Frame 58575.png",
height: 20.h,
width: 20.w,
fit: BoxFit.cover,
),
),
)),
CustomDropDownTag(
header: "Enter tags",
title: "Enter tags",
listData: [
"#Race",
"#Swimming",
"#Cycle",
"#Swimming",
"#Race"
],
rowData: [
"23,233 Recently use tags",
"15,123 Recently use tags",
"15,123 Recently use tags",
"15,123 Available tags",
"15,123 Available tags"
],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
// CustomTextFormField(
// suffixIcon: Container(
// height: 20.h,
// width: 20.w,
// child: Center(
// child: Image.asset(
// "assets/images/png/Frame 58575.png",
// height: 20.h,
// width: 20.w,
// fit: BoxFit.cover,
// ),
// ),
// )),
sizedBoxHeight(25.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -123,33 +194,50 @@ class _PostScreenState extends State<PostScreen> {
sizedBoxHeight(25.h),
text16w400_FCFCFC("Post as"),
sizedBoxHeight(18.h),
CommonDropdownradioBtn(
hint: '', items: ['Individual', 'Anonymous']),
sizedBoxHeight(18.h),
CustomDropDownRadio(
header: "",
title: "",
listData: ['Individual', 'Anonymous'],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
// CommonDropdownradioBtn(
// hint: '', items: ['Individual', 'Anonymous']),
// CommonDropdownBtn(hint: '', items: [
// 'Active alliance network',
// 'Fitfam federation',
// 'The athletic town'
// ]),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Post in"),
sizedBoxHeight(18.h),
CommonDropdownCheckbox(
hint: '',
items: [
'Active alliance network',
'Fitfam federation',
'The athletic town',
'Football fever'
],
images: [
'assets/images/png/Rectangle 65.png',
'assets/images/png/Rectangle 66.png',
'assets/images/png/Rectangle 60.png',
'assets/images/png/Rectangle 68.png'
],
),
CustomDropDownCheckBox(
header: "",
title: "",
listData: [
'Active alliance network',
'Fitfam federation',
'The athletic town',
'Football fever'
],
onItemSelected: (p0) {},
images: [
'assets/images/png/Rectangle 65.png',
'assets/images/png/Rectangle 66.png',
'assets/images/png/Rectangle 60.png',
'assets/images/png/Rectangle 68.png'
],
leadingImage: SizedBox()),
// CommonDropdownCheckbox(
// hint: '',
// items: [
// 'Active alliance network',
// 'Fitfam federation',
// 'The athletic town',
// 'Football fever'
// ],
// images: [
// 'assets/images/png/Rectangle 65.png',
// 'assets/images/png/Rectangle 66.png',
// 'assets/images/png/Rectangle 60.png',
// 'assets/images/png/Rectangle 68.png'
// ],
// ),
sizedBoxHeight(40.h),
CommonBtn(
text: 'Submit post',
@@ -229,9 +317,7 @@ class _PostScreenState extends State<PostScreen> {
? Color(0xFFD90B2E).withOpacity(0.4)
: Color(0xFFFFFFFF).withOpacity(0.2),
borderRadius: BorderRadius.circular(30),
border: selectedContainerIndices.contains(index)
? Border.all(color: Color(0xFFD90B2E), width: 1)
: null),
border: Border.all(color: Color(0xFFD90B2E), width: 1)),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 20),
child: Center(child: text14w400_FCFCFC(text)),
@@ -240,4 +326,5 @@ class _PostScreenState extends State<PostScreen> {
);
});
}
}

View File

@@ -0,0 +1,77 @@
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 GroupSettings extends StatefulWidget {
const GroupSettings({super.key});
@override
State<GroupSettings> createState() => _GroupSettingsState();
}
class _GroupSettingsState extends State<GroupSettings> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Group settings",
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(30.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text18w400_FCFCFC("Group type"),
Spacer(),
Icon(
Icons.arrow_forward_ios_outlined,
color: Colors.white,
size: 18.sp,
)
],
),
),
sizedBoxHeight(25.h),
commonDivider(),
sizedBoxHeight(25.h),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.groupmanage);
},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text18w400_FCFCFC("Manage members"),
Spacer(),
Icon(
Icons.arrow_forward_ios_outlined,
color: Colors.white,
size: 18.sp,
)
],
),
),
),
]))
]));
}
}

View File

@@ -0,0 +1,896 @@
import 'package:flutter/material.dart';
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';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
class GroupDetail extends StatefulWidget {
const GroupDetail({super.key});
@override
State<GroupDetail> createState() => _GroupDetailState();
}
class _GroupDetailState extends State<GroupDetail> {
List cardtile = [
{
"imagePath": "assets/images/png/Rectangle 29ss.png",
"title": "Cardio crusaders circle"
},
{
"imagePath": "assets/images/png/Rectangle 31ee.png",
"title": "Strength squad syndicate"
},
{
"imagePath": "assets/images/png/Rectangle 30aa.png",
"title": "Flexibility faction force"
},
{
"imagePath": "assets/images/png/Rectangle 29ss.png",
"title": "Cardio crusaders circle"
},
];
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "",
customActionWidget: Row(children: [
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(
width: 150.w,
),
offset: Offset(0, 40),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
PopupMenuItem(
onTap: () {
Get.toNamed(RouteName.newpost);
},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: text14w400white("Create post"),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {
Get.toNamed(RouteName.groupevent);
},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: text14w400white("Create event"),
),
),
],
child: commonGlassContainer(
opacity1: 0.24,
opacity2: 0.24,
width: 40.w,
height: 40.h,
borderradius: 100,
customWidget: Center(
child: Image.asset(
"assets/images/png/Vector536.png",
height: 17.h,
width: 17.w,
),
),
border: 0.5),
),
sizedBoxWidth(16.w),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(
width: 210.w,
),
offset: Offset(0, 40),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Add members"),
Spacer(),
Image.asset(
"assets/images/png/uiw_user-add.png",
height: 15.h,
width: 15.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Share"),
Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {
Get.toNamed(RouteName.groupinfo);
},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Group info"),
Spacer(),
Image.asset(
"assets/images/png/Vector1a.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Search"),
Spacer(),
Image.asset(
"assets/images/png/Frame 58575.png",
height: 18.h,
width: 18.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Mute Notification"),
Spacer(),
Image.asset(
"assets/images/png/Black1233.png",
height: 16.h,
width: 16.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {
Get.toNamed(RouteName.groupsettings);
},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Edit group settings"),
Spacer(),
Image.asset(
"assets/images/png/setting2.png",
height: 18.h,
width: 18.w,
)
],
),
),
),
],
child: Image.asset(
'assets/images/png/Group 1000004071.png',
height: 20.h,
width: 20.w,
)),
]),
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: SingleChildScrollView(
child:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
sizedBoxHeight(20.h),
Stack(clipBehavior: Clip.none, children: [
GestureDetector(
onTap: () {},
child: SizedBox(
height: 130.h,
width: double.infinity,
child: Image.asset(
"assets/images/png/group11.png",
fit: BoxFit.cover,
),
),
),
Positioned(
bottom: -35.h,
left: 20.w,
child: Container(
width: 85.r,
height: 85.r,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Colors.white,
width: 2,
),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.25),
blurRadius: 12,
offset: Offset(0, 6),
),
],
),
child: CircleAvatar(
radius: 42.5.r,
foregroundImage:
AssetImage("assets/images/png/group111.png"),
),
))
]),
sizedBoxHeight(80.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text20w700_FCFCFC("Iron titans fitness crew"),
sizedBoxHeight(16.h),
Row(
children: [
commonGlassContainer(
width: 35.w,
height: 35.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(
child: Image.asset(
"assets/images/png/community 1 (traced).png",
height: 20.h,
width: 20.w),
),
border: 0.5),
sizedBoxWidth(7.w),
text16w400_FCFCFCblur("The athlectic town"),
sizedBoxWidth(20.w),
commonGlassContainer(
width: 35.w,
height: 35.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100,
customWidget: Center(
child: Image.asset("assets/images/png/img12.png",
height: 20.h, width: 20.w),
),
border: 0.5),
sizedBoxWidth(7.w),
text16w400_FCFCFCblur("Public"),
],
),
sizedBoxHeight(25.h),
Row(
children: [
commonGlassContainer(
width: 35.w,
height: 35.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100,
customWidget: Center(
child: Image.asset(
"assets/images/png/Vector (4).png",
height: 20.h,
width: 20.w),
),
border: 0.5),
sizedBoxWidth(7.w),
text16w400_FCFCFCblur("Rowing, Football, Swimming"),
],
),
sizedBoxHeight(25.h),
commonGlassContainer(
width: double.infinity,
height: 135.h,
borderradius: 10,
customWidget: Padding(
padding: EdgeInsets.symmetric(
vertical: 12.h, horizontal: 16.w),
child: Column(
children: [
Row(
children: [
text16w700white("Badges"),
Spacer(),
GestureDetector(
onTap: () {
// Get.toNamed(RouteName.badges);
},
child: text12400white("View more"))
],
),
sizedBoxHeight(8.h),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
],
),
],
),
),
border: 1),
sizedBoxHeight(20.h),
commonGlassContainer(
width: double.infinity,
height: 51.h,
borderradius: 10.r,
customWidget: Padding(
padding: EdgeInsets.only(right: 16.w),
child: Center(
child: Row(children: [
stackContainers(containerImages: [
"assets/images/png/cimg3.png",
"assets/images/png/cimg2.png",
"assets/images/png/cimg3.png",
"assets/images/png/cimg2.png",
], number: "+2"),
sizedBoxWidth(100.w),
text16400white("7 members"),
Spacer(),
Icon(
Icons.arrow_forward,
color: Colors.white,
)
]),
),
),
border: 1),
sizedBoxHeight(20.h),
Row(
children: [
text18w400white("Subgroups"),
Spacer(),
text14400white("View more"),
],
),
sizedBoxHeight(20.h),
SizedBox(
height: 190.h,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
// padding: EdgeInsets.only(left: 16.w),
itemCount: cardtile.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 20.w),
child: profilecardtile(
imagePath: cardtile[index]["imagePath"],
title: cardtile[index]["title"]),
);
},
),
),
sizedBoxHeight(25.h),
],
),
),
DefaultTabController(
length: 2,
// initialIndex: selectedIndex.value,
child: Column(
children: [
CommonTabBar(tabs: const [
Tab(
text: 'Posts',
),
Tab(
text: 'Events',
),
]),
SizedBox(
height: 600.h,
child: TabBarView(
// clipBehavior: Clip.none,
children: [
postsTab(),
eventsTab(),
],
),
),
sizedBoxHeight(90.h),
],
),
),
]),
))
]));
}
Widget postsTab() {
return Column(
children: [
sizedBoxHeight(30.h),
normalcardtile(
profileImg: 'assets/images/png/cimg4.png',
title: 'Edward Hackket',
mainImg: 'assets/images/png/img322.png',
containerTitle: [
'Kayaking',
'Marathon',
'Events',
'Marathon',
'Events'
]),
],
);
}
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') {
mainImage.value = 'assets/images/png/f7_hand-thumbsup.png';
} else if (reaction == 'heart') {
mainImage.value = 'assets/images/png/heart 2.png';
} else if (reaction == 'party') {
mainImage.value = 'assets/images/png/party-popper 2.png';
}
}
return commonGlassContainer(
width: double.infinity,
height: 570.h,
border: 0,
borderradius: 1,
customWidget: Column(
children: [
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircleAvatar(
foregroundImage: AssetImage(profileImg),
radius: 25.r,
),
sizedBoxWidth(12.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(title),
sizedBoxHeight(5.h),
Row(
children: [
Image.asset(
'assets/images/png/community 1 (traced).png',
height: 14.w,
width: 14.w,
),
sizedBoxWidth(7.w),
text12w400_FCFCFC('Active alliance network'),
sizedBoxWidth(7.w),
Icon(
Icons.circle,
color: Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
text12w400_FCFCFC('1 Hour ago'),
],
)
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 176.w),
offset: Offset(0, 50),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Report Post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/Vector (5).png",
height: 15.h,
width: 15.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Share post',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Pin',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
width: 25.w,
)
],
),
),
),
],
child: Image.asset(
'assets/images/png/Group 1000004071.png',
width: 16.w,
height: 18.h,
),
),
sizedBoxWidth(5.w)
],
),
),
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {
// Get.toNamed(RouteName.postdetailsScreen);
},
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),
child: Column(children: [
SizedBox(
height: 30.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: containerTitle.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
// Get.toNamed(RouteName.cyclescreen);
},
child: containertile(text: containerTitle[index])),
);
},
),
),
sizedBoxHeight(20.h),
text16w400_FCFCFC(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
Row(children: [
InkWell(
onTap: () {
// Get.toNamed(RouteName.reactionview);
},
child: 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.43,
width: 30.w,
height: 30.h,
opacity1: 0.05,
opacity2: 0.06,
borderradius: 100,
customWidget: Center(
child: Image.asset(
'assets/images/png/Frame 1000004088.png',
height: 13.h,
width: 13.w,
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('20'),
sizedBoxWidth(20.w),
commonGlassContainer(
border: 0.43,
width: 30.w,
height: 30.h,
borderradius: 100,
opacity1: 0.05,
opacity2: 0.06,
customWidget: Center(
child: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('10'),
]),
sizedBoxHeight(12.h),
commonDivider(),
sizedBoxHeight(12.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Column(
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Obx(() {
return ReactionButton<String>(
onReactionChanged: (reaction) {
updateImage(reaction?.value ?? 'like');
debugPrint(
'Selected value: ${reaction?.value}');
},
reactions: <Reaction<String>?>[
Reaction<String>(
value: 'like',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/f7_hand-thumbsup.png'),
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png'),
),
Reaction<String>(
value: 'heart',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/heart 2.png'),
icon: _buildReactionsIcon(
'assets/images/png/heart 2.png'),
),
Reaction<String>(
value: 'party',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/party-popper 2.png'),
icon: _buildReactionsIcon(
'assets/images/png/party-popper 2.png'),
),
],
selectedReaction: Reaction<String>(
value: 'like',
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png'),
),
boxColor: Colors.white,
boxElevation: 9,
boxRadius: 30,
itemsSpacing: 8,
itemScale: 0.4,
itemSize: Size(45, 45),
boxPadding: EdgeInsets.all(8),
boxAnimationDuration:
Duration(milliseconds: 200),
itemAnimationDuration:
Duration(milliseconds: 500),
hoverDuration: Duration(milliseconds: 700),
// toggle: false,
child: _buildReactionsIcon(mainImage.value),
);
})
],
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Like')
],
),
GestureDetector(
onTap: () {
// Get.toNamed(RouteName.postdetailsScreen);
},
child: Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004088.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Comment')
],
),
),
Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004089.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Save')
],
)
],
),
sizedBoxHeight(12.h),
commonDivider(),
sizedBoxHeight(12.h),
]),
),
],
));
}
Widget _buildReactionsPreviewIcon(String assetPath) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
assetPath,
height: 40.h,
width: 40.w,
),
);
}
Widget _buildReactionsIcon(String assetPath) {
return Image.asset(
assetPath,
height: 19.h,
width: 19.w,
);
}
Widget containertile({required String text}) {
return commonGlassContainer(
border: 1,
width: 100.w,
height: 30.h,
borderradius: 30.r,
borderColor: Color(0xFFD90B2E),
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Center(child: text14w400_FCFCFC(text)),
));
}
Widget eventsTab() {
return Column(
children: [],
);
}
Widget profilecardtile({required String imagePath, required String title}) {
return Column(
children: [
Container(
height: 109.h,
width: 100.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.r),
),
child: Image.asset(imagePath),
),
sizedBoxHeight(10.h),
SizedBox(width: 100.w, child: text12w700_FCFCFC(title)),
],
);
}
}

View File

@@ -0,0 +1,538 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonButton.dart';
import 'package:regroup/Common/CommonDropDown.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/CustomNextButton.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/ImageUpload.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';
import 'package:intl/intl.dart';
class GroupEvent extends StatefulWidget {
const GroupEvent({super.key});
@override
State<GroupEvent> createState() => _GroupEventState();
}
class _GroupEventState extends State<GroupEvent> {
RxBool isChecked = false.obs;
List<File?> bannerPath = [];
bool isbannerAdded = false;
TextEditingController dateController = TextEditingController();
TextEditingController dateController2 = TextEditingController();
TimeOfDay? starttime = TimeOfDay(hour: 15, minute: 0);
TimeOfDay? endtime = TimeOfDay(hour: 15, minute: 0);
String formatTimeOfDay(TimeOfDay time) {
final now = DateTime.now();
final dt = DateTime(now.year, now.month, now.day, time.hour, time.minute);
final format =
MediaQuery.of(context).alwaysUse24HourFormat ? 'HH:mm' : 'h:mm a';
return DateFormat(format).format(dt);
}
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "",
),
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: [
text16400white("Event Title"),
sizedBoxHeight(14.h),
CustomTextFormField(
leadingIcon: Container(
height: 22.h,
width: 18.w,
child: Center(
child: Image.asset(
"assets/images/png/Vector (5)12.png",
fit: BoxFit.cover,
height: 22.h,
width: 18.w,
),
),
),
hintText: "Tri-sport challenge",
),
text16400white("Event image"),
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {
ImageUploadBottomSheet().showModal(
context,
false,
(result) {
var file = File(result);
bannerPath.add(file);
isbannerAdded = true;
setState(() {});
},
);
},
child: commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 130.h,
borderradius: 10.r,
customWidget: bannerPath.isNotEmpty && isbannerAdded
? Stack(children: [
Image.file(
bannerPath[0]!,
fit: BoxFit.cover,
width: double.infinity,
),
Positioned(
right: 5,
bottom: 5,
child: GestureDetector(
onTap: () {
bannerPath.clear();
isbannerAdded = false;
setState(() {});
},
child: Container(
width: 27,
height: 27,
decoration: ShapeDecoration(
color: Color(0xFF7E7E7E),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(5)),
),
child: Icon(
Icons.delete_outline_outlined,
color: Colors.white,
))),
),
])
: Padding(
padding: EdgeInsets.symmetric(vertical: 16.h),
child: Column(
children: [
Image.asset(
"assets/images/png/bi_download.png",
height: 36.h,
width: 36.w,
),
sizedBoxHeight(10.h),
text14w400white("Upload event image"),
sizedBoxHeight(8.h),
text8w400_8A8A8A(
"Allowed file extensions: jpg, png, gif Max file size: 10 MB"),
],
),
),
),
),
sizedBoxHeight(20.h),
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("Event1.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(20.h),
text16400white("Type of event"),
sizedBoxHeight(14.h),
CommonDropdownBtn(
hint: 'Race',
items: [],
leadingImage: Container(
height: 22.h,
width: 18.w,
child: Center(
child: Image.asset(
"assets/images/png/Vector (5)12.png",
),
),
),
),
sizedBoxHeight(20.h),
text16400white("Sport"),
sizedBoxHeight(14.h),
CommonDropdownBtn(
hint: 'Cycling',
items: [],
leadingImage: Container(
height: 22.h,
width: 18.w,
child: Center(
child: Image.asset(
"assets/images/png/Vector (4).png",
),
),
),
),
sizedBoxHeight(20.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16400white("Start date "),
sizedBoxHeight(10.h),
GestureDetector(
onTap: () =>
datePicker(context, dateController),
child: AbsorbPointer(
child: CustomTextFormField(
textEditingController: dateController,
hintText: "1-4-2024",
leadingIcon: Container(
height: 20.h,
width: 20.w,
child: Center(
child: Image.asset(
"assets/images/png/calender.png",
height: 20.h,
width: 20.w,
),
),
),
),
),
)
],
),
),
sizedBoxWidth(10.h),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16400white("End date"),
sizedBoxHeight(10.h),
GestureDetector(
onTap: () =>
datePicker(context, dateController2),
child: AbsorbPointer(
child: CustomTextFormField(
textEditingController: dateController2,
hintText: "4-4-2024",
leadingIcon: Container(
height: 20.h,
width: 20.w,
child: Center(
child: Image.asset(
"assets/images/png/calender.png",
height: 20.h,
width: 20.w,
),
),
),
),
),
),
]))
]),
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16400white("Start time"),
sizedBoxHeight(14.h),
GestureDetector(
onTap: () async {
final TimeOfDay? pickedTime =
await showCustomTimePicker(context,
initialTime: starttime);
if (pickedTime != null) {
setState(() {
starttime = pickedTime;
});
}
},
child: commonGlassContainer(
width: 174.w,
height: 50.h,
borderradius: 30.r,
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
Image.asset(
"assets/images/png/clock.png",
height: 20.h,
width: 20.w,
),
sizedBoxWidth(8.w),
text16w400_white(
formatTimeOfDay(starttime!)),
]),
),
border: 1),
)
],
),
Spacer(),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16400white("End time"),
sizedBoxHeight(14.h),
GestureDetector(
onTap: () async {
final TimeOfDay? pickedTime =
await showCustomTimePicker(context,
initialTime: endtime);
if (pickedTime != null) {
setState(() {
endtime = pickedTime;
});
}
},
child: commonGlassContainer(
width: 174.w,
height: 50.h,
borderradius: 30.r,
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
Image.asset(
"assets/images/png/clock.png",
height: 20.h,
width: 20.w,
),
sizedBoxWidth(8.w),
text16w400_white(
formatTimeOfDay(endtime!)),
]),
),
border: 1),
)
],
),
],
),
sizedBoxHeight(8.h),
Row(
children: [
Obx(() {
return commonGlassContainer(
border: 1,
borderradius: 2,
height: 23.h,
width: 23.w,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Transform.scale(
scale: 1.4,
child: Checkbox(
side: BorderSide(color: Color(0xFF434A53)),
value: isChecked.value,
activeColor: Colors.transparent,
checkColor: Colors.white,
onChanged: ((value) {
isChecked.value = value!;
}),
),
),
);
}),
sizedBoxWidth(8.w),
text14w400_FCFCFC("Repeat event")
],
),
sizedBoxHeight(20.h),
text16400white("Post in"),
sizedBoxHeight(14.h),
CommonDropdownBtn(
hint: '',
items: [],
leadingImage: Container(
height: 22.h,
width: 28.w,
child: Center(
child: Image.asset("assets/images/png/Black.png"),
),
),
),
sizedBoxHeight(20.h),
text16400white("Add Users"),
sizedBoxHeight(14.h),
CustomTextFormField(
onTap: () {
// Get.toNamed(RouteName.addUsers);
},
leadingIcon: Container(
height: 22.h,
width: 18.w,
child: Center(
child: Image.asset(
"assets/images/png/Group122.png",
fit: BoxFit.cover,
height: 18.h,
width: 18.w,
),
),
),
hintText: "",
suffixIcon:
Icon(Icons.arrow_forward, color: Color(0xFFFFFFFF)),
),
// sizedBoxHeight(20.h),
// containerWidget(
// imagePath: "assets/images/png/Ellipse 52.png",
// title: "Ryan Dorwart"),
// sizedBoxHeight(10.h),
// containerWidget(
// imagePath: "assets/images/png/Ellipse 52.png",
// title: "Ryan Dorwart"),
// sizedBoxHeight(10.h),
// Align(
// alignment: Alignment.center,
// child: text14400white("View more")),
// sizedBoxHeight(30.h),
text16400white("Location"),
sizedBoxHeight(14.h),
CustomTextFormField(
leadingIcon: Container(
height: 19.h,
width: 15.w,
child: Center(
child: Image.asset(
"assets/images/png/Group 58645.png",
height: 19.h,
width: 15.w,
),
),
),
hintText: "Elm street, London, United kingdom",
),
text16400white("Reminder"),
sizedBoxHeight(14.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
commonGlassContainer(
height: 50.h,
width: 127.w,
borderradius: 30.r,
border: 1,
customWidget: Center(
child: text16400white("2"),
)),
commonGlassContainer(
height: 50.h,
width: 215.w,
borderradius: 30.r,
border: 1,
customWidget: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
text16400white("Minutes"),
sizedBoxWidth(5.w),
Icon(
Icons.keyboard_arrow_down,
color: Colors.white,
)
],
),
))
],
),
sizedBoxHeight(35.h),
CommonBtn(text: "Save"),
sizedBoxHeight(70.h),
]),
),
))
]));
}
Widget containerWidget({
required String imagePath,
required String title,
}) {
return commonGlassContainer(
width: double.infinity,
height: 50.h,
borderradius: 30,
customWidget: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Center(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CircleAvatar(
backgroundImage: AssetImage(imagePath),
),
sizedBoxWidth(8.w),
text16400white(title),
Spacer(),
Image.asset(
"assets/images/png/cancelicon.png",
height: 20.h,
width: 20.w,
),
],
),
),
),
border: 1);
}
}

View File

@@ -0,0 +1,141 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Common/CommonButton.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/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class GroupInfo extends StatefulWidget {
const GroupInfo({super.key});
@override
State<GroupInfo> createState() => _GroupInfoState();
}
class _GroupInfoState extends State<GroupInfo> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Groups info",
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(20.h),
Stack(clipBehavior: Clip.none, children: [
GestureDetector(
onTap: () {},
child: SizedBox(
height: 130.h,
width: double.infinity,
child: Image.asset(
"assets/images/png/group11.png",
fit: BoxFit.cover,
),
),
),
Positioned(
bottom: -35.h,
left: 20.w,
child: Container(
width: 85.r,
height: 85.r,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Colors.white,
width: 2,
),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.25),
blurRadius: 12,
offset: Offset(0, 6),
),
],
),
child: CircleAvatar(
radius: 42.5.r,
foregroundImage:
AssetImage("assets/images/png/group111.png"),
),
))
]),
sizedBoxHeight(60.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text20w700_FCFCFC("Iron titans fitness crew"),
sizedBoxHeight(10.h),
commonDivider(),
sizedBoxHeight(25.h),
text16w400_FCFCFC("About group"),
sizedBoxHeight(20.h),
text14w400_FCFCFCblur(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."),
sizedBoxHeight(30.h),
Row(
children: [
commonGlassContainer(
width: 35.w,
height: 35.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100,
customWidget: Center(
child: Image.asset(
"assets/images/png/Group 58645.png",
height: 17.h,
width: 13.w,
),
),
border: 0.5),
sizedBoxWidth(12.w),
text16400white("Elm street london, United Kingdom")
],
),
sizedBoxHeight(30.h),
Row(
children: [
commonGlassContainer(
width: 35.w,
height: 35.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100,
customWidget: Center(
child: Image.asset(
"assets/images/png/Vector2a.png",
height: 20.h,
width: 20.w,
),
),
border: 0.5),
sizedBoxWidth(12.w),
text16400white("www.exampledummywebsite.com")
],
),
sizedBoxHeight(50.h),
CommonBtn(text: "Connect with the community"),
],
),
),
]))
]));
}
}

View File

@@ -0,0 +1,617 @@
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 GroupManage extends StatefulWidget {
const GroupManage({super.key});
@override
State<GroupManage> createState() => _GroupManageState();
}
class _GroupManageState extends State<GroupManage> {
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"},
{"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(
width: double.infinity,
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")
],
),
],
),
),
),
],
),
));
}
Widget AdminsTab() {
return Column(
children: [],
);
}
Widget RequestsTab() {
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: [
requestsTile(
imagePath: members[index]["imagePath"],
title: members[index]["title"]),
if (index != members.length - 1) commonDivider(),
],
);
}),
)
]),
);
}
Widget requestsTile({
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(),
Container(
width: 74.w,
height: 25.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(23.r),
color: Color(0xFFD90B2E),
),
child: Center(child: text11w400white("Confirm")),
),
sizedBoxWidth(6.w),
Icon(
Icons.clear,
size: 20,
color: Colors.white,
)
],
),
);
}
Widget InvitesTab() {
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: [
invitesTile(
imagePath: members[index]["imagePath"],
title: members[index]["title"]),
if (index != members.length - 1) commonDivider(),
],
);
}),
)
]),
);
}
Widget invitesTile({
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(),
Container(
width: 74.w,
height: 25.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(23.r),
color: Color(0xFFD90B2E),
),
child: Center(child: text11w400white("Invite")),
),
],
),
);
}
}

View File

@@ -0,0 +1,333 @@
import 'package:flutter/material.dart';
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/CommonWidget.dart';
import 'package:regroup/Common/controller/CommonTextFormField.dart';
import 'package:regroup/Common/controller/MainScreen.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 GroupTab extends StatefulWidget {
const GroupTab({super.key});
@override
State<GroupTab> createState() => _GroupTabState();
}
class _GroupTabState extends State<GroupTab> {
List groupData = [
{
"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"
},
{
"imagePath": "assets/images/png/img2.png",
"text": "Active alliance network",
"members": "7 members"
},
];
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: AppBar(
scrolledUnderElevation: 0.0,
backgroundColor: Color(0xff222935),
elevation: 0,
automaticallyImplyLeading: false,
title: text20700white("Groups"),
actions: [
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),
),
),
sizedBoxWidth(14.w),
InkWell(
onTap: () {
// Get.toNamed(RouteName.setavailabillity);
},
child: Image.asset(
'assets/images/png/ion_search-outline.png',
height: 22.h,
width: 22.w,
),
),
sizedBoxWidth(14.w),
InkWell(
onTap: () {
// Get.toNamed(RouteName.managememberscal);
},
child: Image.asset(
'assets/images/png/Frame 9.png',
height: 22.h,
width: 22.w,
),
),
sizedBoxWidth(16.w),
],
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(children: [
sizedBoxHeight(25.h),
Row(
children: [
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.requestedgroups);
},
child: text16w700_FCFCFCUnderline("Requested groups")),
],
),
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(20.h),
Expanded(
child: ListView.builder(
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemCount: groupData.length,
itemBuilder: (context, index) {
return groupCard(
ontap: () {
Get.toNamed(RouteName.groupdetail);
},
imagepath: groupData[index]['imagePath'],
title: groupData[index]['text'],
members: groupData[index]['members']);
},
),
)
]),
)),
]),
bottomNavigationBar: bottomnavigationbar(mainController),
);
}
Widget groupCard({
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: commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 162.h,
borderradius: 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: 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")
],
),
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 200.w),
offset: Offset(0, 30),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) =>
<PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Mute community"),
Spacer(),
Image.asset(
"assets/images/png/Black (1).png",
height: 18.h,
width: 18.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Hide post"),
Spacer(),
Image.asset(
"assets/images/png/mingcute_eye-close-line.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Pin"),
Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
width: 25.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Leave community"),
Spacer(),
Image.asset(
"assets/images/png/logout 1 (traced).png",
height: 18.h,
width: 18.w,
)
],
),
),
),
],
child: Image.asset(
"assets/images/png/Group 1000004071.png",
height: 18.h,
width: 20.w,
)),
],
),
sizedBoxHeight(16.h),
commonDivider(),
sizedBoxHeight(10.h),
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),
],
)
],
),
)),
),
);
}
}

View File

@@ -0,0 +1,260 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonButton.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CommonDropdown.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/ImageUpload.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class NewPost extends StatefulWidget {
const NewPost({super.key});
@override
State<NewPost> createState() => _NewPostState();
}
class _NewPostState extends State<NewPost> {
List<File?> bannerPath = [];
bool isbannerAdded = false;
var selectedContainerIndices = <int>{}.obs;
void toggleSelectedIndex(int index) {
if (selectedContainerIndices.contains(index)) {
selectedContainerIndices.remove(index);
} else {
selectedContainerIndices.add(index);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "New post",
),
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(30.h),
text16w400_FCFCFC("Caption"),
sizedBoxHeight(20.h),
CustomTextFormField2(),
text16400white("Media"),
sizedBoxHeight(15.h),
GestureDetector(
onTap: () {
ImageUploadBottomSheet().showModal(
context,
false,
(result) {
var file = File(result);
bannerPath.add(file);
isbannerAdded = true;
setState(() {});
},
);
},
child: commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 130.h,
borderradius: 10.r,
customWidget: bannerPath.isNotEmpty && isbannerAdded
? Stack(children: [
Image.file(
bannerPath[0]!,
fit: BoxFit.cover,
width: double.infinity,
),
Positioned(
right: 5,
bottom: 5,
child: GestureDetector(
onTap: () {
bannerPath.clear();
isbannerAdded = false;
setState(() {});
},
child: Container(
width: 27,
height: 27,
decoration: ShapeDecoration(
color: Color(0xFF7E7E7E),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(5)),
),
child: Icon(
Icons.delete_outline_outlined,
color: Colors.white,
))),
),
])
: Padding(
padding: EdgeInsets.symmetric(vertical: 16.h),
child: Column(
children: [
Image.asset(
"assets/images/png/bi_download.png",
height: 36.h,
width: 36.w,
),
sizedBoxHeight(10.h),
text14w400_FCFCFC("Upload image"),
sizedBoxHeight(8.h),
text8w400_8A8A8A(
"Allowed file extensions: jpg, png, gif Max file size: 10 MB"),
],
),
)),
),
sizedBoxHeight(20.h),
text16w400_FCFCFC("Tags"),
sizedBoxHeight(18.h),
CustomDropDownTag(
header: "Enter tags",
title: "Enter tags",
listData: [
"#Race",
"#Swimming",
"#Cycle",
"#Swimming",
"#Race"
],
rowData: [
"23,233 Recently use tags",
"15,123 Recently use tags",
"15,123 Recently use tags",
"15,123 Available tags",
"15,123 Available tags"
],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
// CustomTextFormField(
// suffixIcon: Container(
// height: 20.h,
// width: 20.w,
// child: Center(
// child: Image.asset(
// "assets/images/png/Frame 58575.png",
// height: 20.h,
// width: 20.w,
// fit: BoxFit.cover,
// ),
// ),
// )),
sizedBoxHeight(25.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
containerTile(text: "# Race", index: 0),
containerTile(text: "# Swimming", index: 1),
containerTile(text: "# Cycle", index: 2),
],
),
sizedBoxHeight(16.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
containerTile(text: "# Race", index: 3),
containerTile(text: "# Swimming", index: 4),
containerTile(text: "# Cycle", index: 5),
],
),
sizedBoxHeight(30.h),
// text16w400_FCFCFC("CTA Title"),
// sizedBoxHeight(18.h),
// CustomTextFormField(),
// sizedBoxHeight(25.h),
text16w400_FCFCFC("Post as"),
sizedBoxHeight(18.h),
CustomDropDownRadio(
header: "",
title: "",
listData: ['Individual', 'Anonymous'],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
// CommonDropdownradioBtn(
// hint: '', items: ['Individual', 'Anonymous']),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Post in"),
sizedBoxHeight(18.h),
CustomDropDownCheckBox(
header: "",
title: "",
listData: [
'Active alliance network',
'Fitfam federation',
'The athletic town',
'Football fever'
],
onItemSelected: (p0) {},
images: [
'assets/images/png/Rectangle 65.png',
'assets/images/png/Rectangle 66.png',
'assets/images/png/Rectangle 60.png',
'assets/images/png/Rectangle 68.png'
],
leadingImage: SizedBox()),
sizedBoxHeight(40.h),
CommonBtn(
text: 'Submit post',
onTap: () {
// successBottomsheet();
},
),
sizedBoxHeight(60.h),
]),
),
))
]));
}
Widget containerTile({
required String text,
required int index,
}) {
return Obx(() {
return GestureDetector(
onTap: () {
toggleSelectedIndex(index);
},
child: Container(
height: 35,
decoration: BoxDecoration(
color: selectedContainerIndices.contains(index)
? Color(0xFFD90B2E).withOpacity(0.4)
: Color(0xFFFFFFFF).withOpacity(0.2),
borderRadius: BorderRadius.circular(30),
border: Border.all(color: Color(0xFFD90B2E), width: 1)),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 20),
child: Center(child: text14w400_FCFCFC(text)),
),
),
);
});
}
}

View File

@@ -0,0 +1,255 @@
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/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class RequestedGroups extends StatefulWidget {
const RequestedGroups({super.key});
@override
State<RequestedGroups> createState() => _RequestedGroupsState();
}
class _RequestedGroupsState extends State<RequestedGroups> {
List groupData = [
{
"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"
},
{
"imagePath": "assets/images/png/img2.png",
"text": "Active alliance network",
"members": "7 members"
},
];
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Requested groups",
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(20.h),
ListView.builder(
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemCount: groupData.length,
itemBuilder: (context, index) {
return groupCard(
ontap: () {},
imagepath: groupData[index]['imagePath'],
title: groupData[index]['text'],
members: groupData[index]['members']);
},
)
]))
]));
}
Widget groupCard({
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: commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 162.h,
borderradius: 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: 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")
],
),
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 200.w),
offset: Offset(0, 30),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) =>
<PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Mute community"),
Spacer(),
Image.asset(
"assets/images/png/Black (1).png",
height: 18.h,
width: 18.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Hide post"),
Spacer(),
Image.asset(
"assets/images/png/mingcute_eye-close-line.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Pin"),
Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
width: 25.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Leave community"),
Spacer(),
Image.asset(
"assets/images/png/logout 1 (traced).png",
height: 18.h,
width: 18.w,
)
],
),
),
),
],
child: Image.asset(
"assets/images/png/Group 1000004071.png",
height: 18.h,
width: 20.w,
)),
],
),
sizedBoxHeight(16.h),
commonDivider(),
sizedBoxHeight(10.h),
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),
Spacer(),
Container(
width: 127.w,
height: 30.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.r),
color: Color(0xFFD90B2E)),
child:
Center(child: text14w400_FCFCFC("Cancel request")),
)
],
)
],
),
)),
),
);
}
}

View File

@@ -1,13 +1,18 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Common/CommonButton.dart';
import 'package:regroup/Common/CommonDropDown.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/CommonDropdown.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/ImageUpload.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:intl/intl.dart';
class EditProfile extends StatefulWidget {
const EditProfile({super.key});
@@ -17,6 +22,10 @@ class EditProfile extends StatefulWidget {
}
class _EditProfileState extends State<EditProfile> {
TextEditingController dateController = TextEditingController();
List<File?> filePath = [];
bool? isImageAdded = false;
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -39,26 +48,52 @@ class _EditProfileState extends State<EditProfile> {
sizedBoxHeight(25.h),
Stack(
children: [
CircleAvatar(
backgroundImage: AssetImage(
"assets/images/png/cimg3.png",
),
radius: 50.r,
),
filePath.isNotEmpty
? ClipOval(
child: SizedBox.fromSize(
size: Size.fromRadius(50.r),
child: Image.file(
filePath[0]!,
fit: BoxFit.cover,
width: double.infinity,
),
),
)
: CircleAvatar(
backgroundImage: AssetImage(
"assets/images/png/cimg3.png",
),
radius: 50.r,
),
Positioned(
bottom: 0,
right: 0,
child: Container(
height: 35.h,
width: 35.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Color(0xFFD90B2E)),
child: Center(
child: Image.asset(
"assets/images/png/cameraicon2.png",
height: 19.h,
width: 19.w,
child: InkWell(
onTap: () {
ImageUploadBottomSheet().showModal(
context,
true,
(result) {
var file = File(result);
filePath.add(file);
isImageAdded = true;
setState(() {});
},
);
},
child: Container(
height: 35.h,
width: 35.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Color(0xFFD90B2E)),
child: Center(
child: Image.asset(
"assets/images/png/cameraicon2.png",
height: 19.h,
width: 19.w,
),
),
),
))
@@ -106,51 +141,43 @@ class _EditProfileState extends State<EditProfile> {
sizedBoxHeight(20.h),
text16400white("Date of birth"),
sizedBoxHeight(16.h),
CustomTextFormField(
leadingIcon: Container(
width: 18.w,
height: 17.h,
child: Center(
child: Image.asset(
"assets/images/png/calender.png",
width: 18.w,
height: 17.h,
GestureDetector(
onTap: () => datePicker(context, dateController),
child: AbsorbPointer(
child: CustomTextFormField(
leadingIcon: Container(
width: 18.0,
height: 17.0,
child: Center(
child: Image.asset(
"assets/images/png/calender.png",
width: 18.0,
height: 17.0,
),
),
),
hintText: "12-04-2024",
textEditingController: dateController,
),
),
hintText: "12-04-2024",
),
sizedBoxHeight(20.h),
text16400white("Gender"),
sizedBoxHeight(16.h),
CustomDropDownRadio(
showOtherOption: true,
header: "",
title: "",
listData: [
"Male",
"Female",
"Prefer not to say"
],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
sizedBoxHeight(20),
CommonDropdownBtn(
hint: "",
items: ["Male", "Female", "Prefer not to say"],
),
sizedBoxHeight(20.h),
CommonDropdownradioBtn(
hint: "Male",
items: ["Male", "Female", "Prefer not to say"],
leadingIcon: Image.asset(
header: "Male",
title: "",
showOtherOption: true,
listData: ["Male", "Female", "Prefer not to say"],
onItemSelected: (p0) {},
leadingImage: Image.asset(
"assets/images/png/Vector ws.png",
width: 18.w,
height: 17.h,
),
showOtherOption: true,
),
sizedBoxHeight(20.h),
sizedBoxHeight(25.h),
Row(
children: [
text16400white("Location"),
@@ -190,9 +217,11 @@ class _EditProfileState extends State<EditProfile> {
],
),
sizedBoxHeight(16.h),
CommonDropdownradioBtn(
hint: "Rowing, Rugby, Swimming",
items: [
CustomDropDownRadio(
showOtherOption: true,
header: "Rowing, Rugby, Swimming",
title: "",
listData: [
"Rowing",
"Cycling",
"Running",
@@ -202,13 +231,32 @@ class _EditProfileState extends State<EditProfile> {
"Football",
"Rugby"
],
leadingIcon: Image.asset(
onItemSelected: (p0) {},
leadingImage: Image.asset(
"assets/images/png/Vector (4).png",
width: 18.w,
height: 17.h,
),
showOtherOption: true,
),
// CommonDropdownradioBtn(
// hint: "Rowing, Rugby, Swimming",
// items: [
// "Rowing",
// "Cycling",
// "Running",
// "Swimming",
// "Triathlon",
// "Hiking",
// "Football",
// "Rugby"
// ],
// leadingIcon: Image.asset(
// "assets/images/png/Vector (4).png",
// width: 18.w,
// height: 17.h,
// ),
// showOtherOption: true,
// ),
sizedBoxHeight(20.h),
text16400white("Bio"),
sizedBoxHeight(16.h),

View File

@@ -379,10 +379,15 @@ class _ProfileTabState extends State<ProfileTab> {
children: [
text18w700white("Timeline"),
Spacer(),
Image.asset(
"assets/images/png/iconamoon_edit-thin.png",
height: 20.h,
width: 20.w,
InkWell(
onTap: () {
Get.toNamed(RouteName.addtimeline);
},
child: Image.asset(
"assets/images/png/iconamoon_edit-thin.png",
height: 20.h,
width: 20.w,
),
)
],
),
@@ -390,6 +395,7 @@ class _ProfileTabState extends State<ProfileTab> {
SizedBox(
height: 300.h,
child: ListView.builder(
shrinkWrap: true,
itemCount: timeline.length,
itemBuilder: (context, index) {
return commonTimelineCard(
@@ -485,19 +491,22 @@ class _ProfileTabState extends State<ProfileTab> {
child: Stack(
clipBehavior: Clip.none,
children: [
Container(
width: 1.w,
height: 170.h,
decoration: BoxDecoration(color: Colors.white),
Positioned(
top: 50.h,
child: Container(
height: 11.h,
width: 11.w,
decoration: BoxDecoration(
color: Colors.white, shape: BoxShape.circle)),
),
Positioned(
top: 60.h,
left: -5.w,
child: Container(
height: 11.h,
width: 11.w,
decoration: BoxDecoration(
color: Colors.white, shape: BoxShape.circle))),
right: 3.w,
child: Container(
width: 1.w,
height: 170.h,
decoration: BoxDecoration(color: Colors.white),
),
),
],
),
),
@@ -511,7 +520,7 @@ class _ProfileTabState extends State<ProfileTab> {
borderradius: 10.r,
customWidget: Padding(
padding:
EdgeInsets.symmetric(vertical: 8.h, horizontal: 16.w),
EdgeInsets.symmetric( horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -748,21 +757,10 @@ class _ProfileTabState extends State<ProfileTab> {
opacity2: 0.06,
borderradius: 100,
customWidget: Center(
child: ReactionButton<String>(
itemSize: Size.fromHeight(20),
onReactionChanged: (Reaction<String>? reaction) {
debugPrint('Selected value: ${reaction?.value}');
},
reactions: <Reaction<String>>[
Reaction<String>(
value: 'message',
icon: Image.asset(
'assets/images/png/Vector.png',
height: 13.h,
width: 13.w,
),
),
],
child: Image.asset(
'assets/images/png/Frame 1000004088.png',
height: 13.h,
width: 13.w,
),
),
),
@@ -777,21 +775,10 @@ class _ProfileTabState extends State<ProfileTab> {
opacity1: 0.05,
opacity2: 0.06,
customWidget: Center(
child: ReactionButton<String>(
itemSize: Size.fromHeight(20),
onReactionChanged: (Reaction<String>? reaction) {
debugPrint('Selected value: ${reaction?.value}');
},
reactions: <Reaction<String>>[
Reaction<String>(
value: 'message',
icon: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
],
child: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
),
@@ -846,19 +833,19 @@ class _ProfileTabState extends State<ProfileTab> {
'assets/images/png/f7_hand-thumbsup.png'),
),
boxColor: Colors.white,
boxElevation: 5,
boxRadius: 50,
boxElevation: 9,
boxRadius: 30,
itemsSpacing: 8,
itemScale: 0.3,
itemSize: Size(40.0, 40.0),
boxPadding: EdgeInsets.all(4),
itemScale: 0.4,
itemSize: Size(45, 45),
boxPadding: EdgeInsets.all(8),
boxAnimationDuration:
Duration(milliseconds: 200),
itemAnimationDuration:
Duration(milliseconds: 100),
hoverDuration: Duration(milliseconds: 400),
toggle: false,
direction: ReactionsBoxAlignment.ltr,
Duration(milliseconds: 500),
hoverDuration: Duration(milliseconds: 700),
// toggle: false,
child: _buildReactionsIcon(mainImage.value),
);
})
@@ -877,7 +864,7 @@ class _ProfileTabState extends State<ProfileTab> {
child: Column(
children: [
Image.asset(
'assets/images/png/Vector.png',
'assets/images/png/Frame 1000004088.png',
height: 19.h,
width: 19.w,
),
@@ -930,6 +917,7 @@ class _ProfileTabState extends State<ProfileTab> {
width: 100.w,
height: 30.h,
borderradius: 30.r,
borderColor: Color(0xFFD90B2E),
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Center(child: text14w400_FCFCFC(text)),

View File

@@ -121,7 +121,7 @@ class _ChangePasswordState extends State<ChangePassword> {
CommonBtn(
text: "Verify",
onTap: () {
Get.toNamed(RouteName.accaountsession);
Get.toNamed(RouteName.verifycode);
},
)
]),

View File

@@ -3,6 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Common/CommonButton.dart';
import 'package:regroup/Common/CommonDropDown.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CommonDropdown.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
@@ -75,26 +76,22 @@ class _ContactUsState extends State<ContactUs> {
),
text16400white("Reason to contact"),
sizedBoxHeight(16.h),
CommonDropdownradioBtn(
hint: '',
leadingIcon: Container(
height: 17.h,
width: 18.w,
child: Center(
child: Image.asset(
"assets/images/png/fluent_person-support-20-regular.png",
height: 17.h,
width: 18.w,
fit: BoxFit.cover,
),
),
),
items: [
"Feature suggestion",
"Issues with app",
"Scoreboard",
"Feedback"
]),
CustomDropDownRadio(
header: "",
title: "",
listData: [
"Feature suggestion",
"Issues with app",
"Scoreboard",
"Feedback"
],
onItemSelected: (p0) {},
leadingImage: Image.asset(
"assets/images/png/fluent_person-support-20-regular.png",
height: 17.h,
width: 18.w,
),
),
sizedBoxHeight(25.h),
text16400white("Query"),
sizedBoxHeight(16.h),

View File

@@ -77,6 +77,7 @@ class _FaqScreenState extends State<FaqScreen> {
child: Column(children: [
sizedBoxHeight(25.h),
ListView.builder(
controller: ScrollController(),
shrinkWrap: true,
itemCount: faqcard.length,
itemBuilder: (BuildContext context, int index) {

View File

@@ -3,6 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Common/CommonButton.dart';
import 'package:regroup/Common/CommonDropDown.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CommonDropdown.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
@@ -111,20 +112,23 @@ class _ReportABugState extends State<ReportABug> {
),
text16400white("Reason to contact"),
sizedBoxHeight(15.h),
CommonDropdownradioBtn(
leadingIcon: Image.asset(
"assets/images/png/codicon_bug.png",
height: 23.h,
width: 23.w,
),
showOtherOption: true,
hint: "",
items: [
"Messaging",
"Crashes",
"Constant logout",
"Unable to view post"
]),
CustomDropDownRadio(
header: "",
title: "",
listData: [
"Messaging",
"Crashes",
"Constant logout",
"Unable to view post"
],
onItemSelected: (p0) {},
leadingImage: Image.asset(
"assets/images/png/codicon_bug.png",
height: 23.h,
width: 23.w,
),
showOtherOption: true,
),
sizedBoxHeight(20.h),
text16400white("Query"),
sizedBoxHeight(15.h),

View File

@@ -1,4 +1,13 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.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/dialogs.dart';
import 'package:regroup/Utils/texts.dart';
class VerifyCode extends StatefulWidget {
const VerifyCode({super.key});
@@ -8,8 +17,178 @@ class VerifyCode extends StatefulWidget {
}
class _VerifyCodeState extends State<VerifyCode> {
final TextEditingController pincodeController = TextEditingController();
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
return const Placeholder();
return Scaffold(
backgroundColor: const Color(0xFF222935),
appBar: CommonAppbar(titleTxt: ""),
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),
text20700white("Check your email"),
sizedBoxHeight(10.h),
text14400whiteblur(
"Enter the verification code that we sent to loremipsum@gmail.com"),
sizedBoxHeight(30.h),
text16400white("Enter code"),
sizedBoxHeight(20.h),
commonGlassContainer(
width: double.infinity,
height: 50.h,
borderradius: 30.r,
border: 1,
customWidget: CustomPinCodeField(
controller: pincodeController,
onChanged: (value) {
print(value);
},
onCompleted: (value) {
print("Completed");
pincodeController.text = value;
},
),
),
sizedBoxHeight(70.h),
CustomButton(
text: 'Continue',
onPressed: () {
if (pincodeController.text.isEmpty) {
utils.showToast("Pin field is empty");
} else {
return;
}
},
),
],
),
),
),
),
],
),
);
}
}
}
class CustomPinCodeField extends StatefulWidget {
final TextEditingController controller;
final ValueChanged<String> onChanged;
final ValueChanged<String> onCompleted;
CustomPinCodeField({
required this.controller,
required this.onChanged,
required this.onCompleted,
});
@override
_CustomPinCodeFieldState createState() => _CustomPinCodeFieldState();
}
class _CustomPinCodeFieldState extends State<CustomPinCodeField> {
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
late List<TextEditingController> _controllers;
late List<FocusNode> _focusNodes;
String _currentText = "";
@override
void initState() {
super.initState();
_controllers = List.generate(4, (_) => TextEditingController());
_focusNodes = List.generate(4, (_) => FocusNode());
}
@override
void dispose() {
_controllers.forEach((controller) => controller.dispose());
_focusNodes.forEach((focusNode) => focusNode.dispose());
super.dispose();
}
String? _validate(String? value) {
if (_currentText.isEmpty) {
return "Please Enter verification code";
} else if (_currentText.length < 4) {
return "OTP length should be at least 4";
}
return null;
}
void _onChanged(String value, int index) {
setState(() {
_currentText = _controllers.map((controller) => controller.text).join();
});
if (value.length == 1 && index != 3) {
FocusScope.of(context).nextFocus();
}
widget.onChanged(_currentText);
if (_currentText.length == 4) {
widget.onCompleted(_currentText);
}
}
@override
Widget build(BuildContext context) {
return Form(
key: _formKey,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: List.generate(4, (index) {
return Row(
children: [
SizedBox(
width: 50,
child: TextFormField(
controller: _controllers[index],
focusNode: _focusNodes[index],
keyboardType: TextInputType.number,
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
LengthLimitingTextInputFormatter(1),
],
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 20.sp,
fontFamily: 'Helvetica',
),
decoration: InputDecoration(
border: InputBorder.none,
errorStyle: TextStyle(height: 0),
),
onChanged: (value) => _onChanged(value, index),
validator: (value) {
if (index == 3) return _validate(value);
return null;
},
),
),
if (index != 3)
Container(
width: 12,
height: 2,
color: Colors.white,
margin: EdgeInsets.symmetric(horizontal: 10),
),
],
);
}),
),
);
}
}

View File

@@ -0,0 +1,160 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonButton.dart';
import 'package:regroup/Common/CommonGlassmorphism.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';
import 'package:intl/intl.dart';
class AddTimeline extends StatefulWidget {
const AddTimeline({super.key});
@override
State<AddTimeline> createState() => _AddTimelineState();
}
class _AddTimelineState extends State<AddTimeline> {
TextEditingController dateController = TextEditingController();
TextEditingController dateController2 = TextEditingController();
RxBool isChecked = false.obs;
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Add timeline",
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
sizedBoxHeight(20.h),
text16400white("Club name"),
sizedBoxHeight(15.h),
CustomTextFormField(),
sizedBoxHeight(25.h),
text16400white("Role in the club"),
sizedBoxHeight(15.h),
CustomTextFormField(),
sizedBoxHeight(25.h),
text16400white("Team name"),
sizedBoxHeight(15.h),
CustomTextFormField(),
sizedBoxHeight(25.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16400white("Start date "),
sizedBoxHeight(10.h),
GestureDetector(
onTap: () => datePicker(context, dateController),
child: AbsorbPointer(
child: CustomTextFormField(
textEditingController: dateController,
leadingIcon: Container(
height: 20.h,
width: 20.w,
child: Center(
child: Image.asset(
"assets/images/png/calender.png",
height: 20.h,
width: 20.w,
),
),
),
),
),
)
],
),
),
sizedBoxWidth(10.h),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16400white("End date"),
sizedBoxHeight(10.h),
GestureDetector(
onTap: () => datePicker(context, dateController2),
child: AbsorbPointer(
child: CustomTextFormField(
textEditingController: dateController2,
leadingIcon: Container(
height: 20.h,
width: 20.w,
child: Center(
child: Image.asset(
"assets/images/png/calender.png",
height: 20.h,
width: 20.w,
),
),
),
),
),
),
sizedBoxHeight(10.h),
Row(
children: [
Obx(() {
return commonGlassContainer(
border: 1,
borderradius: 2,
height: 20.h,
width: 20.w,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Transform.scale(
scale: 1.2,
child: Checkbox(
side: BorderSide(color: Color(0xFF434A53)),
value: isChecked.value,
activeColor: Colors.transparent,
checkColor: Colors.white,
onChanged: ((value) {
isChecked.value = value!;
}),
),
),
);
}),
sizedBoxWidth(8.w),
text10400white("Present")
],
),
],
),
)
],
),
sizedBoxHeight(80.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 20.w),
child: CommonBtn(text: "Add timeline"),
),
]),
)))
]));
}
}

View File

@@ -1,9 +1,13 @@
import 'dart:io';
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/CommonDropdown.dart';
import 'package:regroup/Utils/Common/CustomNextButton.dart';
import 'package:regroup/Utils/Common/ImageUpload.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
@@ -28,6 +32,10 @@ class _EditCommunityState extends State<EditCommunity> {
super.initState();
}
List<File?> filePath = [];
List<File?> bannerPath = [];
bool isImageAdded = false;
bool isbannerAdded = false;
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -58,26 +66,52 @@ class _EditCommunityState extends State<EditCommunity> {
Border.all(color: Color(0xFF434A53), width: 0.5.w),
),
child: Center(
child: Image.asset('assets/images/png/Ellipse 37.png',
fit: BoxFit.cover),
child: filePath.isNotEmpty
? ClipOval(
child: SizedBox.fromSize(
size: Size.fromRadius(50.r),
child: Image.file(
filePath[0]!,
fit: BoxFit.cover,
width: double.infinity,
),
),
)
: 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,
child: InkWell(
onTap: () {
ImageUploadBottomSheet().showModal(
context,
true,
(result) {
var file = File(result);
filePath.add(file);
isImageAdded = true;
setState(() {});
},
);
},
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,
),
),
),
))
@@ -93,30 +127,76 @@ class _EditCommunityState extends State<EditCommunity> {
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"),
),
],
),
GestureDetector(
onTap: () {
ImageUploadBottomSheet().showModal(
context,
false,
(result) {
var file = File(result);
bannerPath.add(file);
isbannerAdded = true;
setState(() {});
},
);
},
child: commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 150.h,
borderradius: 10.r,
customWidget: bannerPath.isNotEmpty && isbannerAdded
? Stack(children: [
Image.file(
bannerPath[0]!,
fit: BoxFit.cover,
width: double.infinity,
),
Positioned(
right: 5,
bottom: 5,
child: GestureDetector(
onTap: () {
bannerPath.clear();
isbannerAdded = false;
setState(() {});
},
child: Container(
width: 27,
height: 27,
decoration: ShapeDecoration(
color: Color(0xFF7E7E7E),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(5)),
),
child: Icon(
Icons.delete_outline_outlined,
color: Colors.white,
))),
),
])
: 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),
@@ -172,21 +252,31 @@ class _EditCommunityState extends State<EditCommunity> {
),
text16w400_FCFCFC("Type of community"),
sizedBoxHeight(14.h),
CommonDropdownradioBtn(
hint: '',
items: ["Public", "Private - Request to join"]),
CustomDropDownRadio(
header: "",
title: "",
listData: ["Public", "Private - Request to join"],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Location*"),
sizedBoxHeight(14.h),
CommonDropdownradioBtn(
hint: '', items: ["Public", "Private", "Secret"]),
CustomDropDownRadio(
header: "",
title: "",
listData: ["Public", "Private", "Secret"],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Primary activity*"),
sizedBoxHeight(14.h),
CommonDropdownradioBtn(
hint: '',
items: ["Sports", "Hobby"],
showOtherOption: true),
CustomDropDownRadio(
showOtherOption: true,
header: "",
title: "",
listData: ["Sports", "Hobby"],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
sizedBoxHeight(50.h),
CustomButton(text: 'Save changes', onPressed: () {}),
sizedBoxHeight(50.h),

View File

@@ -52,6 +52,26 @@ class _ManageGroupsState extends State<ManageGroups> {
extendBody: true,
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: [
const CommonBlurLeftRed(),
@@ -107,33 +127,6 @@ class _ManageGroupsState extends State<ManageGroups> {
),
],
),
sizedBoxHeight(25.h),
Row(
children: [
commonGlassContainer(
opacity1: 0.24,
opacity2: 0.24,
width: 50.w,
height: 50.h,
borderradius: 100,
customWidget: Center(
child: Icon(
Icons.add,
color: Colors.white,
weight: 1.4.w,
size: 25.sp,
)),
border: 0.5),
sizedBoxWidth(8.w),
text18w400_FCFCFC("Add existing groups"),
Spacer(),
Icon(
Icons.arrow_forward_ios_outlined,
color: Colors.white,
size: 14.sp,
),
],
),
sizedBoxHeight(30.h),
text18w700white("Groups"),
sizedBoxHeight(20.h),

View File

@@ -26,6 +26,8 @@ class _ManageMembersState extends State<ManageMembers> {
{"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"},
{"imagePath": "assets/images/png/cimg1.png", "title": "Maria Herwitz"},
{"imagePath": "assets/images/png/cimg4.png", "title": "Ahmad Rhiel Madsen"},
];
@override
@@ -221,6 +223,7 @@ class _ManageMembersState extends State<ManageMembers> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.r),
color: Color(0xFF222935)),
@@ -371,24 +374,244 @@ class _ManageMembersState extends State<ManageMembers> {
}
Widget RequestsTab() {
return Column(
children: [],
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: [
requestsTile(
imagePath: members[index]["imagePath"],
title: members[index]["title"]),
if (index != members.length - 1) commonDivider(),
],
);
}),
)
]),
);
}
Widget requestsTile({
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(),
Container(
width: 74.w,
height: 25.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(23.r),
color: Color(0xFFD90B2E),
),
child: Center(child: text11w400white("Confirm")),
),
sizedBoxWidth(6.w),
Icon(
Icons.clear,
size: 20,
color: Colors.white,
)
],
),
);
}
Widget InvitesTab() {
return Column(
children: [],
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: [
invitesTile(
imagePath: members[index]["imagePath"],
title: members[index]["title"]),
if (index != members.length - 1) commonDivider(),
],
);
}),
)
]),
);
}
Widget membersCard() {
return Column(
children: [
Row(
children: [],
)
],
Widget invitesTile({
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(),
Container(
width: 74.w,
height: 25.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(23.r),
color: Color(0xFFD90B2E),
),
child: Center(child: text11w400white("Invite")),
),
],
),
);
}
}

View File

@@ -19,7 +19,7 @@ class AddGroup extends StatefulWidget {
}
class _AddGroupState extends State<AddGroup> {
List<bool> isCheckedList = [false, false, false, false];
List<bool> isCheckedList = [false, false, false, false].obs;
List groupData = [
{
@@ -125,9 +125,7 @@ class _AddGroupState extends State<AddGroup> {
subtitle: groupData[index]["subtitle"],
isChecked: isCheckedList[index],
onCheckedChanged: (bool? value) {
setState(() {
isCheckedList[index] = value ?? false;
});
isCheckedList[index] = value ?? false;
},
),
commonDivider(),
@@ -160,42 +158,43 @@ class _AddGroupState extends State<AddGroup> {
}) {
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(),
commonGlassContainer(
border: 1,
borderradius: 2,
height: 23.h,
width: 23.w,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Transform.scale(
scale: 1.4,
child: Checkbox(
side: BorderSide(color: Color(0xFF434A53)),
value: isChecked,
activeColor: Colors.transparent,
checkColor: Colors.white,
onChanged: onCheckedChanged,
),
),
),
],
),
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(),
Obx(() {
return commonGlassContainer(
border: isCheckedList[index] ? 1.2 : 0.9,
borderradius: 2,
height: 23.h,
width: 23.w,
opacity1: 0.24,
opacity2: 0.24,
borderColor:
isCheckedList[index] ? Color(0xFFD90B2E) : Color(0xFF434A53),
customWidget: Transform.scale(
scale: 1,
child: Checkbox(
side: BorderSide(color: Colors.transparent),
value: isCheckedList[index],
activeColor: Colors.transparent,
checkColor: Color(0xFFD90B2E),
onChanged: onCheckedChanged,
),
));
})
]),
);
}
}

View File

@@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@@ -7,6 +9,7 @@ import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/controller/CommonTextFormField.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CommonDropdown.dart';
import 'package:regroup/Utils/Common/ImageUpload.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
@@ -20,6 +23,11 @@ class NewCommunity extends StatefulWidget {
}
class _NewCommunityState extends State<NewCommunity> {
List<File?> filePath = [];
List<File?> bannerPath = [];
bool isImageAdded = false;
bool isbannerAdded = false;
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -42,83 +50,164 @@ class _NewCommunityState extends State<NewCommunity> {
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
sizedBoxHeight(20.h),
Center(
child: commonGlassContainer(
width: 95.w,
height: 95.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(
child: Image.asset(
"assets/images/png/cameraicon2.png",
height: 30.h,
width: 30.w,
),
),
border: 0.5),
child: InkWell(
onTap: () {
ImageUploadBottomSheet().showModal(
context,
true,
(result) {
var file = File(result);
filePath.add(file);
isImageAdded = true;
setState(() {});
},
);
},
child: commonGlassContainer(
width: 95.w,
height: 95.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: filePath.isNotEmpty && isImageAdded
? ClipOval(
child: SizedBox.fromSize(
size: Size.fromRadius(47.5.r),
child: Image.file(
filePath[0]!,
fit: BoxFit.cover,
width: double.infinity,
),
),
)
: Center(
child: Image.asset(
"assets/images/png/cameraicon2.png",
height: 30.h,
width: 30.w,
),
),
border: 0.5),
),
),
sizedBoxHeight(20.h),
Center(child: text16w400_white("Add community profile picture")),
sizedBoxHeight(30.h),
text16w400_FCFCFC("Banner image"),
sizedBoxHeight(15.h),
commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 130.h,
borderradius: 10.r,
customWidget: Padding(
padding: EdgeInsets.symmetric(vertical: 16.h),
child: Column(
children: [
Image.asset(
"assets/images/png/bi_download.png",
height: 36.h,
width: 36.w,
),
sizedBoxHeight(10.h),
text14w400white('Upload banner image'),
sizedBoxHeight(8.h),
text8w400_8A8A8A(
"Allowed file extensions: jpg, png, gif Max file size: 10 MB"),
],
),
InkWell(
onTap: () {
ImageUploadBottomSheet().showModal(
context,
false,
(result) {
var file = File(result);
bannerPath.add(file);
isbannerAdded = true;
setState(() {});
},
);
},
child: commonGlassContainer(
border: 0.9,
width: double.infinity,
height: 130.h,
borderradius: 10.r,
customWidget: bannerPath.isNotEmpty && isbannerAdded
? Stack(children: [
Image.file(
bannerPath[0]!,
fit: BoxFit.cover,
width: double.infinity,
),
Positioned(
right: 5,
bottom: 5,
child: GestureDetector(
onTap: () {
bannerPath.clear();
isbannerAdded = false;
setState(() {});
},
child: Container(
width: 27,
height: 27,
decoration: ShapeDecoration(
color: Color(0xFF7E7E7E),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(5)),
),
child: Icon(
Icons.delete_outline_outlined,
color: Colors.white,
))),
),
])
: Padding(
padding: EdgeInsets.symmetric(vertical: 16.h),
child: Column(
children: [
Image.asset(
"assets/images/png/bi_download.png",
height: 36.h,
width: 36.w,
),
sizedBoxHeight(10.h),
text14w400white('Upload banner image'),
sizedBoxHeight(8.h),
text8w400_8A8A8A(
"Allowed file extensions: jpg, png, gif Max file size: 10 MB"),
],
),
),
),
),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Community name*"),
sizedBoxHeight(15.h),
CustomTextFormField(),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Type of community*"),
sizedBoxHeight(15.h),
CommonDropdownradioBtn(
hint: '',
items: ['Public', 'Private', 'Secret'],
showOtherOption: false),
CustomDropDownRadio(
header: "",
title: "",
listData: ['Public', 'Private', 'Secret'],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
// CommonDropdownradioBtn(
// hint: '',
// items: ['Public', 'Private', 'Secret'],
// showOtherOption: false),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Location*"),
sizedBoxHeight(15.h),
CommonDropdownradioBtn(
// showOther: true,
hint: '',
items: ['Public', 'Private', 'Secret']),
CustomDropDownRadio(
header: "",
title: "",
listData: ['Public', 'Private', 'Secret'],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Primary activity*"),
// CustomDropDownWidgetSignup(
// header: 'Primary activity',
// title: 'ss',
// listData: ['Public', 'Private', 'Secret'],
// onItemSelected: (p0) => {},
// leadingImage: SizedBox()),
sizedBoxHeight(20.h),
CommonDropdownradioBtn(
hint: '',
items: [
CustomDropDownRadio(
header: "",
title: "",
listData: [
'Sports',
'Hobby',
],
showOtherOption: true),
showOtherOption: true,
onItemSelected: (p0) {},
leadingImage: SizedBox()),
sizedBoxHeight(25.h),
sizedBoxHeight(25.h),
CommonBtn(

View File

@@ -27,7 +27,9 @@ class _CommunityDetailsState extends State<CommunityDetails> {
extendBody: true,
appBar: CommonAppbar(
titleTxt: "",
customActionWidget: PopupMenuButton(
customActionWidget:
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 180.w),
offset: Offset(0, 40),
@@ -147,8 +149,9 @@ class _CommunityDetailsState extends State<CommunityDetails> {
child: Image.asset(
'assets/images/png/Group 1000004071.png',
height: 20.h,
width: 10.w,
width: 20.w,
)),
),
body: Stack(children: [
const CommonBlurLeftRed(),
@@ -602,21 +605,10 @@ class _CommunityDetailsState extends State<CommunityDetails> {
opacity2: 0.06,
borderradius: 100,
customWidget: Center(
child: ReactionButton<String>(
itemSize: Size.fromHeight(20),
onReactionChanged: (Reaction<String>? reaction) {
debugPrint('Selected value: ${reaction?.value}');
},
reactions: <Reaction<String>>[
Reaction<String>(
value: 'message',
icon: Image.asset(
'assets/images/png/Vector.png',
height: 13.h,
width: 13.w,
),
),
],
child: Image.asset(
'assets/images/png/Vector.png',
height: 13.h,
width: 13.w,
),
),
),
@@ -631,21 +623,10 @@ class _CommunityDetailsState extends State<CommunityDetails> {
opacity1: 0.05,
opacity2: 0.06,
customWidget: Center(
child: ReactionButton<String>(
itemSize: Size.fromHeight(20),
onReactionChanged: (Reaction<String>? reaction) {
debugPrint('Selected value: ${reaction?.value}');
},
reactions: <Reaction<String>>[
Reaction<String>(
value: 'message',
icon: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
],
child: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
),
@@ -700,19 +681,19 @@ class _CommunityDetailsState extends State<CommunityDetails> {
'assets/images/png/f7_hand-thumbsup.png'),
),
boxColor: Colors.white,
boxElevation: 5,
boxRadius: 50,
boxElevation: 9,
boxRadius: 30,
itemsSpacing: 8,
itemScale: 0.3,
itemSize: Size(40.0, 40.0),
boxPadding: EdgeInsets.all(4),
itemScale: 0.4,
itemSize: Size(45, 45),
boxPadding: EdgeInsets.all(8),
boxAnimationDuration:
Duration(milliseconds: 200),
itemAnimationDuration:
Duration(milliseconds: 100),
hoverDuration: Duration(milliseconds: 400),
toggle: false,
direction: ReactionsBoxAlignment.ltr,
Duration(milliseconds: 500),
hoverDuration: Duration(milliseconds: 700),
// toggle: false,
child: _buildReactionsIcon(mainImage.value),
);
})
@@ -780,10 +761,11 @@ class _CommunityDetailsState extends State<CommunityDetails> {
Widget containertile({required String text}) {
return commonGlassContainer(
border: 0.9,
border: 1,
width: 100.w,
height: 30.h,
borderradius: 30.r,
borderColor: Color(0xFFD90B2E),
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Center(child: text14w400_FCFCFC(text)),

View File

@@ -287,8 +287,8 @@ class _MyCommunityState extends State<MyCommunity> {
],
child: Image.asset(
"assets/images/png/Group 1000004071.png",
height: 13.h,
width: 3.w,
height: 18.h,
width: 20.w,
)),
],
),
@@ -316,4 +316,5 @@ class _MyCommunityState extends State<MyCommunity> {
),
);
}
}

View File

@@ -0,0 +1,156 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.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 Watchlist extends StatefulWidget {
const Watchlist({super.key});
@override
State<Watchlist> createState() => _WatchlistState();
}
class _WatchlistState extends State<Watchlist> {
final List<String> images = [
'assets/images/png/Rectangle 24.png',
'assets/images/png/Rectangle 25.png',
'assets/images/png/Rectangle 26.png',
'assets/images/png/Rectangle 27.png',
'assets/images/png/Rectangle 28.png',
'assets/images/png/Rectangle 29.png',
'assets/images/png/Rectangle 30.png',
'assets/images/png/Rectangle 31.png',
'assets/images/png/Rectangle 32.png',
];
var selected = <bool>[].obs;
var showCircles = false.obs;
@override
void initState() {
super.initState();
// Initialize the selection list
selected.value = List<bool>.filled(images.length, false);
}
void toggleSelection(int index) {
selected[index] = !selected[index];
}
void toggleCircles() {
showCircles.value = true;
}
void removeSelection() {
selected.value = List<bool>.filled(images.length, false);
showCircles.value = false;
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Watchlist",
customActionWidget: Obx(() => showCircles.value
? GestureDetector(
onTap: removeSelection,
child: text16w700_D90B2E("Remove",
decoration: TextDecoration.underline),
)
: SizedBox.shrink()),
),
body: Stack(children: [
const CommonBlurLeftRed(),
const CommonBlurRightRed(),
const CommonBlurLeft(),
const CommonBlurRight(),
Positioned.fill(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
children: [
sizedBoxHeight(40.h),
Expanded(
child: GridView.builder(
scrollDirection: Axis.vertical,
gridDelegate:
const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
mainAxisSpacing: 8,
crossAxisSpacing: 8,
childAspectRatio: 1,
),
itemCount: images.length,
itemBuilder: (context, index) {
return GestureDetector(
onLongPress: () {
toggleCircles();
},
onTap: () {
toggleSelection(index);
},
child: Obx(() {
return Stack(
children: [
Container(
width: 115.w,
height: 115.h,
child: Image.asset(
images[index],
width: 115.w,
height: 115.h,
fit: BoxFit.cover,
),
),
if (showCircles.value)
Positioned(
top: 8.h,
right: 8.w,
child: GestureDetector(
onTap: () {
toggleSelection(index);
},
child: Container(
width: 18.w,
height: 18.h,
decoration: BoxDecoration(
color: selected[index]
? Colors.white
: Colors.transparent,
shape: BoxShape.circle,
border: Border.all(
color: Colors.white, width: 1),
),
child: selected[index]
? Center(
child: Icon(
Icons.check,
color: Color(0xFF344436),
size: 12,
weight: 3,
),
)
: null,
),
),
),
],
);
}),
);
},
),
),
],
),
),
),
]),
);
}
}

View File

@@ -44,8 +44,7 @@ class _SavedPostsState extends State<SavedPosts> {
child: Column(
children: [
sizedBoxHeight(40.h),
Container(
height: 600.h,
Expanded(
child: GridView.builder(
scrollDirection: Axis.vertical,
gridDelegate:

View File

@@ -3,6 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/svg.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
@@ -70,143 +71,293 @@ class _SideMenuState extends State<SideMenu> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFF222935),
body: ListView(children: [
Padding(
padding: EdgeInsets.only(left: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(40.h),
text18w400_FCFCFC("Social pages"),
sizedBoxHeight(30.h),
text16w400_FCFCFC("Pinned"),
sizedBoxHeight(25.h),
],
),
),
firstRowTile(
text: "Row bridge",
leadingimage: "assets/images/png/sidemenu/rowing 1 (traced).png",
index: 1),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 2),
firstRowTile(
text: "Crush",
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
index: 3),
ListTile(
leading: CircleAvatar(
radius: 15.r,
foregroundImage:
AssetImage("assets/images/png/sidemenu/Ellipse 52.png"),
),
title: text14w400_FCFCFC("Ryan Dorwart"),
trailing: Image.asset(
"assets/images/png/sidemenu/f7_pin-fill (1).png",
width: 19.w,
height: 19.h,
),
onTap: () {},
),
ListTile(
leading: CircleAvatar(
radius: 15.r,
foregroundImage:
AssetImage("assets/images/png/sidemenu/Ellipse 53.png"),
),
title: text14w400_FCFCFC("Ahmad Rhiel Madsen"),
trailing: Image.asset(
"assets/images/png/sidemenu/f7_pin-fill (1).png",
width: 19.w,
height: 19.h,
),
onTap: () {},
),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Container(
height: 1,
margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color.fromRGBO(255, 255, 255, 0.3),
width: 1.w,
body: Column(
children: [
sizedBoxHeight(50.h),
Expanded(
child: ListView(children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: commonGlassContainer(
width: double.infinity,
height: 330.h,
borderradius: 10,
customWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.symmetric(
horizontal: 16.w, vertical: 12.h),
child: Row(
children: [
text16w400_FCFCFC("Pinned"),
Spacer(),
Icon(
Icons.arrow_drop_up,
color: Colors.white,
size: 25,
)
],
),
),
commonDivider(),
sizedBoxHeight(10.h),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 1),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 2),
firstRowTile(
text: "Crush",
leadingimage:
"assets/images/png/sidemenu/Vector (4).png",
index: 3),
ListTile(
leading: CircleAvatar(
radius: 15.r,
foregroundImage: AssetImage(
"assets/images/png/sidemenu/Ellipse 52.png"),
),
title: text14w400_FCFCFC("Ryan Dorwart"),
trailing: Image.asset(
"assets/images/png/sidemenu/f7_pin-fill (1).png",
width: 19.w,
height: 19.h,
),
onTap: () {},
),
ListTile(
leading: CircleAvatar(
radius: 15.r,
foregroundImage: AssetImage(
"assets/images/png/sidemenu/Ellipse 53.png"),
),
title: text14w400_FCFCFC("Ahmad Rhiel Madsen"),
trailing: Image.asset(
"assets/images/png/sidemenu/f7_pin-fill (1).png",
width: 19.w,
height: 19.h,
),
onTap: () {},
),
]),
border: 1),
),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Container(
height: 1,
margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color.fromRGBO(255, 255, 255, 0.3),
width: 1.w,
),
),
),
),
),
),
),
),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text16w400_FCFCFC("Communities"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.mycommunity);
},
child: text14w400_FCFCFC("View all")),
],
),
),
sizedBoxHeight(20.h),
firstRowTile(
text: "Row bridge",
leadingimage: "assets/images/png/sidemenu/rowing 1 (traced).png",
index: 4),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 5),
firstRowTile(
text: "Crush",
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
index: 6),
firstRowTile(
text: "Row bridge",
leadingimage: "assets/images/png/sidemenu/rowing 1 (traced).png",
index: 7),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Container(
height: 1,
margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color.fromRGBO(255, 255, 255, 0.3),
width: 1.w,
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text16w400_FCFCFC("Communities"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.mycommunity);
},
child: text14w400_FCFCFC("View all")),
],
),
),
),
sizedBoxHeight(20.h),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 4),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 5),
firstRowTile(
text: "Crush",
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
index: 6),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 7),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Container(
height: 1,
margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color.fromRGBO(255, 255, 255, 0.3),
width: 1.w,
),
),
),
),
),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text16w400_FCFCFC("Watchlist"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.watchlist);
},
child: text14w400_FCFCFC("View all")),
],
),
),
sizedBoxHeight(20.h),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 8),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 9),
firstRowTile(
text: "Crush",
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
index: 10),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 11),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Container(
height: 1,
margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color.fromRGBO(255, 255, 255, 0.3),
width: 1.w,
),
),
),
),
),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text16w400_FCFCFC("Recent"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.mycommunity);
},
child: text14w400_FCFCFC("View all")),
],
),
),
sizedBoxHeight(20.h),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 8),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 9),
firstRowTile(
text: "Crush",
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
index: 10),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 11),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Container(
height: 1,
margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color.fromRGBO(255, 255, 255, 0.3),
width: 1.w,
),
),
),
),
),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text16w400_FCFCFC("Users"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.mycommunity);
},
child: text14w400_FCFCFC("View all")),
],
),
),
sizedBoxHeight(20.h),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 8),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 9),
firstRowTile(
text: "Crush",
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
index: 10),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 11),
sizedBoxHeight(18.h),
sizedBoxHeight(80.h),
]),
),
),
sizedBoxHeight(16.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text16w400_FCFCFC("Saved post"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.savedposts);
},
child: text14w400_FCFCFC("View all")),
],
),
),
sizedBoxHeight(80.h),
]));
],
));
}
Widget firstRowTile({

View File

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class CustomDropDownWidgetSignup extends StatefulWidget {
const CustomDropDownWidgetSignup({
@@ -150,6 +151,159 @@ class _CustomDropDownWidgetSignupState
}
}
class CustomDropDownTag extends StatefulWidget {
const CustomDropDownTag(
{Key? key,
required this.header,
required this.title,
required this.listData,
required this.onItemSelected,
required this.leadingImage,
required this.rowData})
: super(key: key);
final String header;
final String title;
final List<String> listData;
final List<String> rowData;
final Function(String) onItemSelected;
final Widget? leadingImage;
@override
State<CustomDropDownTag> createState() => _CustomDropDownTagState();
}
class _CustomDropDownTagState extends State<CustomDropDownTag> {
RxBool onDropTap = false.obs;
RxString selectedValue = "".obs;
@override
Widget build(BuildContext context) {
return Obx(
() => Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GestureDetector(
onTap: () {
onDropTap.value = !onDropTap.value;
},
child: Container(
width: double.infinity,
height: 50.h,
padding: EdgeInsets.only(
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
decoration: BoxDecoration(
color: Color(0xFFFFFFFF).withOpacity(0.10),
borderRadius: onDropTap.value
? BorderRadius.vertical(
top: Radius.circular(30.r),
)
: BorderRadius.circular(30.r),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
const Color(0xFFffffff).withOpacity(0.50),
const Color(0xFFFFFFFF).withOpacity(0.50),
],
),
border: Border.all(color: const Color(0xFF434A53)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
// Image.asset(
// 'assets/images/png/user.png',
// ),
widget.leadingImage!,
SizedBox(width: 16.w),
Text(
selectedValue.value.isEmpty
? widget.header
: selectedValue.value,
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400),
),
],
),
onDropTap.value
? Image.asset('assets/images/png/arrowup.png')
: Image.asset('assets/images/png/arrowdown.png'),
],
),
),
),
if (onDropTap.value)
Container(
width: double.infinity,
decoration: BoxDecoration(
color: Color(0xFFFFFFFF).withOpacity(0.10),
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(30.r),
),
border: Border.all(color: const Color(0xFF434A53)),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
const Color(0xFFffffff).withOpacity(0.50),
const Color(0xFFFFFFFF).withOpacity(0.50),
],
),
),
child: ListView.builder(
shrinkWrap: true,
itemCount: widget.listData.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
selectedValue.value = widget.listData[index];
onDropTap.value = !onDropTap.value;
widget.onItemSelected(selectedValue.value);
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(
left: 20.0, right: 20.0, top: 10.0, bottom: 10.0),
child: Row(
children: [
Text(
widget.listData[index],
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w400,
fontFamily: 'Helvetica'),
),
Spacer(),
text14400whiteblur(widget.rowData[index]),
],
),
),
// sizedBoxHeight(5.h),
if (index != widget.listData.length - 1)
Divider(thickness: 1, color: const Color(0xFF434A53)),
],
),
);
},
),
),
],
),
);
}
}
class CustomDropDownRadio extends StatefulWidget {
const CustomDropDownRadio({
Key? key,
@@ -364,14 +518,134 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
),
),
),
if (onDropTap.value)
Scrollbar(
// thumbVisibility: true,
child: Container(
width: double.infinity,
height: widget.listData.length > 4 ? 250.h : null,
decoration: BoxDecoration(
color: Color(0xFFFFFFFF).withOpacity(0.10),
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(30.r),
),
border: Border.all(color: const Color(0xFF434A53)),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
const Color(0xFFffffff).withOpacity(0.50),
const Color(0xFFFFFFFF).withOpacity(0.50),
],
),
),
child: ListView(
shrinkWrap: true,
children: _buildDropdownMenuItems(),
),
),
),
],
),
);
}
}
class CustomDropDownCheckBox extends StatefulWidget {
const CustomDropDownCheckBox({
Key? key,
required this.header,
required this.title,
required this.listData,
required this.onItemSelected,
required this.images,
required this.leadingImage,
}) : super(key: key);
final String header;
final String title;
final List<String> listData;
final Function(String) onItemSelected;
final List<String> images;
final Widget? leadingImage;
@override
State<CustomDropDownCheckBox> createState() => _CustomDropDownCheckBoxState();
}
class _CustomDropDownCheckBoxState extends State<CustomDropDownCheckBox> {
RxBool onDropTap = false.obs;
RxList<String> selectedValues = <String>[].obs;
@override
Widget build(BuildContext context) {
return Obx(
() => Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GestureDetector(
onTap: () {
onDropTap.value = !onDropTap.value;
},
child: Container(
width: double.infinity,
padding: EdgeInsets.only(
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
decoration: BoxDecoration(
color: Color(0xFFFFFFFF).withOpacity(0.10),
borderRadius: onDropTap.value
? BorderRadius.vertical(top: Radius.circular(30.r))
: BorderRadius.circular(30.r),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
const Color(0xFFffffff).withOpacity(0.50),
const Color(0xFFFFFFFF).withOpacity(0.50),
],
),
border: Border.all(color: const Color(0xFF434A53)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Row(
children: [
if (widget.leadingImage != null) widget.leadingImage!,
SizedBox(width: 16.w),
Expanded(
child: Text(
selectedValues.isEmpty
? widget.header
: selectedValues.join(', '),
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400,
),
// overflow: TextOverflow.ellipsis,
),
),
],
),
),
onDropTap.value
? Image.asset('assets/images/png/arrowup.png')
: Image.asset('assets/images/png/arrowdown.png'),
],
),
),
),
if (onDropTap.value)
Container(
width: double.infinity,
decoration: BoxDecoration(
color: Color(0xFFFFFFFF).withOpacity(0.10),
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(30.r),
),
borderRadius:
BorderRadius.vertical(bottom: Radius.circular(30.r)),
border: Border.all(color: const Color(0xFF434A53)),
gradient: LinearGradient(
begin: Alignment.topLeft,
@@ -382,9 +656,77 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
],
),
),
child: ListView(
child: ListView.builder(
shrinkWrap: true,
children: _buildDropdownMenuItems(),
itemCount: widget.listData.length,
itemBuilder: (context, index) {
String item = widget.listData[index];
String image = widget.images[index];
return InkWell(
onTap: () {
if (selectedValues.contains(item)) {
selectedValues.remove(item);
} else {
selectedValues.add(item);
}
widget.onItemSelected(selectedValues.join(', '));
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.symmetric(
vertical: 10.0, horizontal: 20.0),
child: Row(
children: [
Container(
width: 40.w,
height: 40.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.r),
image: DecorationImage(
image: AssetImage(image),
fit: BoxFit.cover,
),
),
),
SizedBox(width: 8.w),
Expanded(
child: Text(
item,
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontFamily: 'hiragino',
fontWeight: FontWeight.w500,
),
overflow: TextOverflow.ellipsis,
),
),
Checkbox(
side: BorderSide(color: Color(0xFF434A53)),
value: selectedValues.contains(item),
activeColor: Color(0xFF434A53),
checkColor: Colors.white,
onChanged: (bool? value) {
if (value == true) {
selectedValues.add(item);
} else {
selectedValues.remove(item);
}
widget.onItemSelected(
selectedValues.join(', '));
},
),
],
),
),
if (index != widget.listData.length - 1)
Divider(thickness: 1, color: const Color(0xFF434A53)),
],
),
);
},
),
),
],

View File

@@ -136,6 +136,7 @@ Widget text14400white(String text) {
fontFamily: 'Helvetica'),
);
}
Widget text144005DFD63(String text) {
return Text(
text,
@@ -172,6 +173,18 @@ Widget text14700white(String text) {
);
}
Widget text17400white(String text) {
return Text(
text,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 17.sp,
color: AppColors.white,
fontWeight: FontWeight.w400,
fontFamily: 'Helvetica'),
);
}
Widget text20Black(String text) {
return Text(
text,
@@ -401,6 +414,19 @@ Widget text16w700_FCFCFC(String text) {
);
}
Widget text16w700_D90B2E(String text, {TextDecoration? decoration}) {
return Text(
text,
style: TextStyle(
decoration: decoration,
decorationColor: Color(0xFFD90B2E),
fontSize: 16.sp,
color: Color(0xFFD90B2E),
fontFamily: 'Helvetica',
fontWeight: FontWeight.w700),
);
}
Widget text16w700_FCFCFCblur(String text) {
return Text(
text,
@@ -526,6 +552,17 @@ Widget text11w400_FCFCFC(String text) {
);
}
Widget text11w400white(String text) {
return Text(
text,
style: TextStyle(
fontSize: 11.sp,
color: Colors.white,
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400),
);
}
Widget text18w400_FCFCFC(String text, {TextAlign? textAlign}) {
return Text(
text,

View File

@@ -26,11 +26,14 @@ class RouteName {
static const String savedposts = '/savedposts';
static const String cyclescreen = '/cyclescreen';
static const String postscreen = '/postscreen';
static const String reactionview = '/reactionview';
static const String postdetailsScreen = '/postdetailsScreen';
static const String mycommunity = '/mycommunity';
static const String communityDetails = '/communityDetails';
static const String communityInfo = '/communityInfo';
static const String announcement = '/announcement';
static const String watchlist = '/watchlist';
static const String group = '/group';
static const String communitysetting = '/communitysetting';
static const String editcommunity = '/editcommunity';
@@ -74,10 +77,24 @@ class RouteName {
static const String contactUs = '/contactUs';
static const String reportabug = '/reportabug';
static const String changepassword = '/changepassword';
static const String addtimeline = '/addtimeline';
static const String verifycode = '/verifycode';
//Group Tab
static const String grouptab = '/grouptab';
static const String requestedgroups = '/requestedgroups';
static const String groupdetail = '/groupdetail';
static const String groupsettings = '/groupsettings';
static const String groupmanage = '/groupmanage';
static const String groupinfo = '/groupinfo';
static const String newpost = '/newpost';
static const String groupevent = '/groupevent';
static const String notificaationpage = '/notificationpage';
}

View File

@@ -12,6 +12,15 @@ import 'package:regroup/Feed%20Module/Main_Screens/Chats/View/groupchat.dart';
import 'package:regroup/Feed%20Module/Main_Screens/Chats/View/newchatpage.dart';
import 'package:regroup/Feed%20Module/Main_Screens/Chats/View/newgroup.dart';
import 'package:regroup/Feed%20Module/Main_Screens/Chats/View/userchat.dart';
import 'package:regroup/Feed%20Module/Main_Screens/Community/PostDetailScreen/View/ReactionView.dart';
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/GoupSettings.dart';
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/GroupDetail.dart';
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/GroupEvent.dart';
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/GroupInfo.dart';
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/GroupManage.dart';
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/GroupTab.dart';
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/NewPost.dart';
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/RequestedGroups.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Badges/Badges.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Clubs/Clubs.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/EditProfile.dart';
@@ -30,7 +39,9 @@ import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/PrivacyPo
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/ReportABug.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/Settings.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/TermsCondition.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/VerifyCode.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Share%20profile/ShareProfile.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/TimeLine/AddTimeline.dart';
import 'package:regroup/Feed%20Module/Notification/View/notification.dart';
import 'package:regroup/Feed%20Module/sidemenu/Community/Admin/PopupItem/Community%20settings/CommunitySetting.dart';
@@ -43,6 +54,7 @@ import 'package:regroup/Feed%20Module/sidemenu/Community/Announcements/ManageMem
import 'package:regroup/Feed%20Module/sidemenu/Community/Announcements/NewAnnouncement/NewAnnounceent.dart';
import 'package:regroup/Feed%20Module/sidemenu/Community/MyCommunity/AddGroups.dart';
import 'package:regroup/Feed%20Module/sidemenu/Community/MyCommunity/NewCommunity.dart';
import 'package:regroup/Feed%20Module/sidemenu/Community/Watchlist.dart';
import 'package:regroup/Login/View/loginscreen.dart';
@@ -199,6 +211,10 @@ class AppRoutes {
name: RouteName.communitysetting,
page: () => const CommunitySetting(),
),
GetPage(
name: RouteName.reactionview,
page: () => const ReactionView(),
),
GetPage(
name: RouteName.editcommunity,
page: () => const EditCommunity(),
@@ -351,10 +367,53 @@ class AppRoutes {
name: RouteName.changepassword,
page: () => const ChangePassword(),
),
GetPage(
GetPage(
name: RouteName.notificaationpage,
page: () => const NotificationPage(),
),
GetPage(
name: RouteName.watchlist,
page: () => const Watchlist(),
),
GetPage(
name: RouteName.addtimeline,
page: () => const AddTimeline(),
),
GetPage(
name: RouteName.verifycode,
page: () => const VerifyCode(),
),
GetPage(
name: RouteName.grouptab,
page: () => const GroupTab(),
),
GetPage(
name: RouteName.requestedgroups,
page: () => const RequestedGroups(),
),
GetPage(
name: RouteName.groupdetail,
page: () => const GroupDetail(),
),
GetPage(
name: RouteName.groupsettings,
page: () => const GroupSettings(),
),
GetPage(
name: RouteName.groupmanage,
page: () => const GroupManage(),
),
GetPage(
name: RouteName.groupinfo,
page: () => const GroupInfo(),
),
GetPage(
name: RouteName.newpost,
page: () => const NewPost(),
),
GetPage(
name: RouteName.groupevent,
page: () => const GroupEvent(),
),
];
}