Closed theKAKAN closed 6 years ago
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:
flutter run --no-preview-dart-2
type 'Future<dynamic>' is not a subtype of type 'Future<int>'
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:
audioplayer.dart
flame_example
The line in which the error is found is Flame.audio.loop('music.ogg');
Flame.audio.loop('music.ogg');
Tried 0.5.1, no errors but sound was not being played. In 0.5.2, everything works fine. Thank you :)
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:in
audioplayer.dart
Running
flame_example
Well, here's a screenshot from VS Code:The line in which the error is found is
Flame.audio.loop('music.ogg');