Skip to content

Commit 9809c31

Browse files
Merge pull request #226 from lohanidamodar/fix-dart-flutter
fix dart-flutter enum removal residue
2 parents 96c41c4 + d7e55ff commit 9809c31

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

templates/dart/lib/services/service.dart.twig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ part of {{ language.params.packageName }};
55
{% macro method_parameters(parameters) %}
66
{% if parameters.all|length > 0 %}{{ '{' }}{% for parameter in parameters.all %}{{ _self.parameter(parameter) }}{% if not loop.last %}, {% endif %}{% endfor %}{{ '}' }}{% endif %}
77
{% endmacro %}
8-
{% macro map_parameter(parameter) %}
9-
{% if parameter.name == 'orderType' %}'{{ parameter.name }}': {{ parameter.name | caseCamel }}{% if parameter.required %}{% else %}?{% endif %}.name(),{% else %}
10-
'{{ parameter.name }}': {{ parameter.name | caseCamel }},{% endif %}
11-
{% endmacro %}
8+
{% macro map_parameter(parameter) %}'{{ parameter.name }}': {{ parameter.name | caseCamel }},{% endmacro %}
129

1310
class {{ service.name | caseUcfirst }} extends Service {
1411
{{ service.name | caseUcfirst }}(Client client): super(client);

templates/flutter/lib/services/service.dart.twig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ part of {{ language.params.packageName }};
55
{% macro method_parameters(parameters) %}
66
{% if parameters.all|length > 0 %}{{ '{' }}{% for parameter in parameters.all %}{{ _self.parameter(parameter) }}{% if not loop.last %}, {% endif %}{% endfor %}{{ '}' }}{% endif %}
77
{% endmacro %}
8-
{% macro map_parameter(parameter) %}
9-
{% if parameter.name == 'orderType' %}'{{ parameter.name }}': {{ parameter.name | caseCamel }}{% if parameter.required %}{% else %}?{% endif %}.name(),{% else %}
10-
'{{ parameter.name }}': {{ parameter.name | caseCamel }},{% endif %}
11-
{% endmacro %}
8+
{% macro map_parameter(parameter) %}'{{ parameter.name }}': {{ parameter.name | caseCamel }},{% endmacro %}
129

1310
class {{ service.name | caseUcfirst }} extends Service {
1411
{{ service.name | caseUcfirst }}(Client client): super(client);

0 commit comments

Comments
 (0)