189 lines
7.1 KiB
Dart
189 lines
7.1 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/CommonDropdown.dart';
|
|
import 'package:regroup/Utils/Common/CustomTextformfield.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();
|
|
|
|
final List<String> _dropdownProductItems = [
|
|
'Individual',
|
|
'Business',
|
|
];
|
|
|
|
String _selectedAccountType = '';
|
|
|
|
void _onItemSelected(String value) {
|
|
setState(() {
|
|
_selectedAccountType = value;
|
|
});
|
|
}
|
|
|
|
RxBool isChecked = false.obs;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
resizeToAvoidBottomInset: false,
|
|
// key: _scaffoldKey1,
|
|
backgroundColor: Color(0xFF222935),
|
|
extendBody: true,
|
|
appBar: CommonAppbar(
|
|
titleTxt: "Add timeline",
|
|
),
|
|
body: Stack(children: [
|
|
Container(
|
|
decoration: const BoxDecoration(
|
|
image: DecorationImage(
|
|
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
|
fit: BoxFit.fill)),
|
|
),
|
|
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")
|
|
],
|
|
),
|
|
],
|
|
),
|
|
)
|
|
],
|
|
),
|
|
text16400white("Ability"),
|
|
sizedBoxHeight(15.h),
|
|
CustomDropDownWidgetSignup(
|
|
header: 'Select ability',
|
|
title: '',
|
|
listData: _dropdownProductItems,
|
|
onItemSelected: _onItemSelected,
|
|
// leadingImage:
|
|
// Image.asset(
|
|
// 'assets/images/png/user.png',
|
|
// ),
|
|
),
|
|
sizedBoxHeight(80.h),
|
|
Padding(
|
|
padding: EdgeInsets.symmetric(horizontal: 20.w),
|
|
child: CommonBtn(text: "Add timeline"),
|
|
),
|
|
]),
|
|
))
|
|
]));
|
|
}
|
|
}
|