Skip to content

Commit 3ac64a7

Browse files
authored
fix: chat item (#174)
fix: chat item actions _getSlidableExtend now won't return over 1.0 chore(automated): Lint commit and format
1 parent 057defd commit 3ac64a7

File tree

3 files changed

+441
-370
lines changed

3 files changed

+441
-370
lines changed

lib/src/components/chat_item/chat_item.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ class ZetaChatItem extends ZetaStatelessWidget {
115115
final actionWith = slidableActionsCount * Zeta.of(context).spacing.xl_10;
116116
final maxButtonWidth = actionWith / maxScreenWidth;
117117
final extend = actionWith / maxScreenWidth;
118+
if (extend.clamp(0, maxButtonWidth).toDouble() > 1) {
119+
return 1;
120+
}
118121
return extend.clamp(0, maxButtonWidth).toDouble();
119122
}
120123

@@ -279,6 +282,7 @@ class ZetaChatItem extends ZetaStatelessWidget {
279282
],
280283
),
281284
Row(
285+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
282286
crossAxisAlignment: CrossAxisAlignment.end,
283287
children: [
284288
if (subtitle != null)

0 commit comments

Comments
 (0)