433 lines
18 KiB
Dart
433 lines
18 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/CommonDropDown.dart';
|
|
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/CustomNextButton.dart';
|
|
import 'package:regroup/Utils/Common/blureffect.dart';
|
|
import 'package:regroup/Utils/Common/sized_box.dart';
|
|
import 'package:regroup/Utils/texts.dart';
|
|
|
|
class AddEvent extends StatefulWidget {
|
|
const AddEvent({super.key});
|
|
|
|
@override
|
|
State<AddEvent> createState() => _AddEventState();
|
|
}
|
|
|
|
class _AddEventState extends State<AddEvent> {
|
|
RxBool isChecked = false.obs;
|
|
@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",
|
|
),
|
|
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"),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
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(16.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(16.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(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(
|
|
children: [
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
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)
|
|
],
|
|
),
|
|
Spacer(),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
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)
|
|
],
|
|
),
|
|
],
|
|
),
|
|
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(16.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(16.h),
|
|
text16400white("Add Users"),
|
|
sizedBoxHeight(14.h),
|
|
CustomTextFormField(
|
|
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",
|
|
),
|
|
sizedBoxHeight(25.h),
|
|
text16400white("Reminder"),
|
|
sizedBoxHeight(22.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);
|
|
}
|
|
}
|