title: Flutter Tflite PlatformException error model cannot be found yet its correctly mentioned
body: <p>I am having a hard time with tflite in flutter</p>
  <p>well the problem is the app cannot load the model but I did mention the asset in pubspec.yaml file and also I did spell the model name and the label text correctly still I am getting the error</p>
  <p><strong>Pubspeck.yaml</strong></p>
  <pre><code>assets:
    - asset/fruit.txt
    - asset/model.tflite
    - asset/model_unquant.tflite
    - asset/labels2.txt
  
  </code></pre>
  <p><strong>Loading model</strong></p>
  <pre><code>loadModel() async {
      String res = await Tflite.loadModel(
          labels: &quot;asset/labels2.txt&quot;,
          model: &quot;asset/model_unquant.tflite&quot;,
      );
      print(res);
    }
  </code></pre>
  <p><strong>Predicting</strong></p>
  <pre><code>predict(String path) async {
      var recognitions = await Tflite.runModelOnImage(
          path: path,
          threshold: 0.3,
          imageMean: 0.0,
          imageStd: 255.0,
          numResults: 292
      );
      setState(() {
        _recognitions = recognitions;
        char = _recognitions[0][&quot;labels&quot;];
        item = _recognitions[0];
      });
    }
  </code></pre>
  <p><strong>Traceback</strong></p>
  <pre><code>*E/flutter (18543): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(Failed to load model, flutter_assets/asset/model_unquant.tflite, java.io.FileNotFoundException: flutter_assets/asset/model_unquant.tflite*
  E/flutter (18543):  at android.content.res.AssetManager.nativeOpenAssetFd(Native Method)
  E/flutter (18543):  at android.content.res.AssetManager.openFd(AssetManager.java:899)
  E/flutter (18543):  at sq.flutter.tflite.TflitePlugin.loadModel(TflitePlugin.java:207)
  E/flutter (18543):  at sq.flutter.tflite.TflitePlugin.onMethodCall(TflitePlugin.java:95)
  E/flutter (18543):  at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
  E/flutter (18543):  at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
  E/flutter (18543):  at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
  E/flutter (18543):  at android.os.MessageQueue.nativePollOnce(Native Method)
  E/flutter (18543):  at android.os.MessageQueue.next(MessageQueue.java:336)
  E/flutter (18543):  at android.os.Looper.loop(Looper.java:197)
  E/flutter (18543):  at android.app.ActivityThread.main(ActivityThread.java:8107)
  E/flutter (18543):  at java.lang.reflect.Method.invoke(Native Method)
  E/flutter (18543):  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
  E/flutter (18543):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
  E/flutter (18543): , null)
  E/flutter (18543): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582:7)
  E/flutter (18543): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18)
  E/flutter (18543): &lt;asynchronous suspension&gt;
  E/flutter (18543): #2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
  E/flutter (18543): #3      Tflite.loadModel (package:tflite/tflite.dart:16:27)
  E/flutter (18543): #4      ResPicState.loadModel (package:respic/main.dart:53:31)
  E/flutter (18543): #5      ResPicState.initState (package:respic/main.dart:48:5)
  E/flutter (18543): #6      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4765:58)
  E/flutter (18543): #7      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5)
  E/flutter (18543): #8      Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
  E/flutter (18543): #9      Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
  E/flutter (18543): #10     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14)
  E/flutter (18543): #11     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
  E/flutter (18543): #12     Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
  E/flutter (18543): #13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  E/flutter (18543): #14     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  E/flutter (18543): #15     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4606:5)
  E/flutter (18543): #16     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5)
  E/flutter (18543): #17     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
  E/flutter (18543): #18     Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
  E/flutter (18543): #19     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14)
  E/flutter (18543): #20     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
  E/flutter (18543): #21     Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
  E/flutter (18543): #22     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14)
  E/flutter (18543): #23     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
  E/flutter (18543): #24     Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
  E/flutter (18543): #25     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
  E/flutter (18543): #26     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
  E/flutter (18543): #27     Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
  E/flutter (18543): #28     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4606:5)
  E/flutter (18543): #29     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4791:11)
  E/flutter (18543): #30     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5)
  E/flutter (18543): #31     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
  E/flutter (18543): #32     Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
  E/flutter (18543): #33     SingleChildRenderObjec
  D/ViewRootImpl@6337ccf[MainActivity](18543): ViewPostIme pointer 0
  D/ViewRootImpl@6337ccf[MainActivity](18543): ViewPostIme pointer 1
  
  </code></pre>
  <p>I don't know what causes this error I have also tried using different version of tflite and different types of models and cleaned as well but the problem still persists.
  Thanks for reading,
  regards,
  Roshan</p>