FIX_Mobile View Alignment
This commit is contained in:
parent
24f532f750
commit
da493a11da
@ -208,7 +208,8 @@ class _changesPasswordState extends State<changesPassword> {
|
||||
body: SingleChildScrollView(
|
||||
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
|
||||
child: Container(
|
||||
constraints: BoxConstraints(minHeight: _size.height),
|
||||
height: Responsive.isDesktop(context) ? null : _size.height,
|
||||
constraints: Responsive.isDesktop(context) ? BoxConstraints(minHeight: _size.height) : null,
|
||||
color: Colors.white,
|
||||
child: Stack(
|
||||
children: [
|
||||
@ -295,7 +296,7 @@ class _changesPasswordState extends State<changesPassword> {
|
||||
// ),
|
||||
Container(
|
||||
margin: marginInsets,
|
||||
alignment: Alignment.topCenter,
|
||||
alignment: Responsive.isDesktop(context) ? Alignment.topCenter : Alignment.bottomCenter,
|
||||
child: SingleChildScrollView(
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
@ -664,7 +665,7 @@ class _changesPasswordState extends State<changesPassword> {
|
||||
// height: _size.height * 0.1,
|
||||
// ),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
alignment: Responsive.isDesktop(context) ? Alignment.center : Alignment.bottomCenter,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 8),
|
||||
child: RichText(
|
||||
|
||||
@ -934,7 +934,7 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
|
||||
),
|
||||
Container(
|
||||
margin: marginInsets,
|
||||
alignment: Alignment.center,
|
||||
alignment: Responsive.isDesktop(context) ? Alignment.center : Alignment.bottomCenter,
|
||||
child: SingleChildScrollView(
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
@ -1275,13 +1275,13 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
|
||||
SizedBox(
|
||||
height: Responsive.isDesktop(context)
|
||||
? _size.height * 0.2
|
||||
: _size.height * 0.15,
|
||||
: _size.height * 0.3,
|
||||
),
|
||||
// SizedBox(
|
||||
// height: _size.height * 0.1,
|
||||
// ),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
alignment: Responsive.isDesktop(context) ? Alignment.center : Alignment.bottomCenter,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 8),
|
||||
child: RichText(
|
||||
|
||||
@ -1097,7 +1097,7 @@ class _loginState extends State<login> {
|
||||
child: Image.asset(
|
||||
'assets/nhance_app_logo.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: Responsive.isDesktop(context) ? 150 : 100,
|
||||
)),
|
||||
),
|
||||
if (!Responsive.isMobile(context) &&
|
||||
@ -1148,7 +1148,7 @@ class _loginState extends State<login> {
|
||||
),
|
||||
Container(
|
||||
margin: marginInsets,
|
||||
alignment: Alignment.center,
|
||||
alignment: Responsive.isDesktop(context) ? Alignment.center : Alignment.bottomCenter,
|
||||
child: SingleChildScrollView(
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
@ -1159,7 +1159,9 @@ class _loginState extends State<login> {
|
||||
Expanded(
|
||||
flex: _size.width < 1100 ? 6 : 12,
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 20),
|
||||
margin: _size.width > 1100
|
||||
? EdgeInsets.only(left: 20, right: 20)
|
||||
: EdgeInsets.only(left: 0, right: 0),
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
@ -1675,114 +1677,76 @@ class _loginState extends State<login> {
|
||||
},
|
||||
),
|
||||
),
|
||||
if (otpFieldShow &&
|
||||
clickedForgotPassword) ...[
|
||||
if (otpFieldShow && clickedForgotPassword) ...[
|
||||
const SizedBox(height: 10),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
'OTP',
|
||||
style: TextStyle(
|
||||
fontSize: Responsive
|
||||
.isMobile(
|
||||
context)
|
||||
? 14
|
||||
: 18,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w600,
|
||||
color:
|
||||
Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10),
|
||||
Container(
|
||||
alignment:
|
||||
Alignment.center,
|
||||
margin: Responsive
|
||||
.isDesktop(
|
||||
context)
|
||||
? const EdgeInsets
|
||||
.symmetric(
|
||||
horizontal:
|
||||
150)
|
||||
: const EdgeInsets
|
||||
.symmetric(
|
||||
horizontal:
|
||||
0),
|
||||
child: Pinput(
|
||||
length: 6,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter
|
||||
.digitsOnly,
|
||||
],
|
||||
keyboardType:
|
||||
TextInputType
|
||||
.number,
|
||||
showCursor: true,
|
||||
controller:
|
||||
_otpController,
|
||||
validator:
|
||||
(value) {
|
||||
if (value ==
|
||||
null ||
|
||||
value
|
||||
.isEmpty) {
|
||||
return 'Please enter OTP';
|
||||
}
|
||||
if (value
|
||||
.length <
|
||||
6) {
|
||||
return 'OTP must be 6 digits';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10),
|
||||
Container(
|
||||
margin: Responsive
|
||||
.isDesktop(
|
||||
context)
|
||||
? const EdgeInsets
|
||||
.symmetric(
|
||||
horizontal:
|
||||
150)
|
||||
: const EdgeInsets
|
||||
.symmetric(
|
||||
horizontal:
|
||||
0),
|
||||
alignment: Alignment
|
||||
.centerRight,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
otpFieldShow =
|
||||
false;
|
||||
});
|
||||
resendOTP();
|
||||
},
|
||||
mouseCursor:
|
||||
SystemMouseCursors
|
||||
.click,
|
||||
AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
switchInCurve: Curves.easeInOutCirc,
|
||||
switchOutCurve: Curves.easeOutCirc,
|
||||
child: Column(
|
||||
key: const ValueKey('otp_block'),
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
'Didn’t Receive Code?',
|
||||
style: GoogleFonts
|
||||
.poppins(
|
||||
color: Colors
|
||||
.blue,
|
||||
fontSize: 14,
|
||||
'OTP',
|
||||
style: TextStyle(
|
||||
fontSize: Responsive.isMobile(context) ? 14 : 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 10),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
margin: Responsive.isDesktop(context)
|
||||
? const EdgeInsets.symmetric(horizontal: 150)
|
||||
: const EdgeInsets.symmetric(horizontal: 0),
|
||||
child: Pinput(
|
||||
length: 6,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
],
|
||||
keyboardType: TextInputType.number,
|
||||
showCursor: true,
|
||||
controller: _otpController,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter OTP';
|
||||
}
|
||||
if (value.length < 6) {
|
||||
return 'OTP must be 6 digits';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Container(
|
||||
margin: Responsive.isDesktop(context)
|
||||
? const EdgeInsets.symmetric(horizontal: 150)
|
||||
: const EdgeInsets.symmetric(horizontal: 0),
|
||||
alignment: Alignment.centerRight,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
otpFieldShow = false;
|
||||
});
|
||||
resendOTP();
|
||||
},
|
||||
mouseCursor: SystemMouseCursors.click,
|
||||
child: Text(
|
||||
'Didn\'t Receive Code?',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.blue,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
SizedBox(height: 20),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user