📜  每秒颤动运行代码 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:16.091000             🧑  作者: Mango

代码示例2
Timer timer;

@override
void initState() {
  super.initState();
  timer = Timer.periodic(Duration(seconds: 15), (Timer t) => checkForNewSharedLists());
}

@override
void dispose() {
  timer?.cancel();
  super.dispose();
}