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

Dart 2 support? #20

Closed
theKAKAN opened this issue Jun 23, 2018 · 1 comment
Closed

Dart 2 support? #20

theKAKAN opened this issue Jun 23, 2018 · 1 comment

Comments

@theKAKAN
Copy link

I'm getting errors with Flutter beta 2, which uses Dart 2.
I tried running it with flutter run --no-preview-dart-2 and it worked.
Here's the error, with beta 2 and Dart 2.
type 'Future<dynamic>' is not a subtype of type 'Future<int>'
Location:

  Future<int> play(String url, {bool isLocal: false, double volume: 1.0}) =>
      _channel.invokeMethod('play', {"playerId": playerId, "url": url, "isLocal": isLocal, 'volume': volume});

in audioplayer.dart
Running flame_example
Well, here's a screenshot from VS Code:
upload

The line in which the error is found is Flame.audio.loop('music.ogg');

@theKAKAN
Copy link
Author

Tried 0.5.1, no errors but sound was not being played.
In 0.5.2, everything works fine. Thank you :)

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

1 participant