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

Error: qr_painter.dart line 100 column 25 - A value of type 'Future<Image>' can't be assigned to a variable of type 'Image'. #20

Closed
clovesmjunior opened this issue Jan 17, 2019 · 2 comments

Comments

@clovesmjunior
Copy link

clovesmjunior commented Jan 17, 2019

Necessary to use await in call toImage:

101:25: Error: A value of type 'Future' can't be assigned to a
variable of type 'Image'.

  • 'Future' is from 'dart:async'.
  • 'Image' is from 'dart:ui'.
    Try changing the type of the left hand side, or casting the right hand side to 'Image'.

Actual:

final ui.Image uiImage =
        toPicture(size).toImage(size.toInt(), size.toInt());

Correctly:

final ui.Image uiImage =
       await toPicture(size).toImage(size.toInt(), size.toInt());
@lukef
Copy link
Collaborator

lukef commented Jan 17, 2019

Please use the 2.0.0-dev.1 tag.

dependencies:
  qr_flutter:
    git:
      url: git://github.com/lukef/qr.flutter.git
      ref: 2.0.0-dev.1

@lukef lukef closed this as completed Jan 17, 2019
@lukef
Copy link
Collaborator

lukef commented Jan 17, 2019

See #16 for details.

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

No branches or pull requests

2 participants