Skip to content

Commit

Permalink
fix: correção de background quando o botão é clicado
Browse files Browse the repository at this point in the history
  • Loading branch information
vitoramaral10 committed Nov 8, 2022
1 parent 4747fb1 commit 082ac15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/components/buttons/bt_button_outline.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class BTButtonOutline extends StatelessWidget {
)),
backgroundColor: MaterialStateProperty.all(Colors.white),
foregroundColor: MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.hovered)) {
if (states.contains(MaterialState.pressed) ||
states.contains(MaterialState.hovered)) {
return (backgroundColor ?? BTColors.primary).computeLuminance() >
0.5
? BTColors.dark
Expand Down

0 comments on commit 082ac15

Please sign in to comment.