sync method

Future<void> sync()

Implementation

Future<void> sync() async {
  if (!isDirty) {
    return;
  }

  if (isEmpty) {
    await delete();
  } else {
    await persist();
  }
}