factoryReset static method
void
factoryReset()
A last resort Function that construct a new instance and replace the current one which remains default setting only.
This method should be called after invoking IntlScriptRecognizer.new and throws StateError if no instance created yet.
It only affected from IntlScriptRecognizer.new. And any from IntlScriptRecognizer.delicated will no affected since they no longer store instance once they constructed.
Implementation
static void factoryReset() {
if (_instance != null) {
_newInstance();
} else {
throw StateError("No instance created yet");
}
}