Skip to content

Commit

Permalink
fix: add braces to fab color (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelukewalton authored Jun 24, 2024
1 parent e81510c commit 82c5feb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/src/components/fabs/fab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,15 @@ class _ZetaFABState extends State<ZetaFAB> {
padding: const WidgetStatePropertyAll(EdgeInsets.zero),
shape: WidgetStatePropertyAll(widget.shape.buttonShape(isExpanded: isExpanded, size: widget.size)),
backgroundColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.disabled)) return Zeta.of(context).colors.surfaceDisabled;
if (states.contains(WidgetState.hovered)) return colors.hover;
if (states.contains(WidgetState.pressed)) return colors.selected;
if (states.contains(WidgetState.disabled)) {
return Zeta.of(context).colors.surfaceDisabled;
}
if (states.contains(WidgetState.hovered)) {
return colors.hover;
}
if (states.contains(WidgetState.pressed)) {
return colors.selected;
}
return backgroundColor;
}),
side: WidgetStateProperty.resolveWith(
Expand Down

0 comments on commit 82c5feb

Please sign in to comment.