Skip to content

Commit

Permalink
fix: getSlidableExtend now won't return over 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DE7924 committed Sep 5, 2024
1 parent 17eb8b5 commit e6e11be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/components/list_item/notification_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ class ZetaNotificationListItem 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

0 comments on commit e6e11be

Please sign in to comment.