-
-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Trailing Comma in the Dart File. #735
Comments
Yes, this will increase the size of files, but the increase will be marginal in general. We need to stick with a limit. Let's see how the 300 line maximum works. |
@StrangeNoob Can this be done automatically? That will help code consistency a lot. You are proposing a manual style change that may be difficult to enforce. |
I don't have an idea about automating. @sumitra19jha can we tweak analysis_options, so it can help us? Otherwise, we can look some of the plugins that might help? |
I don't think so. |
Still, when creating a single file to handle the business logic of a particular page and organise the code, we would need:
This will take space |
@sumitra19jha Sorry to disturb you, I came across |
Hi @StrangeNoob, So as you can see, this work is organizing the codebase. Simply splitting the dart class into two files using extend would destroy this whole purpose of refactoring. I am not saying we cannot do it, I am just saying the reason in my opinion doesn't fit our purpose. |
Hey @palisadoes. I have partially worked on this issue that is changing all the print statements into debugPrint for reducing the production junk in PR #744. It would be great if I could complete this issue. Can you assign it to me? Also, I think Flutter's formatting tool inserts these commas automatically. And won't be much of a trouble to manually add them. |
@nayakastha Done. |
* remove token * update marked-terminal
Issue Description
As we are in refactor mode, Adding trailing commas will increase the readability of the code. It will help us auto-format the code and auto-comment the ending widget.
Pros:
Cons:
Other Information
Instead of using print() to debug and view the output, the use of debugPrint() will be better than it won't show in the production.
Please ask mentors/maintainers to assign if you are willing to work on this issue.
I would to work on this but I have my exams starting tomorrow 😬. Let new member work on this.
The text was updated successfully, but these errors were encountered: