Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Refactor ChipSurface to improve layout constraints and alignment handling

AmanRajSinghMourya30a2549f97b9
diff --git a/mobile/packages/ente_components/lib/components/chip_surface.dart b/mobile/packages/ente_components/lib/components/chip_surface.dart
index c7ce488548..4284505e3c 100644
--- a/mobile/packages/ente_components/lib/components/chip_surface.dart
+++ b/mobile/packages/ente_components/lib/components/chip_surface.dart
@@ -42,11 +42,12 @@ class ChipSurface extends StatelessWidget {
key: surfaceKey,
duration: Motion.quick,
curve: Curves.easeInOutCubic,
- height: height,
- constraints: minWidth == null
- ? null
- : BoxConstraints(minWidth: minWidth!),
+ constraints: BoxConstraints(
+ minHeight: height,
+ minWidth: minWidth ?? 0,
+ ),
padding: padding,
+ alignment: Alignment.center,
decoration: BoxDecoration(
color: background,
borderRadius: borderRadius,