excuteEffect<T> function Null safety

dynamic excuteEffect<T>(
  1. List<T> effectList,
  2. [UpdateOptions? options]
)

Implementation

excuteEffect<T>(List<T> effectList, [UpdateOptions? options]) {
  if (options != null && options.delay != null && options.delay is Duration) {
    if (_effectTimer != null && _effectTimer.isActive) _effectTimer.cancel();
    _effectWidgetList.addAll(effectList);
    _effectTimer = Timer(options.delay as Duration, () {
      _excute(_effectWidgetList);
      _effectWidgetList.clear();
    });
  } else {
    _excute(listUnRepeat(effectList));
  }
}