Closed jaustin42 closed 7 months ago
A proposal would be to just suffix the variable with a underscore, so do_
, in_
, etc. This will still make it easy to discovery (with IDE autocompletion) and is minimally invasive.
I'll take a look at fixing this for you.
As a FYI If https://github.com/dart-lang/language/issues/271 was approved, we could write `in`
Ok, I spent a little more time on this than I should have :) (and I'm not a maintainer of this project, so I hope they accept the change). My PR is #433
There are a few other issues that cite similar problems, #250, and #346, that will be fixed by my PR.
The strategy is as follows:
1) Convert the asset file name, to a valid dart identifier, that is
Ok, I spent a little more time on this than I should have :) (and I'm not a maintainer of this project, so I hope they accept the change). My PR is #433
There are a few other issues that cite similar problems, #250, and #346, that will be fixed by my PR.
The strategy is as follows:
Convert the asset file name, to a valid dart identifier, that is
- Replace non ASCII chars with ASCII.
- Ensure the name starts with a letter (not number or _).
- Style the name per the camelCase or snakeCase rules.
- Use the asset name without extension. If unique and not a dart reserved word use that.
- Use the asset name with extension. If unique and not a dart reserved word use that.
- If there are any collisions, append a underscore suffix to each item until they are unique.
I like the general strategy. Let's try it then we can find edges when users start using it, it's not a big deal.
Is there an existing issue for this?
Describe the problem
We have some files named with region codes. India, Israel, and Dominican Republic cause an issue:
Describe the solution
It seems the easiest way around that would be to optionally prefix all the filenames when generating that code.
Additional context
No response
Code of Conduct