Skip to content

Commit

Permalink
fix: chat item (#174)
Browse files Browse the repository at this point in the history
fix: chat item actions _getSlidableExtend now won't return over 1.0

chore(automated): Lint commit and format
  • Loading branch information
DE7924 authored Sep 6, 2024
1 parent 057defd commit 3ac64a7
Show file tree
Hide file tree
Showing 3 changed files with 441 additions and 370 deletions.
4 changes: 4 additions & 0 deletions lib/src/components/chat_item/chat_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ class ZetaChatItem extends ZetaStatelessWidget {
final actionWith = slidableActionsCount * Zeta.of(context).spacing.xl_10;
final maxButtonWidth = actionWith / maxScreenWidth;
final extend = actionWith / maxScreenWidth;
if (extend.clamp(0, maxButtonWidth).toDouble() > 1) {
return 1;
}
return extend.clamp(0, maxButtonWidth).toDouble();
}

Expand Down Expand Up @@ -279,6 +282,7 @@ class ZetaChatItem extends ZetaStatelessWidget {
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
if (subtitle != null)
Expand Down
Loading

0 comments on commit 3ac64a7

Please sign in to comment.