updateUser method

void updateUser(
  1. String id,
  2. UserModel cb(
    1. UserModel? state
    )
)

Implementation

void updateUser(String id, UserModel Function(UserModel? state) cb) {
  update((state) => state..[id] = cb(state[id]));
}