syncModel method

Future<void> syncModel(
  1. T model
)

Implementation

Future<void> syncModel(T model) async {
  await model.loadRelations();

  if (!(await model.validate())) {
    await removeModel(model.getId());
    return;
  }

  await _save(model);
}