class _ApplyDetailState extends State<ApplyDetail> {
bool _show = true;
Timer _timer;
int count=3;
@override
void initState() {
// TODO: implement initState
super.initState();
_timer = Timer.periodic(Duration(seconds: 1), (Timer timer) {
if(count==0) {
_timer.cancel();
_show = false;
setState(() {
count;
});
return;
}
count--;
});
}
...略...
}