Skip to content

Conversation

lohanidamodar
Copy link
Member

No description provided.

Copy link
Member

@abnegate abnegate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, much easier to manage, my only suggestion would be moving the api, file and oauth templates to a separate directory like requests or similar to keep concerns isolated

@lohanidamodar
Copy link
Member Author

Looks good, much easier to manage, my only suggestion would be moving the api, file and oauth templates to a separate directory like requests or similar to keep concerns isolated

Well I added those to a separate directory called base as these are base templates or parts of templates. May be components/requests might be a better name for the directory. Let me know what you think sounds better.

@abnegate
Copy link
Member

Yep sounds good

{% endif %}
};

{% if method.type == 'location' %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a separate template for location as well? This will help us keep this template dead simple.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@@ -0,0 +1,5 @@
{% macro parameter(parameter) %}{% if parameter.required %}required {{ parameter.type | typeName }}{% else %}{{ parameter.type | typeName }}?{% endif %} {{ parameter.name | caseCamel | escapeKeyword }}{% endmacro %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this as an individual template? Can it be just part of the service template? If not, I'm not sure macros is the most intuitive name.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It I keep these in service, I can't call the function in api.twig or other included template files, keeping this in separate file allows us to import and use it in any template files. so we can define all macros in a separate file and import and use from any file. What might be a better name? functions or utils ?

@lohanidamodar lohanidamodar changed the title WIP - Flutter template refactoring Flutter & Dart template refactoring Jun 14, 2022
@lohanidamodar lohanidamodar marked this pull request as ready for review June 14, 2022 02:11
Copy link
Contributor

@Meldiron Meldiron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it! LGTM

@lohanidamodar lohanidamodar merged commit c089b58 into master Jun 14, 2022
@lohanidamodar lohanidamodar deleted the feat-refactor branch June 14, 2022 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants