The one card with a button is the one with a crooked arrow
Four of the charging cards fold from a header that is a single button: the title at the left, the arrow hard against the right edge. The fifth has a refresh button in its header, and that button was placed after the toggle — so the arrow ended up a button's width in from the edge, alone among the five, and the eye finds it by searching rather than by knowing where it is. The header now spends its width the way the others do. The heading keeps the title and stays the drag handle, the refresh button takes the place beside the edge, and the arrow is its own control at the end of the row. It folds the card exactly as the heading does, so nothing that worked before stops working; only the order changed. The same layout lives in the Phone App's _FoldCard, with the same fault, so the arrow moves past the action slot there too. All five cards share that widget and only this one passes an action, which is why the other four look identical before and after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
2425a8d3d6
commit
197ff73a39
@@ -461,13 +461,20 @@ class _FoldCard extends StatelessWidget {
|
||||
style: const TextStyle(fontSize: 15, fontWeight: FontWeight.w600)),
|
||||
),
|
||||
if (badge != null) ...[badge!, const SizedBox(width: 8)],
|
||||
Icon(open ? Icons.expand_more : Icons.chevron_right,
|
||||
size: 20, color: DriverVault.muted(context)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (action != null) action!,
|
||||
// The fold arrow belongs hard against the right edge, past the
|
||||
// action, so a card with a header button is not the one whose
|
||||
// arrow sits somewhere else. It folds the card like the heading.
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: onToggle,
|
||||
child: Icon(open ? Icons.expand_more : Icons.chevron_right,
|
||||
size: 20, color: DriverVault.muted(context)),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (open) ...children,
|
||||
|
||||
Reference in New Issue
Block a user