tabSemanticsLabel method

  1. @override
String tabSemanticsLabel (
  1. {int tabIndex,
  2. int tabCount}
)
override

The accessibility label used on a tab in a CupertinoTabBar.

This message describes the index of the selected tab and how many tabs there are, e.g. 'tab, 1 of 2' in United States English.

tabIndex and tabCount must be greater than or equal to one.

Implementation

@override
String tabSemanticsLabel({ int tabIndex, int tabCount }) {
  assert(tabIndex >= 1);
  assert(tabCount >= 1);
  final String template = tabSemanticsLabelRaw;
  return template
    .replaceFirst(r'$tabIndex', _decimalFormat.format(tabIndex))
    .replaceFirst(r'$tabCount', _decimalFormat.format(tabCount));
}