Avatar menu: same side inset as the Files list rows
The card was inset 16px from each screen edge; the list rows are 12px, so it read as narrower. Now NooSpace.sm, with a test on the account row's width. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
8805bafb97
commit
c5b46fd493
@@ -79,7 +79,9 @@ class _AvatarMenuContentState extends State<_AvatarMenuContent> {
|
||||
child: SafeArea(
|
||||
bottom: false,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: NooSpace.md),
|
||||
// Same side inset as the Files list's rows (`NooSpace.sm`), so the
|
||||
// card is as wide as the list beneath it.
|
||||
padding: const EdgeInsets.symmetric(horizontal: NooSpace.sm),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: Container(
|
||||
|
||||
@@ -219,5 +219,9 @@ void main() {
|
||||
tester.getTopRight(row).dx - tester.getTopRight(avatar).dx,
|
||||
NooSpace.md,
|
||||
);
|
||||
// The card is as wide as the Files list's rows: inset NooSpace.sm from
|
||||
// each screen edge, less its 1px border and 1px inner padding per side.
|
||||
final screenWidth = tester.getSize(find.byType(MaterialApp)).width;
|
||||
expect(tester.getSize(row).width, screenWidth - 2 * NooSpace.sm - 4);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user