reset static method
Reset KeystoneNetwork (for testing purposes only)
WARNING: This will close the current Dio instance and clear all state. Only use this in test tearDown methods.
Example:
tearDown(() {
KeystoneNetwork.reset();
});
Implementation
@visibleForTesting
static void reset() {
// Safely close existing Dio instance
if (_dio != null) {
try {
_dio!.close(force: true);
} catch (e) {
// Ignore errors during cleanup
}
}
// Reset to null (not creating new instance)
_dio = null;
_dioProvider = null;
}