tabLabel method

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

The accessibility label used on a tab in a TabBar.

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 tabLabel({ required int tabIndex, required int tabCount }) {
  assert(tabIndex >= 1);
  assert(tabCount >= 1);
  final String template = tabLabelRaw;
  return template
    .replaceFirst(r'$tabIndex', formatDecimal(tabIndex))
    .replaceFirst(r'$tabCount', formatDecimal(tabCount));
}