decodeOutput method

  1. @override
Result<EntitySyncState?, DbError> decodeOutput(
  1. Object? payload
)
override

The output encoded in an ok payload of this request.

Implementation

@override
Result<EntitySyncState?, DbError> decodeOutput(Object? payload) =>
    switch (payload) {
      {'state': null} => Ok(null),
      {'state': final Object state} => EntitySyncState.decode(state),
      _ => Err(SyncJson.bad('state answer', payload)),
    };