fix(reporting): prevent report reason dropdown overflow on small widths

This commit is contained in:
Lukas Müllner 2026-03-04 16:53:25 +01:00
parent 1be830b16f
commit b67483db4e

View file

@ -1207,7 +1207,7 @@ class _ReportCarDialogState extends State<_ReportCarDialog> {
'Wrong model name', 'Wrong model name',
'Wrong series or year', 'Wrong series or year',
'Duplicate catalog entry', 'Duplicate catalog entry',
'Inappropriate or invalid image', 'Invalid image',
'Other', 'Other',
]; ];
@ -1241,6 +1241,7 @@ class _ReportCarDialogState extends State<_ReportCarDialog> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
DropdownButtonFormField<String>( DropdownButtonFormField<String>(
isExpanded: true,
initialValue: _selectedReason, initialValue: _selectedReason,
decoration: const InputDecoration( decoration: const InputDecoration(
labelText: 'Reason', labelText: 'Reason',
@ -1249,7 +1250,11 @@ class _ReportCarDialogState extends State<_ReportCarDialog> {
.map( .map(
(reason) => DropdownMenuItem<String>( (reason) => DropdownMenuItem<String>(
value: reason, value: reason,
child: Text(reason), child: Text(
reason,
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
), ),
) )
.toList(), .toList(),