-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
dart fix doesn't work on pub dev package #52233
Comments
I think the feature isn't even supported for non-flutter packages yet |
Update 2: You need 2 steps to fix this issue:
import 'package:go_router/go_router.dart'; |
@ahmednfwela thanks for looking into this. I knew this is not officially supported, but I still decide to give a try so that go_router customers can still benefit from this. Hi @lrhn , it would be good to know if dart plan to support this use case or not. |
after some trial and error, I finally found a way to fix this in this PR flutter/packages#3877 |
…3877) a workaround for dart-lang/sdk#52233 for consumers to use this fix while it's being reviewed/published: 1. copy this [fix_data.yaml](https://github.com/Bdaya-Dev/packages/blob/280bb99050a7a8083d3e73cf5a63e66d18ab64f8/packages/go_router/lib/fix_data.yaml) file with the correct uris from this PR to your project's `lib` folder 2. ensure each file that needs to be fixed using `dart fix` imports the `go_router` package directly, and not proxied via some other `exports`: ```dart import 'package:go_router/go_router.dart'; ```
…lutter#3877) a workaround for dart-lang/sdk#52233 for consumers to use this fix while it's being reviewed/published: 1. copy this [fix_data.yaml](https://github.com/Bdaya-Dev/packages/blob/280bb99050a7a8083d3e73cf5a63e66d18ab64f8/packages/go_router/lib/fix_data.yaml) file with the correct uris from this PR to your project's `lib` folder 2. ensure each file that needs to be fixed using `dart fix` imports the `go_router` package directly, and not proxied via some other `exports`: ```dart import 'package:go_router/go_router.dart'; ```
Bug: Change-Id: I1d98420ce20ec6d52baef5683ae1ab83b21066e8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342103 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Step to reproduce:
expected result:
The
state.queryParams['abc']
should be replaced withstate.queryParameters['abc']
actual result:
nothing happens
The fix_data for this entry is in https://github.com/flutter/packages/blob/c3f4c46bbbf1d5d8ad980850aacc82955d187b64/packages/go_router/lib/fix_data.yaml#L109
Note: if in step 3 you replace go_router with path dependency and do a flutter pub get again, dart fix work as expected
The text was updated successfully, but these errors were encountered: