dispose method

  1. @override
Future<void> dispose()
override

Frees all the resources associated with this object.

This marks the object as no longer usable and will make all methods/properties besides mounted inaccessible.

Implementation

@override
Future<void> dispose() async {
  _syncState.dispose();
  _saveSub.cancel();

  await _save(state).then((_) => store.close());

  return super.dispose();
}