Flutter error no named parameter with the name ‘scrollBehavior

Solution for Flutter error no named parameter with the name ‘scrollBehavior
is Given Below:

I am getting this error when I run the app. What can be problem? I try update my pods. But still I am getting same error. I have an M1 Mac.

    ↳
    objc[11258]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1efc22c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1184b82b8). One of the two will be used. Which one is undefined.
    objc[11258]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1efc22c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1184b8308). One of the two will be used. Which one is undefined.
    ** BUILD FAILED **
Xcode's output:
↳
    Pods-Runner-elvtjvosznfleaabicgoahubaeqy
    ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart:297:15: Error: No named parameter with the name 'scrollBehavior'.
                  scrollBehavior: scrollBehavior,
                  ^^^^^^^^^^^^^^
    ../../../development/flutter/packages/flutter/lib/src/material/app.dart:217:9: Context: Found this candidate, but the arguments don't match.
      const MaterialApp.router({
            ^^^^^^^^^^^^^^^^^^
    ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart:340:15: Error: No named parameter with the name 'scrollBehavior'.
                  scrollBehavior: scrollBehavior,
                  ^^^^^^^^^^^^^^
    ../../../development/flutter/packages/flutter/lib/src/material/app.dart:167:9: Context: Found this candidate, but the arguments don't match.
      const MaterialApp({
            ^^^^^^^^^^^
    Command PhaseScriptExecution failed with a nonzero exit code
    Pods-Runner-elvtjvosznfleaabicgoahubaeqy
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description

If you are using packages get or any packages that relating to get, basically the get latest version is not compatible with your project. Since I’m not directly using it, I go to pubspec.lock and change the version to 4.1.4 instead of the latest one 4.3.4.

if you are using fvm, check your “dart.flutterSdkPath” in setting.json, make sure the path is correct

// .vscode/settings.json

{
  "dart.flutterSdkPath": ".fvm/flutter_sdk",
  // Remove .fvm files from search
  "search.exclude": {
    "**/.fvm": true
  },
  // Remove from file watching
  "files.watcherExclude": {
    "**/.fvm": true
  }
}

https://fvm.app/docs/getting_started/configuration

Just open ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart file, and then delete all parameters with the name ‘scrollBehavior’.
This is how my problem was solved!

You are using get package latest version, but your flutter sdk version is old. so you need to update your flutter sdk. I resolved by updating flutter sdk to latest version. Basically getX is mapping GetMaterialApp.route() parameters with MaterialApp.route() parameters but sdk you have used is not latest one so MaterialApp.route() not contains the this.scrollBehavior parameter and getX is not able to map it.

You can resolve issue by two way:

1st You need to install latest flutter sdk or
2nd You need to downgrade getX package till it is compatible with your current flutter sdk.

enter image description here

You just have to delete the scrollBehavior feature completely so that you search for the feature and delete it Via:

C:/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.8/lib/get_navigation/src/root/get_material_app.dart