flutter_gen icon indicating copy to clipboard operation
flutter_gen copied to clipboard

error when png name is start with number

Open hello-soon opened this issue 3 years ago • 5 comments

assets/images/olp/2.png

image

hello-soon avatar Jun 03 '22 15:06 hello-soon

you have to rename image file to image1 or something not start with a number because dart doesn't allow that

Linkadi98 avatar Jun 20 '22 08:06 Linkadi98

I don't think this should error though. By default it should either be ignored / warned about in the build runner output or replace any invalid characters with e.g. an _ as well as prepend it with an _ if required.

DevNico avatar Jul 18 '23 06:07 DevNico

you have to rename image file to image1 or something not start with a number because dart doesn't allow that

Hi, is it a good idea if the package provided a handling for this case??

EchoEllet avatar Nov 14 '23 06:11 EchoEllet

you have to rename image file to image1 or something not start with a number because dart doesn't allow that

Hi, is it a good idea if the package provided a handling for this case??

I think the package should do what it does, this issue is depended on us IMO. The package only should show specific error to us and has nothing to do with this issue.

Linkadi98 avatar Nov 14 '23 06:11 Linkadi98

I tried to fix this, and just naming issues here: https://github.com/FlutterGen/flutter_gen/pull/433. Just waiting for a review

bramp avatar Nov 14 '23 06:11 bramp