<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: vmodal_ai</title>
    <description>The latest articles on DEV Community by vmodal_ai (@vmodal_ai).</description>
    <link>https://dev.to/vmodal_ai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4052446%2F2fcb63ba-7be8-4ffd-93ce-f4f00223ddfa.jpeg</url>
      <title>DEV Community: vmodal_ai</title>
      <link>https://dev.to/vmodal_ai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vmodal_ai"/>
    <language>en</language>
    <item>
      <title>Offline-First Flutter for Robot Operators and Field Technicians</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Fri, 06 Nov 2026 18:58:30 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/offline-first-flutter-for-robot-operators-and-field-technicians-5b9j</link>
      <guid>https://dev.to/vmodal_ai/offline-first-flutter-for-robot-operators-and-field-technicians-5b9j</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Robots and edge devices may operate in warehouses, factories, outdoors,&lt;br&gt;
or labs with unreliable connectivity. A mobile UI that assumes every&lt;br&gt;
request succeeds becomes unusable and can misrepresent the robot's&lt;br&gt;
state.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this guide covers
&lt;/h2&gt;

&lt;p&gt;This tutorial focuses on practical architecture and performance&lt;br&gt;
engineering for production systems. The central principle is to measure&lt;br&gt;
the complete pipeline, keep latency-sensitive work close to the&lt;br&gt;
hardware, and make failure states visible to the operator.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference architecture
&lt;/h2&gt;

&lt;p&gt;Local cache and command outbox → connectivity-aware repository →&lt;br&gt;
authenticated gateway → device/robot. Separate safe-to-queue&lt;br&gt;
configuration edits from time-sensitive commands that must never be&lt;br&gt;
replayed automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation plan
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; Classify actions as read-only, safely retryable, or
time-sensitive/non-replayable.&lt;/li&gt;
&lt;li&gt; Cache non-sensitive reference data and show when each value was last
refreshed.&lt;/li&gt;
&lt;li&gt; Use idempotency keys for retryable operations and explicit user
confirmation for commands that cannot be safely queued.&lt;/li&gt;
&lt;li&gt; On reconnect, refresh authoritative device state before enabling
actions.&lt;/li&gt;
&lt;li&gt; Test airplane mode, DNS failure, gateway reboot, and long-lived
stale sessions.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kt"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;RetryPolicy&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;safeToRetry&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;refreshBeforeRetry&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;neverReplay&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;nclass&lt;/span&gt; &lt;span class="n"&gt;PendingOperation&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;PendingOperation&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="kd"&gt;required&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;required&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;policy&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;RetryPolicy&lt;/span&gt; &lt;span class="n"&gt;policy&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The snippets are illustrative starting points, not drop-in integrations.&lt;br&gt;
Match APIs and version requirements to the exact SDK, OS image, hardware&lt;br&gt;
revision, and runtime in your project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Measure end-to-end latency, not only one function or model
invocation.&lt;/li&gt;
&lt;li&gt;  Report p50 and p95/p99 latency alongside throughput, memory use, and
dropped work.&lt;/li&gt;
&lt;li&gt;  Bound queues and define what happens when consumers fall behind.&lt;/li&gt;
&lt;li&gt;  Avoid repeated frame copies and expensive work on Flutter's UI
isolate.&lt;/li&gt;
&lt;li&gt;  Test sustained workloads after the device reaches thermal
equilibrium.&lt;/li&gt;
&lt;li&gt;  Keep UI state, device state, and robot state distinct.&lt;/li&gt;
&lt;li&gt;  Add timeouts, cancellation, reconnection, and explicit stale-data
indicators.&lt;/li&gt;
&lt;li&gt;  Profile on the actual target hardware using a reproducible build.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common pitfalls
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Never replay motion commands simply because connectivity returned.&lt;/li&gt;
&lt;li&gt;  Do not present cached telemetry as live without a freshness
indicator.&lt;/li&gt;
&lt;li&gt;  Avoid unlimited local outboxes that can grow during long outages.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hands-on exercise
&lt;/h2&gt;

&lt;p&gt;Disconnect the phone during a mock robot task. Verify the app shows&lt;br&gt;
stale state, preserves safe notes, and does not replay a movement&lt;br&gt;
command.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://docs.flutter.dev/perf/best-practices" rel="noopener noreferrer"&gt;Flutter performance best
practices&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.flutter.dev/tools/devtools" rel="noopener noreferrer"&gt;Flutter DevTools&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.android.com/" rel="noopener noreferrer"&gt;Android Developers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.nvidia.com/" rel="noopener noreferrer"&gt;NVIDIA Developer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.ros.org/" rel="noopener noreferrer"&gt;ROS 2 documentation&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>robotics</category>
    </item>
    <item>
      <title>Advanced Flutter Profiling for Smart Glasses and Robotics</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Fri, 06 Nov 2026 18:56:07 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/advanced-flutter-profiling-for-smart-glasses-and-robotics-2f15</link>
      <guid>https://dev.to/vmodal_ai/advanced-flutter-profiling-for-smart-glasses-and-robotics-2f15</guid>
      <description>&lt;p&gt;This advanced tutorial treats Flutter as the operator-facing presentation layer while wearable SDKs, Jetson services, ROS 2 nodes, and NVIDIA-accelerated inference handle device-specific or compute-heavy work. The goal is predictable latency, bounded memory, useful observability, and graceful degradation—not simply maximizing message throughput.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Architecture note:&lt;/strong&gt; Keep safety-critical control loops on the robot. A Flutter app is not a hard real-time controller and must not be the sole safety mechanism.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Define measurable service objectives
&lt;/h2&gt;

&lt;p&gt;Track freshness, event-to-display latency, throughput, frame pacing, CPU, memory, network use, battery, thermal state, dropped messages, reconnect time, and command acknowledgements. Do not use a single FPS number to represent the entire system: a smooth screen can still display stale data.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Instrument the complete path
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sensor capture
  -&amp;gt; native/ROS processing
  -&amp;gt; gateway publish
  -&amp;gt; Flutter receive
  -&amp;gt; state accepted
  -&amp;gt; widget build
  -&amp;gt; frame rendered
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Record source and receive timestamps separately. Use monotonic clocks for elapsed durations within a process. When comparing devices, account for clock offset and uncertainty.&lt;/p&gt;

&lt;p&gt;Profile on a physical target in profile mode and inspect Flutter DevTools' Performance view. Debug-mode timing is not a reliable production baseline. See &lt;a href="https://docs.flutter.dev/tools/devtools/performance" rel="noopener noreferrer"&gt;https://docs.flutter.dev/tools/devtools/performance&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Establish a repeatable baseline
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Start from a clean launch.&lt;/li&gt;
&lt;li&gt;Connect to the robot or replay a fixed trace.&lt;/li&gt;
&lt;li&gt;Run a representative scenario for several minutes.&lt;/li&gt;
&lt;li&gt;Record frame times, memory, CPU, message rates, stale-data counts, and reconnects.&lt;/li&gt;
&lt;li&gt;Change one variable at a time.&lt;/li&gt;
&lt;li&gt;Compare p50, p95, and p99 latency, not just averages.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PipelineMetrics&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;received&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;accepted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;dropped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;stale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;uiPublishes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use bounded metric windows or histograms; do not store every sample forever.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Separate acquisition from presentation
&lt;/h2&gt;

&lt;p&gt;High-rate sources should not directly trigger widget rebuilds. Use a latest-value cache for state-like data, bounded queues for events that must be preserved, and a controlled presentation cadence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LatestValue&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;_value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;_version&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_version&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replacing an older pending value may be acceptable for battery, pose, or temperature. Commands, alarms, and audit events need a separate reliable path and explicit acknowledgement semantics.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Make buffering bounded
&lt;/h2&gt;

&lt;p&gt;Every queue needs a maximum capacity, an overflow policy, a drop/replacement counter, and an owner responsible for recovery.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Latest wins:&lt;/strong&gt; pose, preview frames, current detections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drop old items:&lt;/strong&gt; display-oriented streams where freshness matters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persist:&lt;/strong&gt; events that must survive disconnection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reject with feedback:&lt;/strong&gt; commands that cannot safely be queued.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An unbounded telemetry or log list turns overload into memory growth rather than a visible, measurable condition.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Protect the Flutter frame budget
&lt;/h2&gt;

&lt;p&gt;Keep parsing, filtering, and transformations out of &lt;code&gt;build()&lt;/code&gt;. Split screens into independently updating sections and avoid rebuilding camera or map widgets for unrelated state changes.&lt;/p&gt;

&lt;p&gt;For CPU-heavy pure Dart work, benchmark &lt;code&gt;compute&lt;/code&gt; or a dedicated isolate with realistic payload sizes. Isolates have startup and message-transfer costs. For hardware acceleration or platform APIs, prefer a native service designed for that workload.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Keep robotics compute near the robot
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sensors -&amp;gt; ROS 2 / accelerated nodes -&amp;gt; Jetson gateway
                                      |
                             compact UI-facing state
                                      |
                         WebSocket / MQTT / gRPC
                                      |
                              Flutter client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NVIDIA Isaac ROS provides accelerated, low-latency ROS 2 packages for Jetson and other NVIDIA platforms. Keep image processing, inference, and robot control on the compute side; send Flutter only the information needed for visualization and operator decisions. See &lt;a href="https://nvidia-isaac-ros.github.io/" rel="noopener noreferrer"&gt;https://nvidia-isaac-ros.github.io/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Treat stale data as a first-class state
&lt;/h2&gt;

&lt;p&gt;Carry source timestamp, receive timestamp, sequence number/version, source identity, and optional confidence or quality. The UI must distinguish zero from unknown, disconnected, and stale. Do not show a green health indicator just because the last payload was healthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Validate graceful degradation
&lt;/h2&gt;

&lt;p&gt;Simulate network delay and packet loss, bursts, robot process restarts, wearable permission loss, camera interruptions, inference slowdown, low memory, and thermal throttling. Under pressure, reduce preview resolution or update frequency and pause nonessential charts—but preserve command and safety status visibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Release checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Frame-time baseline captured on physical hardware&lt;/li&gt;
&lt;li&gt;[ ] p50/p95/p99 event-to-display latency measured&lt;/li&gt;
&lt;li&gt;[ ] Queues bounded and overflow observable&lt;/li&gt;
&lt;li&gt;[ ] High-frequency state coalesced before UI updates&lt;/li&gt;
&lt;li&gt;[ ] Commands and alarms use reliable semantics&lt;/li&gt;
&lt;li&gt;[ ] Clock domains and stale-data rules documented&lt;/li&gt;
&lt;li&gt;[ ] Network and reconnect behavior tested&lt;/li&gt;
&lt;li&gt;[ ] Thermal and memory pressure scenarios tested&lt;/li&gt;
&lt;li&gt;[ ] Robot safety remains independent of the mobile app&lt;/li&gt;
&lt;li&gt;[ ] Performance budgets enforced in repeatable tests&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advanced focus: Profiling workflow
&lt;/h2&gt;

&lt;p&gt;Compare UI and raster work in DevTools. Add &lt;code&gt;Timeline&lt;/code&gt; spans around parsing, list transformation, and state publication. Detailed tracing can add overhead, so enable it only for focused investigations. Benchmark a repeatable scenario with robot motion, camera preview, and diagnostics active. Fix the largest measured bottleneck first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation exercise
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add timestamps and sequence IDs at the gateway boundary.&lt;/li&gt;
&lt;li&gt;Capture a normal-load trace and a burst-load trace.&lt;/li&gt;
&lt;li&gt;Implement a bounded buffer and an explicit overload policy.&lt;/li&gt;
&lt;li&gt;Display stale/disconnected/degraded states separately.&lt;/li&gt;
&lt;li&gt;Profile on the target device and compare p50, p95, and p99 results.&lt;/li&gt;
&lt;li&gt;Document which events may be coalesced and which must be preserved.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The strongest performance gains usually come from controlling the whole data pipeline: acquisition, processing, filtering, transport, state updates, and rendering. Keep compute close to the hardware, bound every queue, measure freshness as well as frame rate, and keep safety-critical behavior independent of the Flutter client.&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>performance</category>
      <category>smartglasses</category>
      <category>robotics</category>
    </item>
    <item>
      <title>Flutter + Jetson: Thermal and Memory Pressure-Aware Operator UI</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Fri, 06 Nov 2026 18:54:25 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/flutter-jetson-thermal-and-memory-pressure-aware-operator-ui-3ko1</link>
      <guid>https://dev.to/vmodal_ai/flutter-jetson-thermal-and-memory-pressure-aware-operator-ui-3ko1</guid>
      <description>&lt;p&gt;This advanced tutorial treats Flutter as the operator-facing presentation layer while wearable SDKs, Jetson services, ROS 2 nodes, and NVIDIA-accelerated inference handle device-specific or compute-heavy work. The goal is predictable latency, bounded memory, useful observability, and graceful degradation—not simply maximizing message throughput.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Architecture note:&lt;/strong&gt; Keep safety-critical control loops on the robot. A Flutter app is not a hard real-time controller and must not be the sole safety mechanism.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Define measurable service objectives
&lt;/h2&gt;

&lt;p&gt;Track freshness, event-to-display latency, throughput, frame pacing, CPU, memory, network use, battery, thermal state, dropped messages, reconnect time, and command acknowledgements. Do not use a single FPS number to represent the entire system: a smooth screen can still display stale data.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Instrument the complete path
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sensor capture
  -&amp;gt; native/ROS processing
  -&amp;gt; gateway publish
  -&amp;gt; Flutter receive
  -&amp;gt; state accepted
  -&amp;gt; widget build
  -&amp;gt; frame rendered
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Record source and receive timestamps separately. Use monotonic clocks for elapsed durations within a process. When comparing devices, account for clock offset and uncertainty.&lt;/p&gt;

&lt;p&gt;Profile on a physical target in profile mode and inspect Flutter DevTools' Performance view. Debug-mode timing is not a reliable production baseline. See &lt;a href="https://docs.flutter.dev/tools/devtools/performance" rel="noopener noreferrer"&gt;https://docs.flutter.dev/tools/devtools/performance&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Establish a repeatable baseline
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Start from a clean launch.&lt;/li&gt;
&lt;li&gt;Connect to the robot or replay a fixed trace.&lt;/li&gt;
&lt;li&gt;Run a representative scenario for several minutes.&lt;/li&gt;
&lt;li&gt;Record frame times, memory, CPU, message rates, stale-data counts, and reconnects.&lt;/li&gt;
&lt;li&gt;Change one variable at a time.&lt;/li&gt;
&lt;li&gt;Compare p50, p95, and p99 latency, not just averages.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PipelineMetrics&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;received&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;accepted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;dropped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;stale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;uiPublishes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use bounded metric windows or histograms; do not store every sample forever.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Separate acquisition from presentation
&lt;/h2&gt;

&lt;p&gt;High-rate sources should not directly trigger widget rebuilds. Use a latest-value cache for state-like data, bounded queues for events that must be preserved, and a controlled presentation cadence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LatestValue&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;_value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;_version&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_version&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replacing an older pending value may be acceptable for battery, pose, or temperature. Commands, alarms, and audit events need a separate reliable path and explicit acknowledgement semantics.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Make buffering bounded
&lt;/h2&gt;

&lt;p&gt;Every queue needs a maximum capacity, an overflow policy, a drop/replacement counter, and an owner responsible for recovery.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Latest wins:&lt;/strong&gt; pose, preview frames, current detections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drop old items:&lt;/strong&gt; display-oriented streams where freshness matters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persist:&lt;/strong&gt; events that must survive disconnection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reject with feedback:&lt;/strong&gt; commands that cannot safely be queued.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An unbounded telemetry or log list turns overload into memory growth rather than a visible, measurable condition.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Protect the Flutter frame budget
&lt;/h2&gt;

&lt;p&gt;Keep parsing, filtering, and transformations out of &lt;code&gt;build()&lt;/code&gt;. Split screens into independently updating sections and avoid rebuilding camera or map widgets for unrelated state changes.&lt;/p&gt;

&lt;p&gt;For CPU-heavy pure Dart work, benchmark &lt;code&gt;compute&lt;/code&gt; or a dedicated isolate with realistic payload sizes. Isolates have startup and message-transfer costs. For hardware acceleration or platform APIs, prefer a native service designed for that workload.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Keep robotics compute near the robot
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sensors -&amp;gt; ROS 2 / accelerated nodes -&amp;gt; Jetson gateway
                                      |
                             compact UI-facing state
                                      |
                         WebSocket / MQTT / gRPC
                                      |
                              Flutter client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NVIDIA Isaac ROS provides accelerated, low-latency ROS 2 packages for Jetson and other NVIDIA platforms. Keep image processing, inference, and robot control on the compute side; send Flutter only the information needed for visualization and operator decisions. See &lt;a href="https://nvidia-isaac-ros.github.io/" rel="noopener noreferrer"&gt;https://nvidia-isaac-ros.github.io/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Treat stale data as a first-class state
&lt;/h2&gt;

&lt;p&gt;Carry source timestamp, receive timestamp, sequence number/version, source identity, and optional confidence or quality. The UI must distinguish zero from unknown, disconnected, and stale. Do not show a green health indicator just because the last payload was healthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Validate graceful degradation
&lt;/h2&gt;

&lt;p&gt;Simulate network delay and packet loss, bursts, robot process restarts, wearable permission loss, camera interruptions, inference slowdown, low memory, and thermal throttling. Under pressure, reduce preview resolution or update frequency and pause nonessential charts—but preserve command and safety status visibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Release checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Frame-time baseline captured on physical hardware&lt;/li&gt;
&lt;li&gt;[ ] p50/p95/p99 event-to-display latency measured&lt;/li&gt;
&lt;li&gt;[ ] Queues bounded and overflow observable&lt;/li&gt;
&lt;li&gt;[ ] High-frequency state coalesced before UI updates&lt;/li&gt;
&lt;li&gt;[ ] Commands and alarms use reliable semantics&lt;/li&gt;
&lt;li&gt;[ ] Clock domains and stale-data rules documented&lt;/li&gt;
&lt;li&gt;[ ] Network and reconnect behavior tested&lt;/li&gt;
&lt;li&gt;[ ] Thermal and memory pressure scenarios tested&lt;/li&gt;
&lt;li&gt;[ ] Robot safety remains independent of the mobile app&lt;/li&gt;
&lt;li&gt;[ ] Performance budgets enforced in repeatable tests&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advanced focus: Thermal and memory pressure
&lt;/h2&gt;

&lt;p&gt;Under resource pressure, reduce nonessential preview quality, chart frequency, and diagnostic verbosity. Never hide safety warnings or present missing telemetry as healthy. Observe Jetson health at the service layer; Flutter should display health and degradation policy rather than attempting to manage hardware clocks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation exercise
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add timestamps and sequence IDs at the gateway boundary.&lt;/li&gt;
&lt;li&gt;Capture a normal-load trace and a burst-load trace.&lt;/li&gt;
&lt;li&gt;Implement a bounded buffer and an explicit overload policy.&lt;/li&gt;
&lt;li&gt;Display stale/disconnected/degraded states separately.&lt;/li&gt;
&lt;li&gt;Profile on the target device and compare p50, p95, and p99 results.&lt;/li&gt;
&lt;li&gt;Document which events may be coalesced and which must be preserved.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The strongest performance gains usually come from controlling the whole data pipeline: acquisition, processing, filtering, transport, state updates, and rendering. Keep compute close to the hardware, bound every queue, measure freshness as well as frame rate, and keep safety-critical behavior independent of the Flutter client.&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>physicalai</category>
      <category>nvidia</category>
      <category>flutter</category>
      <category>jetson</category>
    </item>
    <item>
      <title>Flutter Robotics: Bounded Queues, Load Shedding, and Priority Channels</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Fri, 06 Nov 2026 18:52:13 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/flutter-robotics-bounded-queues-load-shedding-and-priority-channels-590b</link>
      <guid>https://dev.to/vmodal_ai/flutter-robotics-bounded-queues-load-shedding-and-priority-channels-590b</guid>
      <description>&lt;p&gt;This advanced tutorial treats Flutter as the operator-facing presentation layer while wearable SDKs, Jetson services, ROS 2 nodes, and NVIDIA-accelerated inference handle device-specific or compute-heavy work. The goal is predictable latency, bounded memory, useful observability, and graceful degradation—not simply maximizing message throughput.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Architecture note:&lt;/strong&gt; Keep safety-critical control loops on the robot. A Flutter app is not a hard real-time controller and must not be the sole safety mechanism.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Define measurable service objectives
&lt;/h2&gt;

&lt;p&gt;Track freshness, event-to-display latency, throughput, frame pacing, CPU, memory, network use, battery, thermal state, dropped messages, reconnect time, and command acknowledgements. Do not use a single FPS number to represent the entire system: a smooth screen can still display stale data.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Instrument the complete path
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sensor capture
  -&amp;gt; native/ROS processing
  -&amp;gt; gateway publish
  -&amp;gt; Flutter receive
  -&amp;gt; state accepted
  -&amp;gt; widget build
  -&amp;gt; frame rendered
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Record source and receive timestamps separately. Use monotonic clocks for elapsed durations within a process. When comparing devices, account for clock offset and uncertainty.&lt;/p&gt;

&lt;p&gt;Profile on a physical target in profile mode and inspect Flutter DevTools' Performance view. Debug-mode timing is not a reliable production baseline. See &lt;a href="https://docs.flutter.dev/tools/devtools/performance" rel="noopener noreferrer"&gt;https://docs.flutter.dev/tools/devtools/performance&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Establish a repeatable baseline
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Start from a clean launch.&lt;/li&gt;
&lt;li&gt;Connect to the robot or replay a fixed trace.&lt;/li&gt;
&lt;li&gt;Run a representative scenario for several minutes.&lt;/li&gt;
&lt;li&gt;Record frame times, memory, CPU, message rates, stale-data counts, and reconnects.&lt;/li&gt;
&lt;li&gt;Change one variable at a time.&lt;/li&gt;
&lt;li&gt;Compare p50, p95, and p99 latency, not just averages.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PipelineMetrics&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;received&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;accepted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;dropped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;stale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;uiPublishes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use bounded metric windows or histograms; do not store every sample forever.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Separate acquisition from presentation
&lt;/h2&gt;

&lt;p&gt;High-rate sources should not directly trigger widget rebuilds. Use a latest-value cache for state-like data, bounded queues for events that must be preserved, and a controlled presentation cadence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LatestValue&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;_value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;_version&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_version&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replacing an older pending value may be acceptable for battery, pose, or temperature. Commands, alarms, and audit events need a separate reliable path and explicit acknowledgement semantics.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Make buffering bounded
&lt;/h2&gt;

&lt;p&gt;Every queue needs a maximum capacity, an overflow policy, a drop/replacement counter, and an owner responsible for recovery.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Latest wins:&lt;/strong&gt; pose, preview frames, current detections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drop old items:&lt;/strong&gt; display-oriented streams where freshness matters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persist:&lt;/strong&gt; events that must survive disconnection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reject with feedback:&lt;/strong&gt; commands that cannot safely be queued.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An unbounded telemetry or log list turns overload into memory growth rather than a visible, measurable condition.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Protect the Flutter frame budget
&lt;/h2&gt;

&lt;p&gt;Keep parsing, filtering, and transformations out of &lt;code&gt;build()&lt;/code&gt;. Split screens into independently updating sections and avoid rebuilding camera or map widgets for unrelated state changes.&lt;/p&gt;

&lt;p&gt;For CPU-heavy pure Dart work, benchmark &lt;code&gt;compute&lt;/code&gt; or a dedicated isolate with realistic payload sizes. Isolates have startup and message-transfer costs. For hardware acceleration or platform APIs, prefer a native service designed for that workload.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Keep robotics compute near the robot
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sensors -&amp;gt; ROS 2 / accelerated nodes -&amp;gt; Jetson gateway
                                      |
                             compact UI-facing state
                                      |
                         WebSocket / MQTT / gRPC
                                      |
                              Flutter client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NVIDIA Isaac ROS provides accelerated, low-latency ROS 2 packages for Jetson and other NVIDIA platforms. Keep image processing, inference, and robot control on the compute side; send Flutter only the information needed for visualization and operator decisions. See &lt;a href="https://nvidia-isaac-ros.github.io/" rel="noopener noreferrer"&gt;https://nvidia-isaac-ros.github.io/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Treat stale data as a first-class state
&lt;/h2&gt;

&lt;p&gt;Carry source timestamp, receive timestamp, sequence number/version, source identity, and optional confidence or quality. The UI must distinguish zero from unknown, disconnected, and stale. Do not show a green health indicator just because the last payload was healthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Validate graceful degradation
&lt;/h2&gt;

&lt;p&gt;Simulate network delay and packet loss, bursts, robot process restarts, wearable permission loss, camera interruptions, inference slowdown, low memory, and thermal throttling. Under pressure, reduce preview resolution or update frequency and pause nonessential charts—but preserve command and safety status visibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Release checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Frame-time baseline captured on physical hardware&lt;/li&gt;
&lt;li&gt;[ ] p50/p95/p99 event-to-display latency measured&lt;/li&gt;
&lt;li&gt;[ ] Queues bounded and overflow observable&lt;/li&gt;
&lt;li&gt;[ ] High-frequency state coalesced before UI updates&lt;/li&gt;
&lt;li&gt;[ ] Commands and alarms use reliable semantics&lt;/li&gt;
&lt;li&gt;[ ] Clock domains and stale-data rules documented&lt;/li&gt;
&lt;li&gt;[ ] Network and reconnect behavior tested&lt;/li&gt;
&lt;li&gt;[ ] Thermal and memory pressure scenarios tested&lt;/li&gt;
&lt;li&gt;[ ] Robot safety remains independent of the mobile app&lt;/li&gt;
&lt;li&gt;[ ] Performance budgets enforced in repeatable tests&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advanced focus: Load shedding
&lt;/h2&gt;

&lt;p&gt;Define priority classes explicitly, for example: P0 safety status and command acknowledgements; P1 operator commands; P2 pose and AI state; P3 previews and charts; P4 logs. This is an application example, not a universal safety standard. Ensure low-priority work cannot block critical state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation exercise
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add timestamps and sequence IDs at the gateway boundary.&lt;/li&gt;
&lt;li&gt;Capture a normal-load trace and a burst-load trace.&lt;/li&gt;
&lt;li&gt;Implement a bounded buffer and an explicit overload policy.&lt;/li&gt;
&lt;li&gt;Display stale/disconnected/degraded states separately.&lt;/li&gt;
&lt;li&gt;Profile on the target device and compare p50, p95, and p99 results.&lt;/li&gt;
&lt;li&gt;Document which events may be coalesced and which must be preserved.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The strongest performance gains usually come from controlling the whole data pipeline: acquisition, processing, filtering, transport, state updates, and rendering. Keep compute close to the hardware, bound every queue, measure freshness as well as frame rate, and keep safety-critical behavior independent of the Flutter client.&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>robotics</category>
      <category>performance</category>
    </item>
    <item>
      <title>Flutter + NVIDIA Jetson: Designing a Low-Latency Robotics Gateway</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Fri, 06 Nov 2026 18:50:15 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/flutter-nvidia-jetson-designing-a-low-latency-robotics-gateway-ooi</link>
      <guid>https://dev.to/vmodal_ai/flutter-nvidia-jetson-designing-a-low-latency-robotics-gateway-ooi</guid>
      <description>&lt;h1&gt;
  
  
  Flutter + NVIDIA Jetson: Designing a Low-Latency Robotics Gateway
&lt;/h1&gt;

&lt;p&gt;This advanced tutorial treats Flutter as the operator-facing presentation layer while wearable SDKs, Jetson services, ROS 2 nodes, and NVIDIA-accelerated inference handle device-specific or compute-heavy work. The goal is predictable latency, bounded memory, useful observability, and graceful degradation—not simply maximizing message throughput.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Architecture note:&lt;/strong&gt; Keep safety-critical control loops on the robot. A Flutter app is not a hard real-time controller and must not be the sole safety mechanism.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Define measurable service objectives
&lt;/h2&gt;

&lt;p&gt;Track freshness, event-to-display latency, throughput, frame pacing, CPU, memory, network use, battery, thermal state, dropped messages, reconnect time, and command acknowledgements. Do not use a single FPS number to represent the entire system: a smooth screen can still display stale data.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Instrument the complete path
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sensor capture
  -&amp;gt; native/ROS processing
  -&amp;gt; gateway publish
  -&amp;gt; Flutter receive
  -&amp;gt; state accepted
  -&amp;gt; widget build
  -&amp;gt; frame rendered
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Record source and receive timestamps separately. Use monotonic clocks for elapsed durations within a process. When comparing devices, account for clock offset and uncertainty.&lt;/p&gt;

&lt;p&gt;Profile on a physical target in profile mode and inspect Flutter DevTools' Performance view. Debug-mode timing is not a reliable production baseline. See &lt;a href="https://docs.flutter.dev/tools/devtools/performance" rel="noopener noreferrer"&gt;https://docs.flutter.dev/tools/devtools/performance&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Establish a repeatable baseline
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Start from a clean launch.&lt;/li&gt;
&lt;li&gt;Connect to the robot or replay a fixed trace.&lt;/li&gt;
&lt;li&gt;Run a representative scenario for several minutes.&lt;/li&gt;
&lt;li&gt;Record frame times, memory, CPU, message rates, stale-data counts, and reconnects.&lt;/li&gt;
&lt;li&gt;Change one variable at a time.&lt;/li&gt;
&lt;li&gt;Compare p50, p95, and p99 latency, not just averages.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PipelineMetrics&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;received&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;accepted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;dropped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;stale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;uiPublishes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use bounded metric windows or histograms; do not store every sample forever.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Separate acquisition from presentation
&lt;/h2&gt;

&lt;p&gt;High-rate sources should not directly trigger widget rebuilds. Use a latest-value cache for state-like data, bounded queues for events that must be preserved, and a controlled presentation cadence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LatestValue&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;_value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;_version&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_version&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replacing an older pending value may be acceptable for battery, pose, or temperature. Commands, alarms, and audit events need a separate reliable path and explicit acknowledgement semantics.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Make buffering bounded
&lt;/h2&gt;

&lt;p&gt;Every queue needs a maximum capacity, an overflow policy, a drop/replacement counter, and an owner responsible for recovery.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Latest wins:&lt;/strong&gt; pose, preview frames, current detections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drop old items:&lt;/strong&gt; display-oriented streams where freshness matters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persist:&lt;/strong&gt; events that must survive disconnection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reject with feedback:&lt;/strong&gt; commands that cannot safely be queued.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An unbounded telemetry or log list turns overload into memory growth rather than a visible, measurable condition.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Protect the Flutter frame budget
&lt;/h2&gt;

&lt;p&gt;Keep parsing, filtering, and transformations out of &lt;code&gt;build()&lt;/code&gt;. Split screens into independently updating sections and avoid rebuilding camera or map widgets for unrelated state changes.&lt;/p&gt;

&lt;p&gt;For CPU-heavy pure Dart work, benchmark &lt;code&gt;compute&lt;/code&gt; or a dedicated isolate with realistic payload sizes. Isolates have startup and message-transfer costs. For hardware acceleration or platform APIs, prefer a native service designed for that workload.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Keep robotics compute near the robot
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sensors -&amp;gt; ROS 2 / accelerated nodes -&amp;gt; Jetson gateway
                                      |
                             compact UI-facing state
                                      |
                         WebSocket / MQTT / gRPC
                                      |
                              Flutter client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NVIDIA Isaac ROS provides accelerated, low-latency ROS 2 packages for Jetson and other NVIDIA platforms. Keep image processing, inference, and robot control on the compute side; send Flutter only the information needed for visualization and operator decisions. See &lt;a href="https://nvidia-isaac-ros.github.io/" rel="noopener noreferrer"&gt;https://nvidia-isaac-ros.github.io/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Treat stale data as a first-class state
&lt;/h2&gt;

&lt;p&gt;Carry source timestamp, receive timestamp, sequence number/version, source identity, and optional confidence or quality. The UI must distinguish zero from unknown, disconnected, and stale. Do not show a green health indicator just because the last payload was healthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Validate graceful degradation
&lt;/h2&gt;

&lt;p&gt;Simulate network delay and packet loss, bursts, robot process restarts, wearable permission loss, camera interruptions, inference slowdown, low memory, and thermal throttling. Under pressure, reduce preview resolution or update frequency and pause nonessential charts—but preserve command and safety status visibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Release checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Frame-time baseline captured on physical hardware&lt;/li&gt;
&lt;li&gt;[ ] p50/p95/p99 event-to-display latency measured&lt;/li&gt;
&lt;li&gt;[ ] Queues bounded and overflow observable&lt;/li&gt;
&lt;li&gt;[ ] High-frequency state coalesced before UI updates&lt;/li&gt;
&lt;li&gt;[ ] Commands and alarms use reliable semantics&lt;/li&gt;
&lt;li&gt;[ ] Clock domains and stale-data rules documented&lt;/li&gt;
&lt;li&gt;[ ] Network and reconnect behavior tested&lt;/li&gt;
&lt;li&gt;[ ] Thermal and memory pressure scenarios tested&lt;/li&gt;
&lt;li&gt;[ ] Robot safety remains independent of the mobile app&lt;/li&gt;
&lt;li&gt;[ ] Performance budgets enforced in repeatable tests&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advanced focus: Gateway design
&lt;/h2&gt;

&lt;p&gt;Keep Flutter independent of internal ROS topic names. Map robot-specific messages into versioned application DTOs with schema version, timestamp, sequence number, and capability flags. Separate read-only telemetry from command endpoints, authenticate clients, authorize commands, and report acknowledgements explicitly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation exercise
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add timestamps and sequence IDs at the gateway boundary.&lt;/li&gt;
&lt;li&gt;Capture a normal-load trace and a burst-load trace.&lt;/li&gt;
&lt;li&gt;Implement a bounded buffer and an explicit overload policy.&lt;/li&gt;
&lt;li&gt;Display stale/disconnected/degraded states separately.&lt;/li&gt;
&lt;li&gt;Profile on the target device and compare p50, p95, and p99 results.&lt;/li&gt;
&lt;li&gt;Document which events may be coalesced and which must be preserved.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The strongest performance gains usually come from controlling the whole data pipeline: acquisition, processing, filtering, transport, state updates, and rendering. Keep compute close to the hardware, bound every queue, measure freshness as well as frame rate, and keep safety-critical behavior independent of the Flutter client.&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>nvidia</category>
      <category>jetson</category>
    </item>
    <item>
      <title>Google Android XR and Smart Glasses: A Flutter Integration Strategy</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Thu, 05 Nov 2026 15:24:12 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/google-android-xr-and-smart-glasses-a-flutter-integration-strategy-p8f</link>
      <guid>https://dev.to/vmodal_ai/google-android-xr-and-smart-glasses-a-flutter-integration-strategy-p8f</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Developers may assume one universal 'Google glasses SDK' exists for&lt;br&gt;
every device. In practice, the available APIs depend on the target&lt;br&gt;
Android XR device, release channel, form factor, and whether the&lt;br&gt;
experience is a standard Android app or a specialized XR experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this guide covers
&lt;/h2&gt;

&lt;p&gt;This tutorial focuses on practical architecture and performance&lt;br&gt;
engineering for production systems. The central principle is to measure&lt;br&gt;
the complete pipeline, keep latency-sensitive work close to the&lt;br&gt;
hardware, and make failure states visible to the operator.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference architecture
&lt;/h2&gt;

&lt;p&gt;Flutter app for shared screens and workflows → Android host integration&lt;br&gt;
for device-specific APIs → supported Android XR / wearable APIs →&lt;br&gt;
service layer. Isolate experimental XR APIs behind interfaces so the&lt;br&gt;
rest of the app remains stable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation plan
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; Start from current official Android XR documentation and identify
the exact device class and API surface you target.&lt;/li&gt;
&lt;li&gt; Build a native Kotlin sample that proves the required capability
before adding Flutter complexity.&lt;/li&gt;
&lt;li&gt; Use Flutter for account, settings, history, and non-spatial UI; use
native Android/XR components where the platform requires them.&lt;/li&gt;
&lt;li&gt; Define feature flags and capability detection instead of hard-coding
a single device assumption.&lt;/li&gt;
&lt;li&gt; Keep the app useful on phones when XR hardware is absent or
unsupported.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;abstract&lt;/span&gt; &lt;span class="kd"&gt;interface&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DeviceCapabilities&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="n"&gt;Future&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;supportsSpatialDisplay&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="n"&gt;Future&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;supportsWearableInput&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="n"&gt;Future&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;supportsCameraContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="c1"&gt;// UI should branch on capabilities, not brand-name assumptions.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The snippets are illustrative starting points, not drop-in integrations.&lt;br&gt;
Match APIs and version requirements to the exact SDK, OS image, hardware&lt;br&gt;
revision, and runtime in your project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Measure end-to-end latency, not only one function or model
invocation.&lt;/li&gt;
&lt;li&gt;  Report p50 and p95/p99 latency alongside throughput, memory use, and
dropped work.&lt;/li&gt;
&lt;li&gt;  Bound queues and define what happens when consumers fall behind.&lt;/li&gt;
&lt;li&gt;  Avoid repeated frame copies and expensive work on Flutter's UI
isolate.&lt;/li&gt;
&lt;li&gt;  Test sustained workloads after the device reaches thermal
equilibrium.&lt;/li&gt;
&lt;li&gt;  Keep UI state, device state, and robot state distinct.&lt;/li&gt;
&lt;li&gt;  Add timeouts, cancellation, reconnection, and explicit stale-data
indicators.&lt;/li&gt;
&lt;li&gt;  Profile on the actual target hardware using a reproducible build.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common pitfalls
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Do not invent or depend on undocumented APIs or assume a consumer
SDK is generally available.&lt;/li&gt;
&lt;li&gt;  Separate Android XR capabilities from Wear OS APIs; they are not
interchangeable.&lt;/li&gt;
&lt;li&gt;  Treat preview APIs as changeable and pin versions for reproducible
builds.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hands-on exercise
&lt;/h2&gt;

&lt;p&gt;Create a capability matrix for phone, tablet, headset, and glasses&lt;br&gt;
targets. Mark each feature as supported, unsupported, experimental, or&lt;br&gt;
not verified.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://docs.flutter.dev/perf/best-practices" rel="noopener noreferrer"&gt;Flutter performance best
practices&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.flutter.dev/tools/devtools" rel="noopener noreferrer"&gt;Flutter DevTools&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.android.com/" rel="noopener noreferrer"&gt;Android Developers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.nvidia.com/" rel="noopener noreferrer"&gt;NVIDIA Developer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.ros.org/" rel="noopener noreferrer"&gt;ROS 2 documentation&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>android</category>
      <category>robotics</category>
      <category>ai</category>
    </item>
    <item>
      <title>Smart Glasses + Flutter: Frame Skipping That Preserves Interaction Quality</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Thu, 05 Nov 2026 15:21:31 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/smart-glasses-flutter-frame-skipping-that-preserves-interaction-quality-1605</link>
      <guid>https://dev.to/vmodal_ai/smart-glasses-flutter-frame-skipping-that-preserves-interaction-quality-1605</guid>
      <description>&lt;p&gt;When a camera or vision pipeline produces frames faster than the app can process them, a queue makes the interface increasingly delayed. A deliberate frame-skipping policy can improve responsiveness.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decide which frames are disposable
&lt;/h2&gt;

&lt;p&gt;For preview or detection, the newest frame may matter more than every historical frame. Recording and safety-critical perception need different guarantees.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prefer latest-frame processing
&lt;/h2&gt;

&lt;p&gt;Keep at most one pending preview frame. If processing is busy, replace the pending preview frame rather than letting latency grow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid unnecessary pixel copies
&lt;/h2&gt;

&lt;p&gt;Inspect image format and buffer ownership. Convert formats only when needed, release buffers promptly, and consider native processing for device-specific camera pipelines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate preview and inference cadence
&lt;/h2&gt;

&lt;p&gt;The UI can show a smooth preview while inference runs less frequently. Label detection age so overlays are not mistaken for current reality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Profile sustained sessions
&lt;/h2&gt;

&lt;p&gt;Thermal limits, resolution, codec, and memory bandwidth change the optimal policy. Test long sessions on target hardware.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example implementation
&lt;/h2&gt;

&lt;p&gt;This Dart snippet illustrates one part of the design. Adapt types, transport behavior, timestamp semantics, and platform APIs to your actual system before production use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;processing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;CameraFrame&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;pendingFrame&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;Future&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;onFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;CameraFrame&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Illustrative: replace CameraFrame/processFrame with your API.&lt;/span&gt;
  &lt;span class="n"&gt;pendingFrame&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;processing&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;processing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pendingFrame&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;next&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pendingFrame&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;pendingFrame&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;processFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;processing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Performance checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Measure p95/p99 behavior on target hardware, not only a desktop simulator.&lt;/li&gt;
&lt;li&gt;Bound queues and buffers; define what may be coalesced or dropped.&lt;/li&gt;
&lt;li&gt;Keep heavy parsing, image processing, and inference away from the Flutter UI thread.&lt;/li&gt;
&lt;li&gt;Track source timestamps, sequence numbers, stale-data rate, and dropped updates.&lt;/li&gt;
&lt;li&gt;Test network degradation, reconnects, sustained operation, and resource pressure.&lt;/li&gt;
&lt;li&gt;Keep control commands and critical alerts separate from replaceable telemetry.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>smartglasses</category>
      <category>performance</category>
      <category>camera</category>
    </item>
    <item>
      <title>Flutter + Jetson: Adaptive Video Streaming Under CPU and Network Pressure</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Thu, 05 Nov 2026 15:18:23 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/flutter-jetson-adaptive-video-streaming-under-cpu-and-network-pressure-3011</link>
      <guid>https://dev.to/vmodal_ai/flutter-jetson-adaptive-video-streaming-under-cpu-and-network-pressure-3011</guid>
      <description>&lt;p&gt;This advanced tutorial treats Flutter as the operator-facing presentation layer while wearable SDKs, Jetson services, ROS 2 nodes, and NVIDIA-accelerated inference handle device-specific or compute-heavy work. The goal is predictable latency, bounded memory, useful observability, and graceful degradation—not simply maximizing message throughput.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Architecture note:&lt;/strong&gt; Keep safety-critical control loops on the robot. A Flutter app is not a hard real-time controller and must not be the sole safety mechanism.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Define measurable service objectives
&lt;/h2&gt;

&lt;p&gt;Track freshness, event-to-display latency, throughput, frame pacing, CPU, memory, network use, battery, thermal state, dropped messages, reconnect time, and command acknowledgements. Do not use a single FPS number to represent the entire system: a smooth screen can still display stale data.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Instrument the complete path
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sensor capture
  -&amp;gt; native/ROS processing
  -&amp;gt; gateway publish
  -&amp;gt; Flutter receive
  -&amp;gt; state accepted
  -&amp;gt; widget build
  -&amp;gt; frame rendered
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Record source and receive timestamps separately. Use monotonic clocks for elapsed durations within a process. When comparing devices, account for clock offset and uncertainty.&lt;/p&gt;

&lt;p&gt;Profile on a physical target in profile mode and inspect Flutter DevTools' Performance view. Debug-mode timing is not a reliable production baseline. See &lt;a href="https://docs.flutter.dev/tools/devtools/performance" rel="noopener noreferrer"&gt;https://docs.flutter.dev/tools/devtools/performance&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Establish a repeatable baseline
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Start from a clean launch.&lt;/li&gt;
&lt;li&gt;Connect to the robot or replay a fixed trace.&lt;/li&gt;
&lt;li&gt;Run a representative scenario for several minutes.&lt;/li&gt;
&lt;li&gt;Record frame times, memory, CPU, message rates, stale-data counts, and reconnects.&lt;/li&gt;
&lt;li&gt;Change one variable at a time.&lt;/li&gt;
&lt;li&gt;Compare p50, p95, and p99 latency, not just averages.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PipelineMetrics&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;received&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;accepted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;dropped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;stale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;uiPublishes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use bounded metric windows or histograms; do not store every sample forever.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Separate acquisition from presentation
&lt;/h2&gt;

&lt;p&gt;High-rate sources should not directly trigger widget rebuilds. Use a latest-value cache for state-like data, bounded queues for events that must be preserved, and a controlled presentation cadence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LatestValue&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;_value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;_version&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_version&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replacing an older pending value may be acceptable for battery, pose, or temperature. Commands, alarms, and audit events need a separate reliable path and explicit acknowledgement semantics.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Make buffering bounded
&lt;/h2&gt;

&lt;p&gt;Every queue needs a maximum capacity, an overflow policy, a drop/replacement counter, and an owner responsible for recovery.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Latest wins:&lt;/strong&gt; pose, preview frames, current detections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drop old items:&lt;/strong&gt; display-oriented streams where freshness matters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persist:&lt;/strong&gt; events that must survive disconnection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reject with feedback:&lt;/strong&gt; commands that cannot safely be queued.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An unbounded telemetry or log list turns overload into memory growth rather than a visible, measurable condition.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Protect the Flutter frame budget
&lt;/h2&gt;

&lt;p&gt;Keep parsing, filtering, and transformations out of &lt;code&gt;build()&lt;/code&gt;. Split screens into independently updating sections and avoid rebuilding camera or map widgets for unrelated state changes.&lt;/p&gt;

&lt;p&gt;For CPU-heavy pure Dart work, benchmark &lt;code&gt;compute&lt;/code&gt; or a dedicated isolate with realistic payload sizes. Isolates have startup and message-transfer costs. For hardware acceleration or platform APIs, prefer a native service designed for that workload.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Keep robotics compute near the robot
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sensors -&amp;gt; ROS 2 / accelerated nodes -&amp;gt; Jetson gateway
                                      |
                             compact UI-facing state
                                      |
                         WebSocket / MQTT / gRPC
                                      |
                              Flutter client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NVIDIA Isaac ROS provides accelerated, low-latency ROS 2 packages for Jetson and other NVIDIA platforms. Keep image processing, inference, and robot control on the compute side; send Flutter only the information needed for visualization and operator decisions. See &lt;a href="https://nvidia-isaac-ros.github.io/" rel="noopener noreferrer"&gt;https://nvidia-isaac-ros.github.io/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Treat stale data as a first-class state
&lt;/h2&gt;

&lt;p&gt;Carry source timestamp, receive timestamp, sequence number/version, source identity, and optional confidence or quality. The UI must distinguish zero from unknown, disconnected, and stale. Do not show a green health indicator just because the last payload was healthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Validate graceful degradation
&lt;/h2&gt;

&lt;p&gt;Simulate network delay and packet loss, bursts, robot process restarts, wearable permission loss, camera interruptions, inference slowdown, low memory, and thermal throttling. Under pressure, reduce preview resolution or update frequency and pause nonessential charts—but preserve command and safety status visibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Release checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Frame-time baseline captured on physical hardware&lt;/li&gt;
&lt;li&gt;[ ] p50/p95/p99 event-to-display latency measured&lt;/li&gt;
&lt;li&gt;[ ] Queues bounded and overflow observable&lt;/li&gt;
&lt;li&gt;[ ] High-frequency state coalesced before UI updates&lt;/li&gt;
&lt;li&gt;[ ] Commands and alarms use reliable semantics&lt;/li&gt;
&lt;li&gt;[ ] Clock domains and stale-data rules documented&lt;/li&gt;
&lt;li&gt;[ ] Network and reconnect behavior tested&lt;/li&gt;
&lt;li&gt;[ ] Thermal and memory pressure scenarios tested&lt;/li&gt;
&lt;li&gt;[ ] Robot safety remains independent of the mobile app&lt;/li&gt;
&lt;li&gt;[ ] Performance budgets enforced in repeatable tests&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advanced focus: Adaptive streaming
&lt;/h2&gt;

&lt;p&gt;Define tested low, balanced, and high stream profiles. Switch based on network throughput, decode time, temperature, and frame health, with hysteresis to avoid oscillation. Lower resolution or frame rate before allowing queues to grow. Display the active profile and the reason for a switch in diagnostics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation exercise
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add timestamps and sequence IDs at the gateway boundary.&lt;/li&gt;
&lt;li&gt;Capture a normal-load trace and a burst-load trace.&lt;/li&gt;
&lt;li&gt;Implement a bounded buffer and an explicit overload policy.&lt;/li&gt;
&lt;li&gt;Display stale/disconnected/degraded states separately.&lt;/li&gt;
&lt;li&gt;Profile on the target device and compare p50, p95, and p99 results.&lt;/li&gt;
&lt;li&gt;Document which events may be coalesced and which must be preserved.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The strongest performance gains usually come from controlling the whole data pipeline: acquisition, processing, filtering, transport, state updates, and rendering. Keep compute close to the hardware, bound every queue, measure freshness as well as frame rate, and keep safety-critical behavior independent of the Flutter client.&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>nvidia</category>
    </item>
    <item>
      <title>Shipping Flutter + Smart Glasses + Jetson + ROS 2: An End-to-End Checklist</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Thu, 05 Nov 2026 15:14:39 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/shipping-flutter-smart-glasses-jetson-ros-2-an-end-to-end-checklist-5bb5</link>
      <guid>https://dev.to/vmodal_ai/shipping-flutter-smart-glasses-jetson-ros-2-an-end-to-end-checklist-5bb5</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Cross-device systems fail at boundaries: mismatched SDK versions,&lt;br&gt;
unsupported hardware, permissions, unstable Wi-Fi, overloaded inference,&lt;br&gt;
unhandled robot errors, or missing observability. A release checklist&lt;br&gt;
makes these risks explicit.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this guide covers
&lt;/h2&gt;

&lt;p&gt;This tutorial focuses on practical architecture and performance&lt;br&gt;
engineering for production systems. The central principle is to measure&lt;br&gt;
the complete pipeline, keep latency-sensitive work close to the&lt;br&gt;
hardware, and make failure states visible to the operator.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference architecture
&lt;/h2&gt;

&lt;p&gt;Flutter client ↔ secure API/gateway ↔ glasses adapter and/or ROS 2&lt;br&gt;
services ↔ Jetson inference/model runtime ↔ robot controller. Each&lt;br&gt;
boundary has a versioned contract, timeout, health signal, and failure&lt;br&gt;
policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation plan
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; Create a compatibility matrix for Flutter, Android, wearable SDK,
ROS 2, JetPack, CUDA/TensorRT, and model versions.&lt;/li&gt;
&lt;li&gt; Define latency budgets for UI response, camera frame age, inference,
command acknowledgement, and telemetry freshness.&lt;/li&gt;
&lt;li&gt; Verify permissions, encryption, authentication, least privilege,
retention, and data redaction.&lt;/li&gt;
&lt;li&gt; Run fault injection for device disconnect, app process death,
service restart, packet loss, overload, and invalid model output.&lt;/li&gt;
&lt;li&gt; Document rollback, known limitations, hardware setup, logs to
collect, and safe recovery steps.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;release_gates:\n  - startup_and_reconnect_tested: true\n  - p95_latency_within_budget: true\n  - stale_data_is_visible: true\n  - robot_commands_are_authorized: true\n  - thermal_soak_test_passed: true\n  - rollback_artifact_available: true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The snippets are illustrative starting points, not drop-in integrations.&lt;br&gt;
Match APIs and version requirements to the exact SDK, OS image, hardware&lt;br&gt;
revision, and runtime in your project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Measure end-to-end latency, not only one function or model
invocation.&lt;/li&gt;
&lt;li&gt;  Report p50 and p95/p99 latency alongside throughput, memory use, and
dropped work.&lt;/li&gt;
&lt;li&gt;  Bound queues and define what happens when consumers fall behind.&lt;/li&gt;
&lt;li&gt;  Avoid repeated frame copies and expensive work on Flutter's UI
isolate.&lt;/li&gt;
&lt;li&gt;  Test sustained workloads after the device reaches thermal
equilibrium.&lt;/li&gt;
&lt;li&gt;  Keep UI state, device state, and robot state distinct.&lt;/li&gt;
&lt;li&gt;  Add timeouts, cancellation, reconnection, and explicit stale-data
indicators.&lt;/li&gt;
&lt;li&gt;  Profile on the actual target hardware using a reproducible build.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common pitfalls
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Do not treat a green unit-test suite as proof of physical-system
safety.&lt;/li&gt;
&lt;li&gt;  Do not ship undocumented API assumptions or unpinned model/runtime
artifacts.&lt;/li&gt;
&lt;li&gt;  Do not expose diagnostic endpoints or debug credentials in
production builds.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hands-on exercise
&lt;/h2&gt;

&lt;p&gt;Run a simulated release review with a failure injected at each boundary.&lt;br&gt;
Record detection time, user-facing behavior, recovery action, and&lt;br&gt;
regression test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://docs.flutter.dev/perf/best-practices" rel="noopener noreferrer"&gt;Flutter performance best
practices&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.flutter.dev/tools/devtools" rel="noopener noreferrer"&gt;Flutter DevTools&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.android.com/" rel="noopener noreferrer"&gt;Android Developers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.nvidia.com/" rel="noopener noreferrer"&gt;NVIDIA Developer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.ros.org/" rel="noopener noreferrer"&gt;ROS 2 documentation&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>android</category>
      <category>robotics</category>
      <category>ai</category>
    </item>
    <item>
      <title>CI Performance Gates for Flutter Physical AI Companion Apps</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Thu, 05 Nov 2026 15:11:48 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/ci-performance-gates-for-flutter-physical-ai-companion-apps-5hgh</link>
      <guid>https://dev.to/vmodal_ai/ci-performance-gates-for-flutter-physical-ai-companion-apps-5hgh</guid>
      <description>&lt;h1&gt;
  
  
  CI Performance Gates for Flutter Physical AI Companion Apps
&lt;/h1&gt;

&lt;p&gt;Performance regressions can arrive through unrelated changes: a new chart, extra JSON parsing, larger images, or more frequent state emissions. Automated gates catch some before release.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose a stable test setup
&lt;/h2&gt;

&lt;p&gt;Use profile or release-like builds. Keep device, OS, power state, and workload consistent across comparisons.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gate product-relevant metrics
&lt;/h2&gt;

&lt;p&gt;Track frame build/raster time, startup, memory growth, decode time, queue depth, and telemetry age. Avoid one threshold for every device.&lt;/p&gt;

&lt;h2&gt;
  
  
  Store a baseline
&lt;/h2&gt;

&lt;p&gt;Record commit, dependency lockfile, test trace, device details, and metric definitions. Compare repeated runs rather than trusting one noisy sample.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep tests deterministic
&lt;/h2&gt;

&lt;p&gt;Replay saved telemetry and mock network timing for UI tests. Use hardware-in-the-loop tests for real camera, gateway, inference, and robot paths.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make failures actionable
&lt;/h2&gt;

&lt;p&gt;Publish slow stage, affected screen, trace ID, and before/after metrics so a failure points toward a cause.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example implementation
&lt;/h2&gt;

&lt;p&gt;This Dart snippet illustrates one part of the design. Adapt types, transport behavior, timestamp semantics, and platform APIs to your actual system before production use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PerformanceBudget&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;PerformanceBudget&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="kd"&gt;required&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;maxP95FrameBuildMs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="kd"&gt;required&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;maxP95DecodeMs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="kd"&gt;required&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;maxP95TelemetryAgeMs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;maxP95FrameBuildMs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;maxP95DecodeMs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;maxP95TelemetryAgeMs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Performance checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Measure p95/p99 behavior on target hardware, not only a desktop simulator.&lt;/li&gt;
&lt;li&gt;Bound queues and buffers; define what may be coalesced or dropped.&lt;/li&gt;
&lt;li&gt;Keep heavy parsing, image processing, and inference away from the Flutter UI thread.&lt;/li&gt;
&lt;li&gt;Track source timestamps, sequence numbers, stale-data rate, and dropped updates.&lt;/li&gt;
&lt;li&gt;Test network degradation, reconnects, sustained operation, and resource pressure.&lt;/li&gt;
&lt;li&gt;Keep control commands and critical alerts separate from replaceable telemetry.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>flutter</category>
      <category>performance</category>
      <category>testing</category>
    </item>
    <item>
      <title>Flutter Robot Maps: Rendering Large Occupancy Grids Efficiently</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Thu, 05 Nov 2026 00:07:24 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/flutter-robot-maps-rendering-large-occupancy-grids-efficiently-846</link>
      <guid>https://dev.to/vmodal_ai/flutter-robot-maps-rendering-large-occupancy-grids-efficiently-846</guid>
      <description>&lt;h1&gt;
  
  
  Flutter Robot Maps: Rendering Large Occupancy Grids Efficiently
&lt;/h1&gt;

&lt;p&gt;Robot maps can contain thousands or millions of cells. Building one widget per cell is usually the wrong abstraction; use a rendering strategy that matches scale and update patterns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate map data from UI state
&lt;/h2&gt;

&lt;p&gt;Store dimensions, resolution, origin, and cells in a model. Apply deltas to the model and notify the renderer only when visible regions change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose a rendering strategy
&lt;/h2&gt;

&lt;p&gt;CustomPainter can suit moderate grids with caching and repaint boundaries. Large, frequently changing maps may need tile caching or a native/GPU-backed renderer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid rebuilding every cell
&lt;/h2&gt;

&lt;p&gt;Batch cells into rows, tiles, or layers. Cache static geometry and invalidate changed regions where supported.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decouple map and telemetry refresh
&lt;/h2&gt;

&lt;p&gt;Robot pose may update often while occupancy maps change rarely. Render layers at appropriate cadences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benchmark zoom and pan
&lt;/h2&gt;

&lt;p&gt;Test representative map sizes, pixel ratios, zooming, and simultaneous telemetry. Track raster time, UI time, and memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example implementation
&lt;/h2&gt;

&lt;p&gt;This Dart snippet illustrates one part of the design. Adapt types, transport behavior, timestamp semantics, and platform APIs to your actual system before production use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MapViewportPainter&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;CustomPainter&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;MapViewportPainter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;mapRevision&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;mapRevision&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;paint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Canvas&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Size&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Draw cached tiles or batched geometry here.&lt;/span&gt;
    &lt;span class="c1"&gt;// Avoid allocating one Paint or widget per occupancy cell.&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;shouldRepaint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;covariant&lt;/span&gt; &lt;span class="n"&gt;MapViewportPainter&lt;/span&gt; &lt;span class="n"&gt;oldDelegate&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="n"&gt;oldDelegate&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;mapRevision&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;mapRevision&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Performance checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Measure p95/p99 behavior on target hardware, not only a desktop simulator.&lt;/li&gt;
&lt;li&gt;Bound queues and buffers; define what may be coalesced or dropped.&lt;/li&gt;
&lt;li&gt;Keep heavy parsing, image processing, and inference away from the Flutter UI thread.&lt;/li&gt;
&lt;li&gt;Track source timestamps, sequence numbers, stale-data rate, and dropped updates.&lt;/li&gt;
&lt;li&gt;Test network degradation, reconnects, sustained operation, and resource pressure.&lt;/li&gt;
&lt;li&gt;Keep control commands and critical alerts separate from replaceable telemetry.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>robotics</category>
      <category>maps</category>
      <category>performance</category>
    </item>
    <item>
      <title>Reliable Permissions and Lifecycle Management for Smart Glasses</title>
      <dc:creator>vmodal_ai</dc:creator>
      <pubDate>Thu, 22 Oct 2026 11:31:02 +0000</pubDate>
      <link>https://dev.to/vmodal_ai/reliable-permissions-and-lifecycle-management-for-smart-glasses-1o80</link>
      <guid>https://dev.to/vmodal_ai/reliable-permissions-and-lifecycle-management-for-smart-glasses-1o80</guid>
      <description>&lt;h1&gt;
  
  
  Reliable Permissions and Lifecycle Management for Smart Glasses
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Focus:&lt;/strong&gt; Meta Wearables SDK, Android lifecycle, Flutter app&lt;br&gt;
resilience\&lt;br&gt;
&lt;strong&gt;Audience:&lt;/strong&gt; Flutter, Android, edge AI, and robotics engineers&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Wearable integrations fail in edge cases: permissions are revoked, a&lt;br&gt;
user unpairs glasses, the phone suspends the app, or capture is&lt;br&gt;
interrupted. Treating these events as exceptional crashes leads to stuck&lt;br&gt;
UI and battery drain.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this guide covers
&lt;/h2&gt;

&lt;p&gt;This tutorial focuses on practical architecture and performance&lt;br&gt;
engineering for production systems. The central principle is to measure&lt;br&gt;
the complete pipeline, keep latency-sensitive work close to the&lt;br&gt;
hardware, and make failure states visible to the operator.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference architecture
&lt;/h2&gt;

&lt;p&gt;Lifecycle coordinator → permission/capability state machine → native SDK&lt;br&gt;
adapter → Dart state stream → UI. State should be explicit and&lt;br&gt;
recoverable; do not infer device readiness from a single successful&lt;br&gt;
connection call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation plan
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; Model states such as unavailable, permissionRequired, connecting,
ready, capturing, interrupted, and failed.&lt;/li&gt;
&lt;li&gt; Subscribe to native registration, device, and permission changes
rather than relying only on button-triggered requests.&lt;/li&gt;
&lt;li&gt; On pause/background, apply a documented policy: stop capture, keep a
supported session, or ask the user to resume.&lt;/li&gt;
&lt;li&gt; Make &lt;code&gt;stopCapture&lt;/code&gt; and &lt;code&gt;disconnect&lt;/code&gt; idempotent so repeated cleanup
is safe.&lt;/li&gt;
&lt;li&gt; Persist preferences, not transient camera frames or sensitive media,
and recover by querying actual native state after process
recreation.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;sealed&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CaptureStatus&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;CaptureStatus&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;nclass&lt;/span&gt; &lt;span class="n"&gt;Ready&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;CaptureStatus&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Ready&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;nclass&lt;/span&gt; &lt;span class="n"&gt;NeedsPermission&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;CaptureStatus&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;NeedsPermission&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;nclass&lt;/span&gt; &lt;span class="n"&gt;Interrupted&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;CaptureStatus&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Interrupted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;nclass&lt;/span&gt; &lt;span class="n"&gt;Failed&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;CaptureStatus&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;Object&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Failed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The snippets are illustrative starting points, not drop-in integrations.&lt;br&gt;
Match APIs and version requirements to the exact SDK, OS image, hardware&lt;br&gt;
revision, and runtime in your project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Measure end-to-end latency, not only one function or model
invocation.&lt;/li&gt;
&lt;li&gt;  Report p50 and p95/p99 latency alongside throughput, memory use, and
dropped work.&lt;/li&gt;
&lt;li&gt;  Bound queues and define what happens when consumers fall behind.&lt;/li&gt;
&lt;li&gt;  Avoid repeated frame copies and expensive work on Flutter's UI
isolate.&lt;/li&gt;
&lt;li&gt;  Test sustained workloads after the device reaches thermal
equilibrium.&lt;/li&gt;
&lt;li&gt;  Keep UI state, device state, and robot state distinct.&lt;/li&gt;
&lt;li&gt;  Add timeouts, cancellation, reconnection, and explicit stale-data
indicators.&lt;/li&gt;
&lt;li&gt;  Profile on the actual target hardware using a reproducible build.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common pitfalls
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Do not assume Android permission grant equals glasses registration
or capability availability.&lt;/li&gt;
&lt;li&gt;  Do not restart capture in a tight retry loop after a permanent
permission error.&lt;/li&gt;
&lt;li&gt;  Keep user-visible indicators aligned with the real capture state.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hands-on exercise
&lt;/h2&gt;

&lt;p&gt;Write integration tests for permission denial, Bluetooth/device&lt;br&gt;
disconnect, activity recreation, and repeated start/stop commands.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://docs.flutter.dev/perf/best-practices" rel="noopener noreferrer"&gt;Flutter performance best
practices&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.flutter.dev/tools/devtools" rel="noopener noreferrer"&gt;Flutter DevTools&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.android.com/" rel="noopener noreferrer"&gt;Android Developers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.nvidia.com/" rel="noopener noreferrer"&gt;NVIDIA Developer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.ros.org/" rel="noopener noreferrer"&gt;ROS 2 documentation&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful Links
&lt;/h2&gt;

&lt;p&gt;Website: &lt;a href="http://www.v-modal.com" rel="noopener noreferrer"&gt;www.v-modal.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Flutter: &lt;a href="https://github.com/v-modal/vmodal_sdk_flutter" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_flutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Android: &lt;a href="https://github.com/v-modal/vmodal_sdk_android" rel="noopener noreferrer"&gt;https://github.com/v-modal/vmodal_sdk_android&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discord: &lt;a href="https://discord.gg/K72z28KUx" rel="noopener noreferrer"&gt;https://discord.gg/K72z28KUx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/v_modal/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/v_modal/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>architecture</category>
      <category>flutter</category>
      <category>performance</category>
    </item>
  </channel>
</rss>
