From 82c5febf32a0529493d886e3f8c3290071bbce53 Mon Sep 17 00:00:00 2001 From: Luke Walton Date: Mon, 24 Jun 2024 11:30:01 +0100 Subject: [PATCH] fix: add braces to fab color (#110) --- lib/src/components/fabs/fab.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/src/components/fabs/fab.dart b/lib/src/components/fabs/fab.dart index f091510c..e05ea4c5 100644 --- a/lib/src/components/fabs/fab.dart +++ b/lib/src/components/fabs/fab.dart @@ -117,9 +117,15 @@ class _ZetaFABState extends State { 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(