Flutter错误没有名为“scrollBehavior”的命名参数

ali*_*ali 2 ios cocoapods flutter

当我运行该应用程序时,我收到此错误。可能有什么问题?我尝试更新我的 pod。但我仍然遇到同样的错误。我有一台 M1 Mac。

\n
    \xe2\x86\xb3\n    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.\n    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.\n    ** BUILD FAILED **\nXcode's output:\n\xe2\x86\xb3\n    Pods-Runner-elvtjvosznfleaabicgoahubaeqy\n    ../../../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'.\n                  scrollBehavior: scrollBehavior,\n                  ^^^^^^^^^^^^^^\n    ../../../development/flutter/packages/flutter/lib/src/material/app.dart:217:9: Context: Found this candidate, but the arguments don't match.\n      const MaterialApp.router({\n            ^^^^^^^^^^^^^^^^^^\n    ../../../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'.\n                  scrollBehavior: scrollBehavior,\n                  ^^^^^^^^^^^^^^\n    ../../../development/flutter/packages/flutter/lib/src/material/app.dart:167:9: Context: Found this candidate, but the arguments don't match.\n      const MaterialApp({\n            ^^^^^^^^^^^\n    Command PhaseScriptExecution failed with a nonzero exit code\n    Pods-Runner-elvtjvosznfleaabicgoahubaeqy\n    note: Using new build system\n    note: Building targets in parallel\n    note: Planning build\n    note: Analyzing workspace\n    note: Constructing build description\n
Run Code Online (Sandbox Code Playgroud)\n

小智 7

如果您正在使用packages get或任何与get相关的包,基本上get最新版本与您的项目不兼容。由于我没有直接使用它,因此我转到 pubspec.lock 并将版本更改为 4.1.4,而不是最新的 4.3.4。