title: Flutter Cant convert 00.00 to seconds , inSeconds() method shows error
body: <p>I am tryna make a audio player but having trouble seeking the slider to the current duration of the song,
  thank you,</p>
  <pre><code>@override
  void initState() {
  super.initState();
  player.onAudioPositionChanged.listen((Duration duration) {
    setState(() {
      currenttime = duration;
    });
  });
  player.onDurationChanged.listen((Duration duration) {
    setState(() {
      totaltime = duration;
    });
  });
  }
  </code></pre>
  <p>this the slider widget that catches the CURRENTTIME AND TOTALTIME .</p>
  <pre><code>Slider(
                          value: currenttime.inSeconds.toDouble(),
                          max: totaltime.inSeconds.toDouble(),
                          min: 0.0,
                          activeColor: mycolor,
                          inactiveColor: Colors.grey,
                          onChanged: (double value) {
                            setState(() {
                              int second = value.toInt();
                              Duration seeked = Duration(seconds: second);
                              player.seek(seeked);
                              value = value;
                            });
                          }),
  </code></pre>
  <p>And this is the Error</p>
  <pre><code>═╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
  The following NoSuchMethodError was thrown building MyApp(dirty, state: _MyAppState#8e9ee):
  The getter 'inSeconds' was called on null.
  Receiver: null
  Tried calling: inSeconds
  </code></pre>