build method
Construct a new widget which represent the tab item with custom badge.
context
BuildContext instance;child
the tab item Widget;index
index of the tab item;active
active 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)],
);
}