getLiteRTBaseLibraryPath function

String getLiteRTBaseLibraryPath()

Get the DynamicLibrary of this plugin, ie. the base tf lite runtime

Implementation

String getLiteRTBaseLibraryPath(){

  String libTfLitePath = "";

  if (UniversalPlatform.isWeb){
    libTfLitePath =
      'assets/packages/lite_rt_for_flutter_libs_web_tfjs_tflite/web/assets/tflite/';
  }
  else if (UniversalPlatform.isAndroid) {
    libTfLitePath = 'libtensorflowlite_jni.so';
  }
  else if (UniversalPlatform.isIOS) {
    libTfLitePath = shouldUseDynamicLibraryProcess;
  }
  else if (UniversalPlatform.isMacOS) {
    libTfLitePath = "libtensorflowlite_c.dylib";
  }
  else if (UniversalPlatform.isLinux) {
    libTfLitePath = 'libtensorflowlite_c.so';
  }
  else if (UniversalPlatform.isWindows) {
    libTfLitePath = 'libtensorflowlite_c.dll';
  }
  else if (UniversalPlatform.isWeb){
    libTfLitePath = '"assets/packages/lite_rt_for_flutter_libs_web_tfjs_tflite/web/assets/tflite"';
  }

  if(libTfLitePath == ""){
    debugPrint("LiteRT is not supported on this platform");
  }

  return libTfLitePath;

}