deletionAction method
void
deletionAction( - String method
)
Implementation
void deletionAction(String method) {
// cleanup the state after deletion
List<String> varsToDelete = [];
switch (method) {
case 'Ignored':
varsToDelete.addAll(getIgnored(ref));
// two ways to update: read it from the stdout glimpse or update it with the information
// choose 2
case 'Variable':
String select = ref.read(selectedProvider);
varsToDelete.add(select);
case 'Vars with Missing':
varsToDelete.addAll(getMissing(ref));
case 'Obs with Missing':
// variables won't be deleted so return directly
return;
default:
showUnderConstruction(context);
}
for (var v in varsToDelete) {
if (deleteVar(ref, v)) {
debugText(' DELETED', v);
}
}
}