check type isNotEmpty

This commit is contained in:
mohammad
2025-01-13 15:40:38 +03:00
parent 20a9f19480
commit db7eaa53af

View File

@ -60,7 +60,7 @@ class _RoleDropdownState extends State<RoleDropdown> {
return DropdownMenuItem<String>(
value: role.uuid,
child: Text(
' ${role.type[0].toUpperCase()}${role.type.substring(1)}',
' ${role.type.isNotEmpty ? role.type[0].toUpperCase() : ''}${role.type.substring(1)}',
),
);
}).toList(),