fix: explicitly add fill colour for textFields with filled flag set to true for it to remain the same as before using material 3

This commit is contained in:
ashilkn 2024-04-12 13:38:47 +05:30
parent 6607fce144
commit 8137825693
10 changed files with 24 additions and 9 deletions

View file

@ -148,7 +148,9 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
style: Theme.of(context).textTheme.titleMedium,
autofillHints: const [AutofillHints.email],
decoration: InputDecoration(
fillColor: _emailIsValid ? _validFieldValueColor : null,
fillColor: _emailIsValid
? _validFieldValueColor
: getEnteColorScheme(context).fillFaint,
filled: true,
hintText: S.of(context).email,
contentPadding: const EdgeInsets.symmetric(
@ -195,8 +197,9 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
enableSuggestions: true,
autofillHints: const [AutofillHints.newPassword],
decoration: InputDecoration(
fillColor:
_passwordIsValid ? _validFieldValueColor : null,
fillColor: _passwordIsValid
? _validFieldValueColor
: getEnteColorScheme(context).fillFaint,
filled: true,
hintText: S.of(context).password,
contentPadding: const EdgeInsets.symmetric(
@ -265,7 +268,7 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
decoration: InputDecoration(
fillColor: _passwordsMatch && _passwordIsValid
? _validFieldValueColor
: null,
: getEnteColorScheme(context).fillFaint,
filled: true,
hintText: S.of(context).confirmPassword,
contentPadding: const EdgeInsets.symmetric(
@ -343,7 +346,7 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
child: TextFormField(
style: Theme.of(context).textTheme.titleMedium,
decoration: InputDecoration(
fillColor: null,
fillColor: getEnteColorScheme(context).fillFaint,
filled: true,
contentPadding: const EdgeInsets.symmetric(
horizontal: 16,

View file

@ -237,7 +237,7 @@ class _LoginPageState extends State<LoginPage> {
if (_emailIsValid) {
_emailInputFieldColor = const Color.fromRGBO(45, 194, 98, 0.2);
} else {
_emailInputFieldColor = null;
_emailInputFieldColor = getEnteColorScheme(context).fillFaint;
}
}
}

View file

@ -251,6 +251,7 @@ class _LoginPasswordVerificationPageState
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(6),
),
fillColor: getEnteColorScheme(context).fillFaint,
suffixIcon: _passwordInFocus
? IconButton(
icon: Icon(

View file

@ -171,6 +171,7 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(6),
),
fillColor: getEnteColorScheme(context).fillFaint,
),
controller: _verificationCodeController,
autofocus: false,

View file

@ -12,6 +12,7 @@ import "package:photos/generated/l10n.dart";
import "package:photos/l10n/l10n.dart";
import "package:photos/models/key_gen_result.dart";
import 'package:photos/services/user_service.dart';
import "package:photos/theme/ente_theme.dart";
import 'package:photos/ui/account/recovery_key_page.dart';
import 'package:photos/ui/common/dynamic_fab.dart';
import 'package:photos/ui/common/web_page.dart';
@ -218,8 +219,9 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
child: TextFormField(
autofillHints: const [AutofillHints.newPassword],
decoration: InputDecoration(
fillColor:
_isPasswordValid ? _validFieldValueColor : null,
fillColor: _isPasswordValid
? _validFieldValueColor
: getEnteColorScheme(context).fillFaint,
filled: true,
hintText: S.of(context).password,
contentPadding: const EdgeInsets.all(20),
@ -282,7 +284,9 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
autofillHints: const [AutofillHints.newPassword],
onEditingComplete: () => TextInput.finishAutofillContext(),
decoration: InputDecoration(
fillColor: _passwordsMatch ? _validFieldValueColor : null,
fillColor: _passwordsMatch
? _validFieldValueColor
: getEnteColorScheme(context).fillFaint,
filled: true,
hintText: S.of(context).confirmPassword,
contentPadding: const EdgeInsets.symmetric(

View file

@ -222,6 +222,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
decoration: InputDecoration(
hintText: S.of(context).enterYourPassword,
filled: true,
fillColor: getEnteColorScheme(context).fillFaint,
contentPadding: const EdgeInsets.all(20),
border: UnderlineInputBorder(
borderSide: BorderSide.none,

View file

@ -103,6 +103,7 @@ class _RecoveryPageState extends State<RecoveryPage> {
child: TextFormField(
decoration: InputDecoration(
filled: true,
fillColor: getEnteColorScheme(context).fillFaint,
hintText: S.of(context).enterYourRecoveryKey,
contentPadding: const EdgeInsets.all(20),
border: UnderlineInputBorder(

View file

@ -174,6 +174,7 @@ class _RequestPasswordVerificationPageState
decoration: InputDecoration(
hintText: context.l10n.enterYourPassword,
filled: true,
fillColor: getEnteColorScheme(context).fillFaint,
contentPadding: const EdgeInsets.all(20),
border: UnderlineInputBorder(
borderSide: BorderSide.none,

View file

@ -11,6 +11,7 @@ import "package:photos/generated/l10n.dart";
import 'package:photos/services/local_authentication_service.dart';
import 'package:photos/services/user_remote_flag_service.dart';
import 'package:photos/services/user_service.dart';
import "package:photos/theme/ente_theme.dart";
import 'package:photos/ui/account/recovery_key_page.dart';
import 'package:photos/ui/common/gradient_button.dart';
import 'package:photos/ui/components/buttons/button_widget.dart';
@ -162,6 +163,7 @@ class _VerifyRecoveryPageState extends State<VerifyRecoveryPage> {
TextFormField(
decoration: InputDecoration(
filled: true,
fillColor: getEnteColorScheme(context).fillFaint,
hintText: S.of(context).enterYourRecoveryKey,
contentPadding: const EdgeInsets.all(20),
border: UnderlineInputBorder(

View file

@ -142,6 +142,7 @@ class SearchWidgetState extends State<SearchWidget> {
//TODO: Extract string
hintText: "Search",
filled: true,
fillColor: getEnteColorScheme(context).fillFaint,
border: const UnderlineInputBorder(
borderSide: BorderSide.none,
),