fixed overlapping of password strength indicator in reset password screen

This commit is contained in:
ashilkn 2022-06-15 14:14:17 +05:30
parent 69546f8cca
commit bc9751208b
2 changed files with 70 additions and 138 deletions

View file

@ -248,7 +248,7 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
},
),
),
Padding(padding: EdgeInsets.all(4)),
const SizedBox(height: 8),
Padding(
padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
child: TextFormField(

View file

@ -266,9 +266,7 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
focusNode: _password1FocusNode,
),
),
Padding(padding: EdgeInsets.all(4)),
Stack(
children: <Widget>[
const SizedBox(height: 8),
Padding(
padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
child: TextFormField(
@ -276,11 +274,9 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
controller: _passwordController2,
obscureText: !_password2Visible,
autofillHints: const [AutofillHints.newPassword],
onEditingComplete: () =>
TextInput.finishAutofillContext(),
onEditingComplete: () => TextInput.finishAutofillContext(),
decoration: InputDecoration(
fillColor:
_passwordsMatch ? _validFieldValueColor : null,
fillColor: _passwordsMatch ? _validFieldValueColor : null,
filled: true,
hintText: "Confirm password",
contentPadding: EdgeInsets.symmetric(
@ -330,57 +326,12 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
},
),
),
Visibility(
visible:
((_passwordInInputBox != '') && _password1InFocus),
child: Positioned(
bottom: 24,
child: Row(
children: [
SizedBox(
width: MediaQuery.of(context).size.width,
Opacity(
opacity:
(_passwordInInputBox != '') && _password1InFocus ? 1 : 0,
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 20,
),
child: Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
spreadRadius: 0.5,
color: Theme.of(context).hintColor,
offset: Offset(0, -0.325),
),
],
borderRadius: BorderRadius.only(
topLeft: Radius.zero,
topRight: Radius.zero,
bottomLeft: Radius.circular(5),
bottomRight: Radius.circular(5),
),
color: Theme.of(context)
.dialogTheme
.backgroundColor,
),
width: double.infinity,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.fromLTRB(
4.0,
4,
4.0,
4.0,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
padding:
const EdgeInsets.symmetric(horizontal: 20, vertical: 8),
child: Text(
'Password Strength: $passwordStrengthText',
style: TextStyle(
@ -388,27 +339,8 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
),
),
),
],
),
),
],
),
),
),
),
SizedBox(
width: 20,
),
],
),
),
),
],
clipBehavior: Clip.none,
),
SizedBox(
height: 50,
),
const SizedBox(height: 8),
GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {