Browse Source

Layout fixes for ChipButtonWidget

ashilkn 2 years ago
parent
commit
573ee901c8
1 changed files with 10 additions and 8 deletions
  1. 10 8
      lib/ui/components/buttons/chip_button_widget.dart

+ 10 - 8
lib/ui/components/buttons/chip_button_widget.dart

@@ -37,14 +37,16 @@ class ChipButtonWidget extends StatelessWidget {
                       size: 17,
                       size: 17,
                     )
                     )
                   : const SizedBox.shrink(),
                   : const SizedBox.shrink(),
-              const SizedBox(width: 4),
-              Padding(
-                padding: const EdgeInsets.symmetric(horizontal: 4),
-                child: Text(
-                  label ?? "",
-                  style: getEnteTextTheme(context).smallBold,
-                ),
-              )
+              if (label != null && leadingIcon != null)
+                const SizedBox(width: 4),
+              if (label != null)
+                Padding(
+                  padding: const EdgeInsets.symmetric(horizontal: 4),
+                  child: Text(
+                    label!,
+                    style: getEnteTextTheme(context).smallBold,
+                  ),
+                )
             ],
             ],
           ),
           ),
         ),
         ),