SachinGanesh / screenshot

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

No named parameter with the name 'view'. #147

Closed SwiftSpotter closed 1 year ago

SwiftSpotter commented 1 year ago

I got this error after upgrading to version 2.0.0 ,it works fine on ios though

../AppData/Local/Pub/Cache/hosted/pub.dev/screenshot-2.0.0/lib/screenshot.dart:154:42: Error: Undefined name 'View'. context == null ? fallBackView : View.maybeOf(context) ?? fallBackView; ^^^^ ../AppData/Local/Pub/Cache/hosted/pub.dev/screenshot-2.0.0/lib/screenshot.dart:164:7: Error: No named parameter with the name 'view'. view: view, ^^^^ ../Downloads/flutter_windows_3.7.1-stable/flutter/packages/flutter/lib/src/rendering/view.dart:68:3: Context: Found this candidate, but the arguments don't match. RenderView({ ^^^^^^^^^^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

sharmaAshish-dev commented 1 year ago

I'm having the same problem, did you found anything to solve this issue? if so, please let me know.

ritheshSalyan commented 1 year ago

Hello @sharmaAshish-dev , screenshot 2.0.0 or above version will work only with flutter above 3.10. You are trying to use the latest version of the screenshot with Flutter 3.7. Please use a lower version of the screenshot plugin or upgrade your flutter to 3.10