<p dir="auto">I have been playing around with the <strong>Firebase ML Vision</strong> <a href="https://pub.dartlang.org/packages/firebase_ml_vision" rel="nofollow">https://pub.dartlang.org/packages/firebase_ml_vision</a> and have so far integrated the Text recognition within my application. My issue here is that I have my UI which is a live camera feed and every time I call the Firebase ML vision, I see about 1-2 seconds lag/freeze which affects my UI. I managed to narrow this down to this line of code from the Firebase ML API</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    final results =
        (() async =&gt; (await detector.detectInImage(visionImage) ?? &lt;dynamic&gt;[]));"><pre class="notranslate"><code class="notranslate">    final results =
        (() async =&gt; (await detector.detectInImage(visionImage) ?? &lt;dynamic&gt;[]));
</code></pre></div>
<p dir="auto">I have since tried to implement the whole call to the API from sending the capture from the camera feed to the FirebaseVisionDetector object but no avail with errors along the lines to do with if I remember right, something like the routine has to be called from the main isolate. I can successfully implement a <strong>compute</strong> function without this API. I have a feeling is something to do with the fact that it is an external package.</p>
<p dir="auto">Any help will be appreciated as I am seeking a smooth UI interaction and transition within the App.</p>
<p dir="auto">I'm trying to create an expenses app to track my personal expenses. After adding new expenses, seems like there are something wrong with the listview. It shows duplicated card and the new expenses that I add is not there. But after I scroll to the bottom and go up, it is shown correctly.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12526574/44995530-f1894480-afd5-11e8-91ba-1f225e0175df.gif"><img src="https://user-images.githubusercontent.com/12526574/44995530-f1894480-afd5-11e8-91ba-1f225e0175df.gif" width="50%" height="50%" data-animated-image="" style="max-width: 100%;"></a></p>
<h2 dir="auto">Steps to Reproduce</h2>

<ol dir="auto">
<li>At listing page, notice that I have test1 - test7 and other stuffs. Click Add button.</li>
<li>At the form page, put test8 and click Submit button. It will pop to the previous page.</li>
<li>Notice that the new test8 is not there at first. There are also duplicated cards e.g lunch RM7.80.</li>
<li>Scroll to the bottom and then go to the top.</li>
<li>Notice that the new test8 is there. The duplicated cards are also gone.</li>
</ol>
<h2 dir="auto">Sample source code</h2>
<p dir="auto">Source code for the listing page.<br>
<a href="https://github.com/flutter/flutter/files/2346175/expenses.txt">expenses.txt</a></p>
<h2 dir="auto">Logs</h2>
<p dir="auto">There's nothing in the log.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
flutter doctor -v
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.228], locale en-MY)
    • Flutter version 0.5.1 at C:\Users\Yousoff Effendy\Documents\Software\flutter_windows_v0.5.1-beta\flutter
    • Framework revision c7ea3ca377 (3 months ago), 2018-05-29 21:07:33 +0200
    • Engine revision 1ed25ca7b7
    • Dart version 2.0.0-dev.58.0.flutter-f981f09760

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\Users\Yousoff Effendy\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = C:\Users\Yousoff Effendy\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    • All Android licenses accepted.

[√] Android Studio (version 3.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[!] VS Code, 64-bit edition (version 1.26.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[!] Connected devices
    ! No devices available"><pre class="notranslate"><code class="notranslate">
flutter doctor -v
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.228], locale en-MY)
    • Flutter version 0.5.1 at C:\Users\Yousoff Effendy\Documents\Software\flutter_windows_v0.5.1-beta\flutter
    • Framework revision c7ea3ca377 (3 months ago), 2018-05-29 21:07:33 +0200
    • Engine revision 1ed25ca7b7
    • Dart version 2.0.0-dev.58.0.flutter-f981f09760

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\Users\Yousoff Effendy\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = C:\Users\Yousoff Effendy\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    • All Android licenses accepted.

[√] Android Studio (version 3.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[!] VS Code, 64-bit edition (version 1.26.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[!] Connected devices
    ! No devices available
</code></pre></div>
<p dir="auto">Tested on real android device (Lolipop). I'm not connected to the device when running the flutter doctor. Let me know if there's any other info needed</p>