From 57abe706ee6791f123e87b2707a6cd7fc9c5356a Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Tue, 17 Dec 2024 20:45:26 +0100 Subject: [PATCH] fix lints for flutter 3.27.0 --- lib/pages/login.dart | 4 +++- lib/widgets/materialiconbutton.dart | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/pages/login.dart b/lib/pages/login.dart index 6efe44cf..f2c9a566 100644 --- a/lib/pages/login.dart +++ b/lib/pages/login.dart @@ -133,7 +133,9 @@ class _LoginPageState extends State { (Set newSelection) { _hostFocusNode.requestFocus(); if (!UriScheme.valid(newSelection.first) || - _uriScheme == newSelection.first) return; + _uriScheme == newSelection.first) { + return; + } String currentUrl = _hostTextController.text; String oldScheme, newScheme; if (UriScheme.isHttp(newSelection.first)) { diff --git a/lib/widgets/materialiconbutton.dart b/lib/widgets/materialiconbutton.dart index fd2927c4..f3882cf7 100644 --- a/lib/widgets/materialiconbutton.dart +++ b/lib/widgets/materialiconbutton.dart @@ -31,10 +31,10 @@ class MaterialIconButton extends StatelessWidget { style: IconButton.styleFrom( foregroundColor: foregroundColor ?? colors.onPrimary, backgroundColor: backgroundColor ?? colors.primary, - disabledBackgroundColor: colors.onSurface.withOpacity(0.12), - hoverColor: colors.onPrimary.withOpacity(0.08), - focusColor: colors.onPrimary.withOpacity(0.12), - highlightColor: colors.onPrimary.withOpacity(0.12), + disabledBackgroundColor: colors.onSurface.withAlpha(31), // was: 0.12 + hoverColor: colors.onPrimary.withAlpha(20), // was: 0.08 + focusColor: colors.onPrimary.withAlpha(31), // was: 0.12 + highlightColor: colors.onPrimary.withAlpha(31), // was: 0.12 ), iconSize: iconSize, onPressed: onPressed,