persist method

  1. @override
void persist([
  1. bool now = false
])
override

Persist the nodes in this provider. If you are not using a LinkProvider, then call setPersistFunction to set the function that is called to persist.

Implementation

@override
void persist([bool now = false]) {
  if (now) {
    if (_persist == null) {
      return;
    }

    _persist!();
  } else {
    Future.delayed(const Duration(seconds: 5), () {
      if (_persist == null) {
        return;
      }

      _persist!();
    });
  }
}