383 lines
16 KiB
Dart
383 lines
16 KiB
Dart
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/Utils/Common/CommonAppbar.dart';
|
|
import 'package:regroup/Utils/Common/sized_box.dart';
|
|
import 'package:regroup/Utils/texts.dart';
|
|
import 'package:regroup/resources/routes/route_name.dart';
|
|
|
|
class EventDetails extends StatefulWidget {
|
|
const EventDetails({super.key});
|
|
|
|
@override
|
|
State<EventDetails> createState() => _EventDetailsState();
|
|
}
|
|
|
|
class _EventDetailsState extends State<EventDetails> {
|
|
bool memberView = false;
|
|
bool adminView = true;
|
|
bool guestView = false;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
// key: _scaffoldKey1,
|
|
backgroundColor: const Color(0xFF222935),
|
|
extendBody: true,
|
|
resizeToAvoidBottomInset: false,
|
|
appBar: CommonAppbar(
|
|
titleTxt: "",
|
|
customActionWidget: Row(
|
|
children: [
|
|
InkWell(
|
|
onTap: () {
|
|
Get.toNamed(RouteName.addEvent);
|
|
},
|
|
child: commonGlassContainer(
|
|
width: 40.w,
|
|
height: 40.h,
|
|
borderradius: 100,
|
|
opacity1: 0.24,
|
|
opacity2: 0.24,
|
|
customWidget: Center(
|
|
child: Image.asset("assets/images/png/Vector536.png",
|
|
height: 17.h, width: 17.w),
|
|
),
|
|
border: 0.5),
|
|
),
|
|
sizedBoxWidth(12.w),
|
|
commonGlassContainer(
|
|
width: 40.w,
|
|
height: 40.h,
|
|
borderradius: 100,
|
|
opacity1: 0.24,
|
|
opacity2: 0.24,
|
|
customWidget: Center(
|
|
child: Image.asset("assets/images/png/Vector522.png",
|
|
height: 17.h, width: 17.w),
|
|
),
|
|
border: 0.5),
|
|
],
|
|
),
|
|
),
|
|
body: Stack(children: [
|
|
Container(
|
|
decoration: const BoxDecoration(
|
|
image: DecorationImage(
|
|
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
|
fit: BoxFit.fill)),
|
|
), SingleChildScrollView(
|
|
child: Column(
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
sizedBoxHeight(10.h),
|
|
SizedBox(
|
|
height: 260.h,
|
|
width: double.infinity,
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(10.r),
|
|
child: Image.asset(
|
|
"assets/images/png/Rectangle299.png",
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
),
|
|
sizedBoxHeight(20.h),
|
|
text18w700_FCFCFC("Sports challenge"),
|
|
sizedBoxHeight(16.h),
|
|
text14400whiteblur(
|
|
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer . . . "),
|
|
sizedBoxHeight(22.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/calender.png",
|
|
height: 17.h,
|
|
width: 17.w,
|
|
),
|
|
),
|
|
border: 0.5),
|
|
sizedBoxWidth(10.w),
|
|
text16400white("20th April 2024 - 21st April 2024"),
|
|
],
|
|
),
|
|
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/clock.png",
|
|
height: 17.h,
|
|
width: 17.w,
|
|
),
|
|
),
|
|
border: 0.5),
|
|
sizedBoxWidth(10.w),
|
|
text16400white("3 hours"),
|
|
],
|
|
),
|
|
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/Group 58645.png",
|
|
height: 17.h,
|
|
width: 17.w,
|
|
),
|
|
),
|
|
border: 0.5),
|
|
sizedBoxWidth(10.w),
|
|
text16400white("Elm street london, United Kingdom"),
|
|
],
|
|
),
|
|
]),
|
|
),
|
|
sizedBoxHeight(16.h),
|
|
Visibility(
|
|
visible: adminView,
|
|
child: Column(
|
|
children: [
|
|
commonDivider(),
|
|
sizedBoxHeight(16.h),
|
|
text18w700white("Are you attending this event ?"),
|
|
sizedBoxHeight(20.h),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
children: [
|
|
commonGlassContainer(
|
|
width: 87.w,
|
|
height: 40.h,
|
|
borderradius: 30.r,
|
|
customWidget:
|
|
Center(child: text16w400_white("Yes")),
|
|
border: 1),
|
|
commonGlassContainer(
|
|
width: 87.w,
|
|
height: 40.h,
|
|
borderradius: 30.r,
|
|
customWidget: Center(child: text16w400_white("No")),
|
|
border: 1),
|
|
commonGlassContainer(
|
|
width: 154.w,
|
|
height: 40.h,
|
|
borderradius: 30.r,
|
|
customWidget: Center(
|
|
child: text16w400_white("Not yet decided")),
|
|
border: 1),
|
|
],
|
|
),
|
|
sizedBoxHeight(20.h),
|
|
commonDivider(),
|
|
],
|
|
),
|
|
),
|
|
Visibility(
|
|
visible: guestView,
|
|
child: Column(
|
|
children: [
|
|
commonDivider(),
|
|
sizedBoxHeight(16.h),
|
|
text18w700white("Are you attending this event ?"),
|
|
sizedBoxHeight(20.h),
|
|
commonGlassContainer(
|
|
width: 221.w,
|
|
height: 40.h,
|
|
borderradius: 30.r,
|
|
customWidget:
|
|
Center(child: text16w400_white("Request to join")),
|
|
border: 1),
|
|
sizedBoxHeight(20.h),
|
|
commonDivider(),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
sizedBoxHeight(20.h),
|
|
text18w700white("Reminder"),
|
|
sizedBoxHeight(10.h),
|
|
Row(
|
|
children: [
|
|
Image.asset(
|
|
"assets/images/png/alarm 1 (traced).png",
|
|
height: 24.h,
|
|
width: 24.w,
|
|
),
|
|
sizedBoxWidth(10.w),
|
|
text16w400_white("10 minutes before")
|
|
],
|
|
),
|
|
sizedBoxHeight(20.h),
|
|
Visibility(
|
|
visible: adminView,
|
|
child: commonGlassContainer(
|
|
width: double.infinity,
|
|
height: 251.h,
|
|
borderradius: 10.r,
|
|
customWidget: Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 20),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
reminderWidget(
|
|
text: "Total invites", count: '150'),
|
|
sizedBoxHeight(16.h),
|
|
reminderWidget(text: "Attending", count: '78'),
|
|
sizedBoxHeight(16.h),
|
|
reminderWidget(
|
|
text: "Not attending", count: '35'),
|
|
sizedBoxHeight(16.h),
|
|
reminderWidget(
|
|
text: "Not deciding", count: '20'),
|
|
sizedBoxHeight(16.h),
|
|
reminderWidget(
|
|
text: "Waiting reply", count: '17'),
|
|
],
|
|
),
|
|
),
|
|
border: 1),
|
|
),
|
|
sizedBoxHeight(30.h),
|
|
Visibility(
|
|
visible: memberView,
|
|
child: commonGlassContainer(
|
|
width: double.infinity,
|
|
height: 65.h,
|
|
borderradius: 10.r,
|
|
customWidget: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
stackContainers2(containerImages: [
|
|
"assets/images/png/cimg3.png",
|
|
"assets/images/png/cimg2.png",
|
|
"assets/images/png/cimg3.png",
|
|
"assets/images/png/cimg2.png",
|
|
]),
|
|
sizedBoxHeight(10.h),
|
|
],
|
|
),
|
|
sizedBoxWidth(70.w),
|
|
text18w400white("90 Attending")
|
|
],
|
|
),
|
|
border: 1)),
|
|
text18w700white("Messages"),
|
|
sizedBoxHeight(20.h),
|
|
Row(
|
|
children: [
|
|
Image.asset(
|
|
"assets/images/png/Vector (5)3343.png",
|
|
height: 20.h,
|
|
width: 20.w,
|
|
),
|
|
sizedBoxWidth(10.w),
|
|
text16w400_white("Send message to invites"),
|
|
const Spacer(),
|
|
commonGlassContainer(
|
|
width: 98.w,
|
|
height: 30.h,
|
|
borderradius: 30.r,
|
|
customWidget:
|
|
Center(child: text14400white("Select")),
|
|
border: 1)
|
|
],
|
|
),
|
|
sizedBoxHeight(25.h),
|
|
commonGlassContainer(
|
|
width: double.infinity,
|
|
height: 240.h,
|
|
borderradius: 10.r,
|
|
customWidget: Padding(
|
|
padding: EdgeInsets.symmetric(horizontal: 80.w),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
const CircleAvatar(
|
|
radius: 33.5,
|
|
backgroundImage:
|
|
AssetImage("assets/images/png/cimg1.png"),
|
|
),
|
|
sizedBoxHeight(15.h),
|
|
text12400whiteblur("Organized By"),
|
|
text16w700white("Ryan dorwat"),
|
|
sizedBoxHeight(15.h),
|
|
commonDivider(),
|
|
sizedBoxHeight(15.h),
|
|
text12400whiteblur('Group'),
|
|
sizedBoxHeight(15.h),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
CircleAvatar(
|
|
radius: 12.5.r,
|
|
backgroundImage: const AssetImage(
|
|
"assets/images/png/img322.png"),
|
|
),
|
|
sizedBoxWidth(8.w),
|
|
text16w700white("Row row your boat"),
|
|
],
|
|
)
|
|
]),
|
|
),
|
|
border: 1),
|
|
sizedBoxHeight(50.h),
|
|
CommonBtn(text: "Join the event"),
|
|
sizedBoxHeight(40.h),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
))
|
|
]));
|
|
}
|
|
|
|
Widget reminderWidget({required String text, required String count}) {
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
child: Row(
|
|
children: [
|
|
Image.asset("assets/images/png/Red.png", height: 22.h, width: 16.w),
|
|
sizedBoxWidth(10.w),
|
|
SizedBox(width: 250.w, child: text16w400_white(text)),
|
|
const Spacer(),
|
|
text16400white(count),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|