dispose static method
Dispose of resources.
Call when completely done with the engine.
Implementation
static Future<void> dispose() async {
final initializing = _initializing;
if (initializing != null) {
// Let a running initialize finish, so its engine is the one disposed.
try {
await initializing;
} catch (_) {}
}
await RagEngine.dispose();
_engine = null;
_instance = null;
}