fix: prevent invite role dropdown overflow
This commit is contained in:
parent
bd177cedcc
commit
c412eda221
1 changed files with 16 additions and 2 deletions
|
|
@ -173,20 +173,34 @@ class _ManageCollectionScreenState extends State<ManageCollectionScreen> {
|
|||
),
|
||||
const SizedBox(height: 12),
|
||||
DropdownButtonFormField<String>(
|
||||
isExpanded: true,
|
||||
initialValue: inviteRole,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Role',
|
||||
prefixIcon: Icon(Icons.security_outlined),
|
||||
),
|
||||
items: const [
|
||||
DropdownMenuItem(value: 'member', child: Text('Member (can add/copy/edit)')),
|
||||
DropdownMenuItem(value: 'viewer', child: Text('Viewer (read-only)')),
|
||||
DropdownMenuItem(value: 'member', child: Text('Member')),
|
||||
DropdownMenuItem(value: 'viewer', child: Text('Viewer')),
|
||||
],
|
||||
onChanged: (value) {
|
||||
if (value == null) return;
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in a new issue