diff --git a/lib/pages/changePassword.dart b/lib/pages/changePassword.dart index 216dfdf..5cba1ae 100755 --- a/lib/pages/changePassword.dart +++ b/lib/pages/changePassword.dart @@ -208,7 +208,8 @@ class _changesPasswordState extends State { 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 { // ), 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 { // height: _size.height * 0.1, // ), Container( - alignment: Alignment.center, + alignment: Responsive.isDesktop(context) ? Alignment.center : Alignment.bottomCenter, padding: EdgeInsets.symmetric(vertical: 8), child: RichText( diff --git a/lib/pages/email_verify.dart b/lib/pages/email_verify.dart index 7b3a782..4af3076 100755 --- a/lib/pages/email_verify.dart +++ b/lib/pages/email_verify.dart @@ -934,7 +934,7 @@ class _MyEmailVerifyState extends State { ), 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 { 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( diff --git a/lib/pages/login.dart b/lib/pages/login.dart index d376d7a..e8e0ac8 100755 --- a/lib/pages/login.dart +++ b/lib/pages/login.dart @@ -1097,7 +1097,7 @@ class _loginState extends State { 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 { ), 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 { 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 { }, ), ), - 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),