operator []= method
Set session value
by key
Example:
server.get('/api/set/:item', (ctx) async {
final Session session = await ctx.session;
session['item'] = ctx.pathParams.item;
// ...
});
Implementation
operator []=(String key, String value) {
_data[key] = value;
needsUpdate = true;
}