Files
Regroup/lib/onboarding/Signup/View/Business/step3SelectCommunity.dart
2024-07-01 19:58:39 +05:30

314 lines
13 KiB
Dart

import 'package:flutter/cupertino.dart';
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/Utils/Common/CustomNextButton.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:regroup/resources/routes/route_name.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
class SelectBusinessCommunity extends StatefulWidget {
const SelectBusinessCommunity({super.key});
@override
State<SelectBusinessCommunity> createState() =>
_SelectBusinessCommunityState();
}
class _SelectBusinessCommunityState extends State<SelectBusinessCommunity> {
TextEditingController searchcontroller = TextEditingController();
// StreamController<BlogsModel> blogsController = StreamController();
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color.fromARGB(255, 18, 32, 47),
body: Stack(
children: [
Positioned(top: 70, left: -30, child: CommonBlurLeftSecond()),
Positioned(top: 400, right: -30, child: CommonBlurRightSecond()),
Positioned(top: 630, left: -30, child: CommonBlurLeftBlue()),
SingleChildScrollView(
child: GlassmorphicContainer(
width: MediaQuery.of(context).size.width,
height:
// 500.h,
MediaQuery.of(context).size.height,
borderRadius: 2,
blur: 6,
alignment: Alignment.bottomLeft,
border: 2,
linearGradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color(0XFF222935).withOpacity(0.60),
Color(0XFF222935).withOpacity(0.60),
Color(0XFF222935).withOpacity(0.60),
Color(0XFF222935).withOpacity(0.60),
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
],
),
borderGradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
Color(0XFF222935).withOpacity(0.60),
Color(0XFF222935).withOpacity(0.60),
],
),
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 16.w, vertical: 50.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Align(
alignment: Alignment.topRight,
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.communitycommitscreen);
},
child: Text(
'Skip',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400,
decoration: TextDecoration.underline,
decorationColor: Colors.white),
),
),
),
sizedBoxHeight(30.h),
Align(
alignment: Alignment.center,
child: text16400white('Step 3 of 3')),
sizedBoxHeight(20.h),
Container(
width: 358.w,
height: 25.h,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1, color: Color(0xFF434A53)),
borderRadius: BorderRadius.circular(30),
),
),
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 8.w, vertical: 2.h),
child: Row(
children: [
Container(
width: 273.w,
height: 15.h,
decoration: ShapeDecoration(
gradient: LinearGradient(
begin: Alignment(0.98, -0.21),
end: Alignment(-0.98, 0.21),
colors: [
Color(0xA5D90B2E),
Color(0x42D90B2E)
],
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
width: 15,
height: 15,
decoration: ShapeDecoration(
gradient: LinearGradient(
begin: Alignment(0.98, -0.21),
end: Alignment(-0.98, 0.21),
colors: [
Color(0xFFD90B2E),
Color(0x60D90B2E)
],
),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(30),
),
),
)
],
))
],
),
),
),
sizedBoxHeight(40.h),
Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
text20400white('Find your community'),
sizedBoxWidth(5.w),
Image.asset(
'assets/images/png/informationicon.png',
)
],
)),
sizedBoxHeight(10.w),
Center(
child: Container(
width: 108.w,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1,
strokeAlign: BorderSide.strokeAlignCenter,
color: Color(0xFF858585),
),
),
),
),
),
sizedBoxHeight(30.h),
SearchTextFormField(
textEditingController: searchcontroller,
texttype: TextInputType.text,
hintText: "Search groups",
isInputPassword: false,
suffixIcon:
// const Icon(Icons.mail_outline),
// SvgPicture.asset(
// // width: 23.w,
// // height: 23.h,
// 'assets/images/svg/search.svg',
// ),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Icon(
Icons.search,
size: 35,
color: Colors.white,
),
),
// validatorText: "Enter your full name",
inputFormatters: [
// LengthLimitingTextInputFormatter(20),
RemoveEmojiInputFormatter(),
],
),
sizedBoxHeight(30.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CommunitySelect(
titleString: 'Active alliance network ',
image: 'assets/images/png/community1.png'),
CommunitySelect(
titleString: 'Fitfam federation',
image: 'assets/images/png/community2.png'),
],
),
sizedBoxHeight(30.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CommunitySelect(
titleString: 'The athletic town',
image:
'assets/images/png/groupindividual3.png'),
CommunitySelect(
titleString: 'Football Fever',
image: 'assets/images/png/community3.png'),
],
),
Spacer(flex: 1),
CustomButton(
text: "Continue",
onPressed: () {
Get.toNamed(RouteName.communitycommitscreen);
})
],
),
)),
),
],
));
}
}
class CommunitySelect extends StatefulWidget {
final String titleString;
final String image;
CommunitySelect({
Key? key,
required this.titleString,
required this.image,
}) : super(key: key);
@override
State<CommunitySelect> createState() => _CommunitySelectState();
}
class _CommunitySelectState extends State<CommunitySelect> {
bool _text = false;
@override
Widget build(BuildContext context) {
return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Container(
width: 169,
height: 74,
decoration: ShapeDecoration(
image: DecorationImage(
image: AssetImage(
// "https://via.placeholder.com/169x74"
widget.image),
fit: BoxFit.fill,
),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
),
),
sizedBoxHeight(15.h),
text12400white(widget.titleString),
sizedBoxHeight(15.h),
GestureDetector(
onTap: () {
setState(() {
_text = !_text;
});
},
child: Container(
width: 169,
height: 23,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(width: 1, color: Color(0xFFFF002B)),
borderRadius: BorderRadius.circular(30),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
_text ? text10400white('Regrouping') : text10400white('Join')
],
),
),
),
]);
}
}