Hi I’ve been testing my app with Xcode and had no issues, but after recently updating flutter, I’m getting this error and have tried all the solutions on the forums but nothing seems to work yet:
Error (Xcode): lib/flutter_flow/nav/nav.dart:383:14: Error: The getter ‘queryParameters’
isn’t defined for the class ‘GoRouterState’.
Could not build the application for the simulator.
Error launching application on iPhone 15 Pro Max.
Code Block where it is failing:
extension _GoRouterStateExtensions on GoRouterState {
Map<String, dynamic> get extraMap =>
extra != null ? extra as Map<String, dynamic> : {};
Map<String, dynamic> get allParams => <String, dynamic>{}
..addAll(pathParameters)
..addAll(queryParameters)
..addAll(extraMap);
TransitionInfo get transitionInfo => extraMap.containsKey(kTransitionInfoKey)
? extraMap[kTransitionInfoKey] as TransitionInfo
: TransitionInfo.appDefault();
}
class FFParameters {
FFParameters(this.state, [this.asyncParams = const {}]);
final GoRouterState state;
final Map<String, Future<dynamic> Function(String)> asyncParams;
Map<String, dynamic> futureParamValues = {};
When I run flutter pub get:
Resolving dependencies... (1.4s)
_fe_analyzer_shared 61.0.0 (65.0.0 available)
analyzer 5.13.0 (6.3.0 available)
flutter_facebook_auth_platform_interface 3.2.0 (5.0.0 available)
flutter_facebook_auth_web 3.2.0 (5.0.0 available)
google_api_headers 1.6.0 (3.1.0 available)
google_fonts 4.0.4 (6.1.0 available)
http 0.13.6 (1.1.1 available)
material_color_utilities 0.5.0 (0.8.0 available)
meta 1.10.0 (1.11.0 available)
package_info_plus 4.2.0 (5.0.1 available)
pigeon 11.0.1 (14.0.0 available)
shared_preferences_ios 2.1.1 (discontinued replaced by shared_preferences_foundation)
uuid 3.0.7 (4.2.1 available)
web 0.3.0 (0.4.0 available)
Got dependencies!
1 package is discontinued.
13 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
I’ve tried to run flutter pub outdated, and get the following:
Showing outdated packages.
indicates versions that are not the latest available.
Package Name Current Upgradable Resolvable Latest
direct dependencies:
google_fonts *4.0.4 *4.0.4 *4.0.4 6.1.0
package_info_plus *4.2.0 *4.2.0 *4.2.0 5.0.1
dev_dependencies: all up-to-date.
You are already using the newest resolvable versions listed in the 'Resolvable' column.
Newer versions, listed in 'Latest', may not be mutually compatible.
Any guidance on troubleshooting would be greatly appreciated.
Thank you!
Brendan
2
Answers
Ended up having to downgrade to prior version of flutter. Thanks @EdwynZN for the help.
Maybe after upgrading flutter and pub get go_router got upgraded too (which seems more likely because flutter pub outdated didn’t mention go_router as stale) and now after version 10.0.0 you need to use uri instead of
queryParameters
as a getter, more info at Migrating to 10.0.0You can change your extension to use the getter from uri which has queryParameters (this is the new implementation)