getAttribute method

  1. @override
Object? getAttribute(
  1. String name
)
override

Retrieves an arbitrary attribute previously stored in this context.

Attributes are transient and mutable, typically used to share runtime data among server components.

Example:

final db = context.getAttribute('dbConnection');

Implementation

@override
Object? getAttribute(String name) => synchronized(_attributes, () => _attributes.get(name));