yRunLoop function
主线程运行(循环)
Implementation
Timer yRunLoop(Function(Timer? timer) action, int loop, {runNow = false}) {
if (runNow) action(null);
return Timer.periodic(Duration(milliseconds: loop), (timer) => action(timer));
}
主线程运行(循环)
Timer yRunLoop(Function(Timer? timer) action, int loop, {runNow = false}) {
if (runNow) action(null);
return Timer.periodic(Duration(milliseconds: loop), (timer) => action(timer));
}