flutter_gen
flutter_gen copied to clipboard
Support numbers only file names
[SEVERE]
Could not format because the source could not be parsed:
line 105, column 25 of .: Methods must have an explicit list of parameters.
╷
105 │ AssetGenImage get 460 => const AssetGenImage('assets/images/placeholders/460.jpg');
A current workaround would be to rename all the files to e.g. p_460.jpg
我也出现了一样的问题。
Could not format because the source could not be parsed:
line 19, column 23 of .: Expected a class member.
╷
19 │ AssetGenImage get 3Arrows => const AssetGenImage('assets/icons/3_arrows.png');
│ ^
╵
line 19, column 24 of .: Methods must have an explicit list of parameters.
╷
19 │ AssetGenImage get 3Arrows => const AssetGenImage('assets/icons/3_arrows.png');
│ ^^^^^^
╵
line 19, column 19 of .: Expected to find ';'.
╷
19 │ AssetGenImage get 3Arrows => const AssetGenImage('assets/icons/3_arrows.png');
│ ^^^
╵
[INFO] Reading cached asset graph completed, took 325ms
将文件名改成字母开头可以正常生成
Same for me for file names like:
[email protected]