importModelFromPath method

  1. @override
Future<MnnModelInfo> importModelFromPath(
  1. String directoryPath, {
  2. required bool replaceExisting,
})
override

Imports a model directory the app already owns (e.g. a finished download in private storage) without going through the SAF picker.

Implementation

@override
Future<MnnModelInfo> importModelFromPath(
  String directoryPath, {
  required bool replaceExisting,
}) async => MnnModelInfo.fromMap(
  await _invoke<Object?>('importModelFromPath', {
    'directoryPath': directoryPath,
    'replaceExisting': replaceExisting,
  }),
);