player icon indicating copy to clipboard operation
player copied to clipboard

Error: The getter 'valueWrapper' isn't defined for the class 'ValueStream<Duration>'.

Open shoaibali opened this issue 4 years ago • 1 comments

lib/ui/widgets/now_playing/audio_controls.dart:20:42: Error: The getter 'valueWrapper' isn't defined for the class 'ValueStream<Duration>'.

  • 'ValueStream' is from 'package:rxdart/src/streams/value_stream.dart' ('../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/rxdart-0.27.3/lib/src/streams/value_stream.dart').
  • 'Duration' is from 'dart:core'. Try correcting the name to the name of an existing getter, or defining a getter or field named 'valueWrapper'. audio.player.currentPosition.valueWrapper!.value.inSeconds > 5 ^^^^^^^^^^^^

FAILURE: Build failed with an exception.

  • Where: Script '/home/shoaib/snap/flutter/common/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1102

  • What went wrong: Execution failed for task ':app:compileFlutterBuildRelease'.

Process 'command '/home/shoaib/snap/flutter/common/flutter/bin/flutter'' finished with non-zero exit value 1

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 36s Running Gradle task 'assembleRelease'... 37.2s Gradle task assembleRelease failed with exit code 1

Looks like a whole lot of backward compatability issue being discussed here https://github.com/ReactiveX/rxdart/issues/556

I just changed it to get ".value" and removed the valueWrapper!

shoaibali avatar Dec 28 '21 11:12 shoaibali

This bug is related to this issue. Do not run flutter pub upgrade --major-versions. It will cause this issue, instead follow my proposed solution. At this point you might want to re-clone the project and do the steps in the proposed solution.

Muhand avatar Jan 13 '22 21:01 Muhand

As v2 doesn't use Rx anymore, this shouldn't be a problem.

phanan avatar Apr 19 '23 16:04 phanan