Files
Regroup/lib/onboarding/Signup/View/communitycommitment.dart
2024-08-01 13:35:58 +05:30

246 lines
10 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Utils/Common/CustomNextButton.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
class Communitycommitment extends StatefulWidget {
const Communitycommitment({super.key});
@override
State<Communitycommitment> createState() => _CommunitycommitmentState();
}
class _CommunitycommitmentState extends State<Communitycommitment> {
final ScrollController _scrollController = ScrollController();
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color.fromARGB(255, 18, 32, 47),
body: Stack(
children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 50.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// SvgPicture.asset('assets/images/svg/redregroupicon.svg'),
Image.asset('assets/images/png/redregroup.png'),
sizedBoxHeight(30.h),
Container(
width: 358.w,
height: 519.h,
decoration: ShapeDecoration(
gradient: LinearGradient(
begin: Alignment(0.98, -0.21),
end: Alignment(-0.98, 0.21),
colors: [
Colors.white.withOpacity(0.05999999865889549),
Colors.white.withOpacity(0.07999999821186066)
],
),
shape: RoundedRectangleBorder(
side: BorderSide(width: 0.80, color: Color(0xFF434A53)),
borderRadius: BorderRadius.circular(5),
),
),
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 16.w, vertical: 0.h),
child: Scrollbar(
thumbVisibility: true,
radius: Radius.circular(20.r),
// thickness: 6,
controller: _scrollController,
child: SingleChildScrollView(
controller: _scrollController,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(10.h),
text16400white('Our community commitment'),
sizedBoxHeight(10.h),
Container(
width: 222.w,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1,
strokeAlign: BorderSide.strokeAlignCenter,
color: Color(0xFF858585),
),
),
),
),
sizedBoxHeight(20.h),
text20400white(
'Regroup is a community where everyone ca belong'),
sizedBoxHeight(15.h),
text16400white(
'''Lorem ipsum dolor sit amet, consectetur adipis elit. Ut et massa mi. Aliquam in hendrerit urna.\n\nPellentesque sit amet sapien fringilla, mattis ligula consectetur, ultrices mauris. Maecenas vitae mattis tellus. Nullam quis imperdiet augue. Vestibulum auctor ornare leo, non suscipit magna interdum eu. Curabitur pellentesque nibh nibh, at maximus ante fermentum sit amet. Pellentesque commodo lacus at sodales sodales. Quisque sagittis orci ut diam condimentum, vel euismod erat placerat. In iaculis arcu eros, Quisque sagittis orci ut diam condimentum, vel euismod erat placerat. In iaculis arcu eros, Quisque sagittis orci ut diam condimentum, vel euismod erat placerat. '''),
sizedBoxHeight(10.h),
],
),
),
),
),
),
Spacer(
flex: 2,
),
CustomButton(
text: 'Agree & continue',
onPressed: () {
Get.toNamed(RouteName.signupendpage);
}),
sizedBoxHeight(20.h),
CustomButton2(
text: 'Decline',
onPressed: () {
alertdialogwidget();
// Get.offAllNamed(RouteName.loginScreen);
})
],
),
)
],
));
}
alertdialogwidget() {
Get.dialog(Dialog(
// backgroundColor: Colors.transparent,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.r),
color: const Color(0xFF222935)),
child: Padding(
padding: EdgeInsets.only(
right: 16.w, left: 16.w, top: 20.h, bottom: 40.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
text16w400_FCFCFC("Are you sure you dont want to be \nNice?",
textAlign: TextAlign.center),
sizedBoxHeight(16.h),
Row(
children: [
InkWell(
onTap: () {
Get.back();
dialogwidget();
Future.delayed(Duration(seconds: 2), () {
Get.back();
Get.toNamed(RouteName.signupendpage);
});
},
child: Container(
// width: 120.w,
height: 40.h,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color.fromRGBO(255, 255, 255, 0.036),
Color.fromRGBO(255, 255, 255, 0.048),
],
),
border: Border.all(
color: Color(0xFF434A53),
width: 1.0,
),
borderRadius: BorderRadius.circular(30.r)),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child:
Center(child: text14400white("Yes, I am evil")),
),
),
),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.signupendpage);
},
child: Container(
// height: 40.h,
// width: 120.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
borderRadius: BorderRadius.circular(30.r),
),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 20.w),
child: Center(
child: text14w400_FCFCFC(
"No, I want \nto be Nice")),
),
),
)
],
)
],
),
),
),
],
),
));
}
dialogwidget() {
Get.dialog(Dialog(
// backgroundColor: Colors.transparent,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.r),
color: const Color(0xFF222935)),
child: Padding(
padding: EdgeInsets.only(
right: 80.w, left: 80.w, top: 20.h, bottom: 40.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"assets/images/png/Group 1000004420.png",
height: 66.h,
width: 66.w,
),
sizedBoxHeight(14.w),
SizedBox(
width: 182.w,
child: text16w400_FCFCFC(
"Nah, I know youre nice person...",
textAlign: TextAlign.center),
),
sizedBoxHeight(16.h),
],
),
),
),
],
),
));
}
}