addWidget method
Implementation
void addWidget(Widget child) {
if (list.length > 3) {
list.removeAt(0);
}
list.add(child);
setState(() {});
timer?.cancel();
timer = Timer(const Duration(seconds: 3), () {
if (!mounted) return;
list.clear();
setState(() {});
});
}