Bug: Using variable names with '$' creates syntax errors in generated file.
iamsupercode opened this issue · comments
iamsupercode commented
To Reproduce:
- Create A Page that takes a parameter named user$id
- Register Page in autoroutes
- Run flutter packages pub run build_runner build --delete-conflicting-outputs
- Check app_route.gr.dart for syntax errors
In my case the result is this result below. Note the bolded text.
`
// ....app_route.gr.dart
final String venue$id;
@OverRide
String toString() {
return 'ReservationBuilderRouteArgs{key: $key, onCreateReservation: $onCreateReservation, venue$id: $venue$id}';
}`
Muhammad Dafi commented
i don't know, why use $
for naming variable, just try revoke $
at your naming variable. it will solve the problem.
github-actions commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions