readValueKeyLocatorId function

String? readValueKeyLocatorId(
  1. Element element
)

Compact string ValueKey on element itself (= Ensemble testId).

Implementation

String? readValueKeyLocatorId(Element element) {
  final key = element.widget.key;
  final keyValue = key is ValueKey ? key.value : null;
  if (keyValue is! String) return null;
  final compact = compactWidgetLocatorId(keyValue);
  return compact.isEmpty ? null : compact;
}