-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ondevexp-data-driven-fixesIssues with the analysis server's support for data-driven fixesIssues with the analysis server's support for data-driven fixesdevexp-serverIssues related to some aspect of the analysis serverIssues related to some aspect of the analysis serverlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.
Description
Step to reproduce:
- do a Flutter create
- in main.dart, use the following code
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
runApp(
MaterialApp.router(
routerConfig: GoRouter(
routes: [GoRoute(
name: 'home',
path: '/',
redirect: (context, state) {
print('named lcation ${state.queryParams['abc']}');
return null;
},
builder: (_, state) {
return Text('${state.fullPath}');
}
)]
),
),
);
}
- in pubspec.yaml, adds the following dependecies
go_router: ^7.0.0
- run dart fix --apply
expected result:
The state.queryParams['abc']
should be replaced with state.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
go_router:
path: /Users/chtai/git/packages/packages/go_router/
ahmednfwela, mono0926 and franticn
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ondevexp-data-driven-fixesIssues with the analysis server's support for data-driven fixesIssues with the analysis server's support for data-driven fixesdevexp-serverIssues related to some aspect of the analysis serverIssues related to some aspect of the analysis serverlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.