updateMediaItem method

void updateMediaItem(
  1. MediaItem item
)

Update a media item, without performing any deletion or mutation operations. This is useful when updating constantly, for example, with the player where the position needs to be constantly updated.

Implementation

void updateMediaItem(MediaItem item) {
  _database.writeTxnSync(() {
    _database.mediaItems.putSync(item);
  });
}