Fix problem adding paypal
This commit is contained in:
parent
e46ab5e0fd
commit
a6a9c68b1c
|
|
@ -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),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue