getLatestModelFile method

Future<File?>? getLatestModelFile(
  1. FirebaseRemoteModel? model
)

Returns a File containing the latest model for the remote model name.

This will fail with if the model is not yet downloaded on the device or valid custom remote model is not provided.

Implementation

Future<File> getLatestModelFile(FirebaseRemoteModel model) async {
  assert(model != null);
  var modelPath = await channel.invokeMethod(
    'FirebaseModelManager#getLatestModelFile',
    {'modelName': model.modelName},
  );
  return File(modelPath);
}