loadExternalLibrary function
Load the ExternalLibrary, with the following cases in mind:
- When
flutter run, or when a real app is bundled. - When running Flutter widget tests.
- When
dart test,dart run,dart compile exe, etc.
Implementation
FutureOr<ExternalLibrary> loadExternalLibrary(
ExternalLibraryLoaderConfig config,
) async {
final ioDirectory = config.ioDirectory;
return loadExternalLibraryRaw(
nativeLibDirWhenNonPackaged: ioDirectory == null
? null
: Directory.current.uri.resolve(ioDirectory),
stem: config.stem,
);
}