Skip to content
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

No named parameter with the name 'primary'. #105

Closed
hjlp20150803 opened this issue Dec 15, 2023 · 3 comments · Fixed by #104
Closed

No named parameter with the name 'primary'. #105

hjlp20150803 opened this issue Dec 15, 2023 · 3 comments · Fixed by #104

Comments

@hjlp20150803
Copy link

Describe the bug
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-000210183AFA401E }
{ platform:macOS, arch:x86_64, id:00006000-000210183AFA401E }
../../.pub-cache/hosted/pub.flutter-io.cn/group_button-5.3.3/lib/src/group_button_item.dart:92:9: Error: No named parameter with the name 'primary'.
primary: _getBackgroundColor(theme),
^^^^^^^
../../flutter/packages/flutter/lib/src/material/elevated_button.dart:151:22: Context: Found this candidate, but the arguments don't match.
static ButtonStyle styleFrom({
^^^^^^^^^
Target kernel_snapshot failed: Exception

Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')
** BUILD FAILED **

To Reproduce
Steps to reproduce the behavior:
flutter build macos

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macos
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]
  • flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel master, 3.18.0-11.0.pre.74, on macOS 14.2 23C64 darwin-arm64, locale zh-Hans-CN)
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 2022.3)
    [✓] VS Code (version 1.82.2)
    [✓] VS Code (version 1.85.0)
    [✓] Connected device (2 available)
    [✓] Network resources

• No issues found!

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@hjlp20150803
Copy link
Author

I have tested the example under the project, it reports same info:

example % flutter run -d macos
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-000210183AFA401E }
{ platform:macOS, arch:x86_64, id:00006000-000210183AFA401E }
../lib/src/group_button_item.dart:92:9: Error: No named parameter with the name 'primary'.
primary: _getBackgroundColor(theme),
^^^^^^^
../../../../../../flutter/packages/flutter/lib/src/material/elevated_button.dart:151:22: Context: Found this candidate, but the arguments don't match.
static ButtonStyle styleFrom({
^^^^^^^^^
Target kernel_snapshot failed: Exception

Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')
** BUILD FAILED **

Building macOS application...
Error: Build process failed

@rachanne222
Copy link

I have the same problem. Is this an issue with the latest flutter 3.18.0 upgrade?

@NeroThroN
Copy link
Contributor

Fix with this merged PR
And version 5.3.4

@Frezyx Frezyx linked a pull request Jan 9, 2024 that will close this issue
@Frezyx Frezyx closed this as completed Jan 9, 2024
@Frezyx Frezyx pinned this issue Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants