Merge pull request #327 from pangeachat/only-replace-correct
Span card only replaces with correct choice
This commit is contained in:
commit
c5677e4562
1 changed files with 13 additions and 3 deletions
|
|
@ -251,7 +251,7 @@ class WordMatchContent extends StatelessWidget {
|
|||
opacity: 0.8,
|
||||
child: TextButton(
|
||||
style: ButtonStyle(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
backgroundColor: WidgetStateProperty.all<Color>(
|
||||
AppConfig.primaryColor.withOpacity(0.1),
|
||||
),
|
||||
),
|
||||
|
|
@ -278,12 +278,22 @@ class WordMatchContent extends StatelessWidget {
|
|||
? onReplaceSelected
|
||||
: null,
|
||||
style: ButtonStyle(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
backgroundColor: WidgetStateProperty.all<Color>(
|
||||
(controller.selectedChoice != null
|
||||
? controller.selectedChoice!.color
|
||||
: AppConfig.primaryColor)
|
||||
.withOpacity(0.2),
|
||||
),
|
||||
// Outline if Replace button enabled
|
||||
side: controller.selectedChoice != null
|
||||
? WidgetStateProperty.all(
|
||||
BorderSide(
|
||||
color: controller.selectedChoice!.color,
|
||||
style: BorderStyle.solid,
|
||||
width: 2.0,
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
child: Text(L10n.of(context)!.replace),
|
||||
),
|
||||
|
|
@ -301,7 +311,7 @@ class WordMatchContent extends StatelessWidget {
|
|||
);
|
||||
},
|
||||
style: ButtonStyle(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
backgroundColor: WidgetStateProperty.all<Color>(
|
||||
(AppConfig.primaryColor).withOpacity(0.1),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue