withDecoder method

Snapshot withDecoder(
  1. SnapshotDecoder decoder
)

Returns a snapshot with another decoder.

When decoder is equal to the current decoder, this method will return the current snapshot.

Implementation

Snapshot withDecoder(SnapshotDecoder decoder) => decoder == this.decoder
    ? this
    : Snapshot.fromJson(value, decoder: decoder);