update method

void update(
  1. PostModel cb(
    1. PostModel state
    )
)

Update the post model with the provided callback function.

Implementation

void update(PostModel Function(PostModel state) cb) {
  state = cb(state);
}