Fix problem adding paypal

This commit is contained in:
Hillel Coren 2020-06-04 21:41:56 +03:00
parent e46ab5e0fd
commit a6a9c68b1c
1 changed files with 10 additions and 10 deletions

View File

@ -378,17 +378,17 @@ class _GatewayConfigFieldState extends State<GatewayConfigField> {
if ('${widget.defaultValue}'.startsWith('[') && if ('${widget.defaultValue}'.startsWith('[') &&
'${widget.defaultValue}'.endsWith(']')) { '${widget.defaultValue}'.endsWith(']')) {
final options = [ final options = '${widget.defaultValue}'
'', .replaceFirst('[', '')
...'${widget.defaultValue}' .replaceFirst(']', '')
.replaceFirst('[', '') .split(',');
.replaceFirst(']', '')
.split(',')
];
final dynamic value =
widget.value == widget.defaultValue ? '' : widget.value;
return AppDropdownButton( final dynamic value =
(widget.value == null || widget.value == widget.defaultValue)
? ''
: widget.value;
return AppDropdownButton<String>(
labelText: toTitleCase(widget.field), labelText: toTitleCase(widget.field),
value: value, value: value,
onChanged: (dynamic value) => widget.onChanged(value), onChanged: (dynamic value) => widget.onChanged(value),