setInRotation static method

Future<List<AIModel>> setInRotation(
  1. AIModel aiModel,
  2. bool inRotation
)

Implementation

static Future<List<AIModel>> setInRotation(
  AIModel aiModel,
  bool inRotation,
) async {
  final models = await loadAllModels();
  for (final model in models) {
    if (model.id == aiModel.id) model.inRotation = inRotation;
  }
  return await saveModels(models);
}