You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is probably a stupidly simple QUESTION but I am pulling my hair out trying to work out what is going on. I'm trying to follow the remote url example, calling the playerWidget.dart file (exactly the same as the example) passing a url as the only parameter. I can see, via debug, that the url is passing correctly; however I am getting the error noted below.
When I followed it through to the audioplayers.dart file I can see that the example has different code to the 0.8.0 in lines 107-108... however I am too much a newbie to be able to fix that problem! :-(
Example (107-108)
{bool isLocal: false, double volume: 1.0, Duration position}) async {
final double positionInSeconds = position == null ? null : position.inSeconds.toDouble();
This is probably a stupidly simple QUESTION but I am pulling my hair out trying to work out what is going on. I'm trying to follow the remote url example, calling the playerWidget.dart file (exactly the same as the example) passing a url as the only parameter. I can see, via debug, that the url is passing correctly; however I am getting the error noted below.
When I followed it through to the audioplayers.dart file I can see that the example has different code to the 0.8.0 in lines 107-108... however I am too much a newbie to be able to fix that problem! :-(
Example (107-108)
{bool isLocal: false, double volume: 1.0, Duration position}) async {
final double positionInSeconds = position == null ? null : position.inSeconds.toDouble();
0.8.0 (107-108)
{bool isLocal: false, double volume: 1.0, Duration position: Duration.zero}) async {
double positionInSeconds = position.inMicroseconds / Duration.microsecondsPerSecond;
Any thoughts on how to correct this error? As noted, I am sure that it is a simple issue...
Phoenix
E/flutter ( 6077): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception:
E/flutter ( 6077): NoSuchMethodError: The getter 'inMicroseconds' was called on null.
E/flutter ( 6077): Receiver: null
E/flutter ( 6077): Tried calling: inMicroseconds
E/flutter ( 6077): #0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
E/flutter ( 6077): #1 AudioPlayer.play (package:audioplayers/audioplayers.dart:108:41)
E/flutter ( 6077):
E/flutter ( 6077): #2 _PlayerWidgetState._play (package:brave_puppy/ui/playerWidget.dart:154:39)
E/flutter ( 6077):
E/flutter ( 6077): #3 _PlayerWidgetState.build. (package:brave_puppy/ui/playerWidget.dart:60:54)
E/flutter ( 6077): #4 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:507:14)
E/flutter ( 6077): #5 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:562:30)
E/flutter ( 6077): #6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
E/flutter ( 6077): #7 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:242:9)
E/flutter ( 6077): #8 TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:204:7)
E/flutter ( 6077): #9 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
E/flutter ( 6077): #10 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:184:20)
E/flutter ( 6077): #11 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:158:22)
E/flutter ( 6077): #12 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:138:7)
E/flutter ( 6077): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:101:7)
E/flutter ( 6077): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:85:7)
E/flutter ( 6077): #15 _invoke1 (dart:ui/hooks.dart:168:13)
E/flutter ( 6077): #16 _dispatchPointerDataPacket (dart:ui/hooks.dart:122:5)
The text was updated successfully, but these errors were encountered: