SachinGanesh / screenshot

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

Error: No named parameter with name 'window'. #140

Closed ged-flod closed 1 year ago

ged-flod commented 1 year ago

After adding screenshot: ^1.3.0 to my pubspec.yaml, when running the app on an Android device, I get the following error:

../.pub-cache/hosted/pub.dev/screenshot-1.3.0/lib/screenshot.dart:160:7: Error: No named parameter with name 'window'.
      window: ui.window,
      ^^^^^^
../../flutter/lib/src/rendering/view.dart:68:3: Context: Found this candidate, but arguments do not match.
  RenderView({
  ^^^^^^^^^^
target_kernel_snapshot failed: exception

FAILED: The build failed with an exception.

I'm using

Using Release
Flutter 3.10.0
screenshot 1.3.0
OS Ubuntu 22.04
marcellocamara commented 1 year ago

Unfortunately the owner is taking too long to fix it Setting this at your pubspec.yaml will work:

  screenshot:
    git:
      url: https://github.com/SachinGanesh/screenshot.git
      ref: master
h3x4d3c1m4l commented 1 year ago

Fix seems to be published: https://pub.dev/packages/screenshot

ritheshSalyan commented 1 year ago

Published version 2.0.0 with support for flutter 3.10

ged-flod commented 1 year ago

Fix seems to be published: https://pub.dev/packages/screenshot

It works thanks.