跳至主內容區

XOOPS輕鬆架

:::

主內容區域

選擇後會自動跳轉頁面

6-16 倒數計時做某件事

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--;
    });
  }
  ...略...
}

 

選擇後會自動跳轉頁面

:::

左邊區域內容

書籍目錄

展開 | 闔起

快速登入


右邊區域內容

請掃此 QR Code 可連至此頁面

計數器

今天: 1502150215021502
總計: 9677950967795096779509677950967795096779509677950

頁尾區域