diff --git a/lib/ui/company_gateway/edit/company_gateway_edit.dart b/lib/ui/company_gateway/edit/company_gateway_edit.dart index 1d6340967..ca55f4098 100644 --- a/lib/ui/company_gateway/edit/company_gateway_edit.dart +++ b/lib/ui/company_gateway/edit/company_gateway_edit.dart @@ -378,17 +378,17 @@ class _GatewayConfigFieldState extends State { if ('${widget.defaultValue}'.startsWith('[') && '${widget.defaultValue}'.endsWith(']')) { - final options = [ - '', - ...'${widget.defaultValue}' - .replaceFirst('[', '') - .replaceFirst(']', '') - .split(',') - ]; - final dynamic value = - widget.value == widget.defaultValue ? '' : widget.value; + final options = '${widget.defaultValue}' + .replaceFirst('[', '') + .replaceFirst(']', '') + .split(','); - return AppDropdownButton( + final dynamic value = + (widget.value == null || widget.value == widget.defaultValue) + ? '' + : widget.value; + + return AppDropdownButton( labelText: toTitleCase(widget.field), value: value, onChanged: (dynamic value) => widget.onChanged(value),