getSemanticsLabel method

String getSemanticsLabel(
  1. Color background
)

Implementation

String getSemanticsLabel(Color background) {
  final String backgroundColor = background.toHex();

  final SemanticProperties semanticProperties = SemanticProperties([
    SemanticProperty('backgroundColor', backgroundColor),
  ]);

  final String label = jsonEncode(semanticProperties.toJson());

  return Courier.shared.isUITestsActive ? label : 'UnreadCountIndicator';
}