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),
|
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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue