From 9153623a9341f3a039594509630be75ba614166c Mon Sep 17 00:00:00 2001 From: ggurdin Date: Fri, 14 Jun 2024 13:29:41 -0400 Subject: [PATCH] change deprecated class --- lib/pangea/widgets/igc/span_card.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/pangea/widgets/igc/span_card.dart b/lib/pangea/widgets/igc/span_card.dart index ff174b7bf..0d149eaec 100644 --- a/lib/pangea/widgets/igc/span_card.dart +++ b/lib/pangea/widgets/igc/span_card.dart @@ -251,7 +251,7 @@ class WordMatchContent extends StatelessWidget { opacity: 0.8, child: TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( AppConfig.primaryColor.withOpacity(0.1), ), ), @@ -272,13 +272,13 @@ class WordMatchContent extends StatelessWidget { if (!controller.widget.scm.pangeaMatch!.isITStart) Expanded( child: Opacity( - opacity: controller.selectedChoice != null ? 1.0 : 0.5, + opacity: controller.selectedChoiceIndex != null ? 1.0 : 0.5, child: TextButton( - onPressed: controller.selectedChoice != null + onPressed: controller.selectedChoiceIndex != null ? onReplaceSelected : null, style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( (controller.selectedChoice != null ? controller.selectedChoice!.color : AppConfig.primaryColor) @@ -286,7 +286,7 @@ class WordMatchContent extends StatelessWidget { ), // Outline if Replace button enabled side: controller.selectedChoice != null - ? MaterialStateProperty.all( + ? WidgetStateProperty.all( BorderSide( color: controller.selectedChoice!.color, style: BorderStyle.solid, @@ -311,7 +311,7 @@ class WordMatchContent extends StatelessWidget { ); }, style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( (AppConfig.primaryColor).withOpacity(0.1), ), ),