getSemanticsLabel method

String getSemanticsLabel(
  1. BuildContext context,
  2. CourierPreferencesTheme theme
)

Implementation

String getSemanticsLabel(BuildContext context, CourierPreferencesTheme theme) {
  final String loadingColor = theme.getLoadingColor(context).toHex();

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

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

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