asukaminato0721 commented on issue #5722:
URL: https://github.com/apache/opendal/issues/5722#issuecomment-2713233823
The users will use `import 'package:opendal/opendal.dart';` since this is
the mainstream style.
> Is RustLib.init() required?
yes
> What will happen if users have multiple rust lib?
Warning but no error.
> Can we hide it under `FileManager::init`?
~~My consideration is that, if user want multiple `op`, this will be
triggered many times,~~
I find out how to check the state now.
```dart
expect(RustLib.instance.initialized, false);
expect(() => RustLib.instance.api, throwsA(isA<StateError>()));
await RustLib.init();
expect(RustLib.instance.initialized, true);
```
may be useful.
The api name will be changed afterwards.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]