build method
Construct a new widget which represent the tab item with custom badge.
contextBuildContext instance;childthe tab item Widget;indexindex of the tab item;activeactive state for the index;
Implementation
@override
Widget build(_, child, i, active) {
var chip = chips[i];
if (chip == null || chip == '') {
return child;
}
return Stack(
alignment: Alignment.center,
children: <Widget>[child, asBadge(chip)],
);
}