deleteStateFile method
void
deleteStateFile({
- dynamic onDoesntExists()? = onStateDoesntExist,
- dynamic onSuccessfullyDeleted()? = onSuccessfullyStateDeleted,
Deletes the current stateFile
Implementation
void deleteStateFile({
Function()? onDoesntExists = onStateDoesntExist,
Function()? onSuccessfullyDeleted = onSuccessfullyStateDeleted,
}) {
if (!stateFile.existsSync()) {
onDoesntExists?.call();
return;
}
stateFile.deleteSync(recursive: true);
onSuccessfullyDeleted?.call();
}