SachinGanesh / screenshot

Flutter Screenshot Library
https://pub.dev/packages/screenshot
MIT License
327 stars 137 forks source link

No named parameter with the name 'size' #165

Closed cucumber99 closed 3 months ago

cucumber99 commented 5 months ago

/C:/Users/dlsgu/AppData/Local/Pub/Cache/hosted/pub.dev/screenshot-2.1.0/lib/screenshot.dart:168:9: Error: No named parameter with the name 'size'. size: logicalSize, ^^^^ /C:/Programs/flutter/packages/flutter/lib/src/rendering/view.dart:28:9: Context: Found this candidate, but the arguments don't match. const ViewConfiguration({ ^^^^^^^^^^^^^^^^^ Target kernel_snapshot failed: Exception

This is part of result of flutter doctor -v [√] Flutter (Channel master, 3.19.0-9.0.pre.100, on Microsoft Windows [Version 10.0.22621.3007], locale ko-KR) • Flutter version 3.19.0-9.0.pre.100 on channel master at C:\Programs\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 90e4a12f2a (70 minutes ago), 2024-01-23 18:31:25 -0500 • Engine revision 220416cfa6 • Dart version 3.4.0 (build 3.4.0-60.0.dev) • DevTools version 2.31.0

I just upgraded the version of flutter, and this error occured.

ameenvga commented 5 months ago

I too face the same issue

LampeMW commented 5 months ago

I am also having this issue on the follow flutter version:

[✓] Flutter (Channel stable, 3.16.9, on macOS 14.1 23B74 darwin-arm64, locale en-US)
    • Flutter version 3.16.9 on channel stable at /Users/matt/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 41456452f2 (4 hours ago), 2024-01-25 10:06:23 -0800
    • Engine revision f40e976bed
    • Dart version 3.2.6
    • DevTools version 2.28.5
cucumber99 commented 5 months ago

In my case, it works when I changed to stable version. I think it's because it's a problem that occurred when I changed the version.

[√] Flutter (Channel stable, 3.16.8, on Microsoft Windows [Version 10.0.22621.3007], locale ko-KR)
• Flutter version 3.16.8 on channel stable at C:\Programs\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 67457e669f (9 days ago), 2024-01-16 16:22:29 -0800
• Engine revision 6e2ea58a5c
• Dart version 3.2.5
• DevTools version 2.28.5
MahmouudGouda commented 4 months ago

i have the same issue ? how can i solve it ?

MahmouudGouda commented 4 months ago

Launching lib/main.dart on iPhone 15 Pro Max in debug mode... Running pod install... Running Xcode build... Xcode build done. 423.7s Failed to build iOS app Error (Xcode): ../../.pub-cache/hosted/pub.dev/screenshot-2.1.0/lib/screenshot.dart:168:9: Error: No named parameter with the name 'size'.

Could not build the application for the simulator. Error launching application on iPhone 15 Pro Max.

Macacoazul01 commented 4 months ago

@ritheshSalyan, @SachinGanesh there are 3 PR related to this problem (#158, #162, #164). Can you review and merge one of them?

LucianoYaelFrancisco commented 4 months ago

I had the same problem, I solved it in the following way:

change my flutter channel to a stable channel.

flutter channel stable

after that, I made sure that I had updated the version

flutter upgrade

Flutter is already up to date on channel stable Flutter 3.19.2 • channel stable • https://github.com/flutter/flutter.git Framework • revision 7482962148 (4 days ago) • 2024-02-27 16:51:22 -0500 Engine • revision 04817c99c9 Tools • Dart 3.3.0 • DevTools 2.31.1

Finally I was able to run it without any problems.

Regards,

ritheshSalyan commented 3 months ago

Hi, This issue occurred because of some API Changes in Flutter.

So, We have released 2 new versions :

2.2.0 - Use this version if you are in the beta/master channel. 2.3.0 - Use this version if you are in the Stable channel.

Closing this issue. If you think it is incorrect, Please feel free to reopen this issue

amin79 commented 3 months ago

Hi, I still get the error

[✓] Flutter (Channel master, 3.21.0-9.0.pre.24, on macOS 14.1.2 23B92 darwin-x64, locale en-DE) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.2) [✓] VS Code (version 1.87.0) [✓] Connected device (3 available) [✓] Network resources

Error (Xcode): ../../../.pub-cache/hosted/pub.dev/screenshot-2.2.0/lib/screenshot.dart:165:9: Error: No named parameter with the name 'constraints'.

amin79 commented 3 months ago

Hi again, I just switched to the Stable channel and it worked with V2.3.0 But V2.2.0 does not work with beta/master channel.

kishor-parmar-np commented 2 months ago

Hi again, I just switched to the Stable channel and it worked with V2.3.0 But V2.2.0 does not work with beta/master channel.

This one work for me also