operator [] method

String? operator [](
  1. String key
)

Access session value by key

Example:

server.get('/api/set/:item', (ctx) async {
  final Session session = await ctx.session;
  final String oldItem = session['item'];
  // ...
});

Implementation

String? operator [](String key) => _data[key];