position property

Stream<Duration> position
final

A stream tracking the current position, suitable for animating a seek bar. To ensure a smooth animation, this stream emits values more frequently on short media items where the seek bar moves more quickly, and less frequenly on long media items where the seek bar moves more slowly. The interval between each update will be no quicker than once every 16ms and no slower than once every 200ms.

See createPositionStream for more control over the stream parameters.

Implementation

static final Stream<Duration> position = createPositionStream(
    steps: 800,
    minPeriod: const Duration(milliseconds: 16),
    maxPeriod: const Duration(milliseconds: 200));