fix: prevent invite role dropdown overflow

This commit is contained in:
Lukas Müllner 2026-03-05 10:49:55 +01:00
parent bd177cedcc
commit c412eda221

View file

@ -173,20 +173,34 @@ class _ManageCollectionScreenState extends State<ManageCollectionScreen> {
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
DropdownButtonFormField<String>( DropdownButtonFormField<String>(
isExpanded: true,
initialValue: inviteRole, initialValue: inviteRole,
decoration: const InputDecoration( decoration: const InputDecoration(
labelText: 'Role', labelText: 'Role',
prefixIcon: Icon(Icons.security_outlined), prefixIcon: Icon(Icons.security_outlined),
), ),
items: const [ items: const [
DropdownMenuItem(value: 'member', child: Text('Member (can add/copy/edit)')), DropdownMenuItem(value: 'member', child: Text('Member')),
DropdownMenuItem(value: 'viewer', child: Text('Viewer (read-only)')), DropdownMenuItem(value: 'viewer', child: Text('Viewer')),
], ],
onChanged: (value) { onChanged: (value) {
if (value == null) return; if (value == null) return;
setSheetState(() => inviteRole = value); setSheetState(() => inviteRole = value);
}, },
), ),
const SizedBox(height: 8),
Align(
alignment: Alignment.centerLeft,
child: Text(
inviteRole == 'viewer'
? 'Viewer: read-only access.'
: 'Member: can add, copy, edit, and remove cars.',
style: const TextStyle(
fontSize: 12,
color: AppColors.textSecondary,
),
),
),
], ],
), ),
), ),