Files
Regroup/lib/Login/View/verifygoogleapple.dart
2024-07-11 19:18:16 +05:30

193 lines
7.3 KiB
Dart
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. 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/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:glassmorphism/glassmorphism.dart';
import 'package:regroup/Common/controller/CommonTextFormField.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CommonDropdown.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/dialogs.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
class Verifygoogleandapple extends StatefulWidget {
const Verifygoogleandapple({super.key});
@override
State<Verifygoogleandapple> createState() => _VerifygoogleandappleState();
}
class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
TextEditingController emailidcontroller = TextEditingController();
final Map<String, int> _accountTypeMap = {
'Individual': 1,
'Business': 2,
};
String _selectedAccountType = '';
void _onItemSelected(String value) {
setState(() {
_selectedAccountType = value;
});
}
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
child: Scaffold(
appBar: CommonAppbar(
titleTxt: '',
),
backgroundColor: Color.fromARGB(255, 18, 32, 47),
body: Stack(
children: [
Positioned(top: 310, right: -30, child: CommonBlurRightSecond()),
Positioned(top: 510, left: -30, child: CommonBlurLeftBlue()),
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),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(20.h),
text22400white('One more step to verify'),
sizedBoxHeight(10.h),
Container(
width: 154,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1,
strokeAlign: BorderSide.strokeAlignCenter,
color: Color(0xFF858585),
),
),
)),
sizedBoxHeight(20.h),
text14400white(
'Lorem Ipsum is simply dummy text of the printing and typesetting industry.'),
sizedBoxHeight(30.h),
text16400white('Full name'),
sizedBoxHeight(10.h),
CustomTextFormField(
textEditingController: emailidcontroller,
hintText: "Enter your email address",
leadingIcon:
// const Icon(Icons.mail_outline),
SizedBox(
width: 22.w,
height: 17.h,
child: Image.asset(
'assets/images/png/mail.png',
width: 22.w,
height: 17.h,
),
),
// validatorText: "Email Id",
validator: (value) {
if (value!.isEmpty) {
return 'Enter your e-mail address';
}
if (!RegExp(
r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')
.hasMatch(value)) {
return 'Enter a valid e-mail address';
}
return null;
},
inputFormatters: [
LengthLimitingTextInputFormatter(50),
RemoveEmojiInputFormatter()
],
),
sizedBoxHeight(10.h),
Row(
children: [
text16400white('Account type'),
sizedBoxWidth(5.w),
Image.asset('assets/images/png/informationicon.png')
],
),
sizedBoxHeight(10.h),
CustomDropDownRadio(
header: '',
title: '',
listData: [
'Individual',
'Business',
],
onItemSelected: _onItemSelected,
leadingImage: Image.asset(
'assets/images/png/user.png',
),
),
Spacer(
flex: 3,
),
CustomButton(
text: "Continue",
onPressed: () {
if (
// isValid!
emailidcontroller.text.isEmpty &&
_selectedAccountType.isEmpty) {
utils.showToast('Please fill all fields');
} else {
// Uploadata();
}
}),
Spacer(
)
],
),
),
)
],
),
),
);
}
}