void setAttribute(final String key, final Object value) { attributes ??= <String, dynamic>{}; attributes?[key] = value; }