From ad457584c6cc8efb4a06c26459ba289cb6995ed9 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 31 Aug 2022 18:25:06 +1200 Subject: [PATCH] Replace deprecated arguments with replacements (#191) --- lib/src/themes/common_themes.dart | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/src/themes/common_themes.dart b/lib/src/themes/common_themes.dart index c0ab14131..4601654b3 100644 --- a/lib/src/themes/common_themes.dart +++ b/lib/src/themes/common_themes.dart @@ -70,7 +70,7 @@ final _outlinedButtonThemeData = OutlinedButtonThemeData( style: OutlinedButton.styleFrom( side: const BorderSide(color: Colors.black38, width: 0.3), visualDensity: _commonButtonStyle.visualDensity, - primary: YaruColors.textGrey, + foregroundColor: YaruColors.textGrey, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(kButtonRadius), ), @@ -84,7 +84,7 @@ final _darkOutlinedButtonThemeData = OutlinedButtonThemeData( borderRadius: BorderRadius.circular(kButtonRadius), ), visualDensity: _commonButtonStyle.visualDensity, - primary: Colors.white, + foregroundColor: Colors.white, ), ); @@ -100,10 +100,11 @@ final _textButtonThemeData = TextButtonThemeData( ElevatedButtonThemeData _getElevatedButtonThemeData(Color color) { return ElevatedButtonThemeData( style: ElevatedButton.styleFrom( - primary: color, - onPrimary: ThemeData.estimateBrightnessForColor(color) == Brightness.light - ? Colors.black - : Colors.white, + backgroundColor: color, + foregroundColor: + ThemeData.estimateBrightnessForColor(color) == Brightness.light + ? Colors.black + : Colors.white, visualDensity: _commonButtonStyle.visualDensity, elevation: 0, shape: RoundedRectangleBorder(