set<T> method

void set<T>(
  1. String key,
  2. T value
)

Sets a property value by key.

This is used by middleware and plugins to store data that needs to persist during the processing of an update.

Example:

ctx.set('session', {'user_id': 123, 'step': 'waiting_for_name'});

Implementation

void set<T>(String key, T value) => _properties[key] = value;