attributes method
- String id
override
Os atributos do elemento id (getElementAttr), como texto: n, left,
right, grace… Vazio se o elemento não tem nenhum.
Implementation
@override
Map<String, String> attributes(String id) {
final text = _toolkit.getElementAttr(id).trim();
if (text.isEmpty) return const {};
final decoded = jsonDecode(text);
if (decoded is! Map) return const {};
return {
for (final entry in decoded.entries) '${entry.key}': '${entry.value}',
};
}