resetInstance static method
Disposes the current singleton before allowing a replacement instance.
Implementation
static Future<void> resetInstance() async {
final instance = _instance;
if (instance == null) {
return;
}
try {
await instance.dispose();
} finally {
if (identical(_instance, instance)) {
_instance = null;
}
}
}