<?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: MobileSuperDev</title>
    <description>The latest articles on DEV Community by MobileSuperDev (@mobilesuperdev).</description>
    <link>https://dev.to/mobilesuperdev</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%2F4052603%2Fff9d75ec-ffc6-41f4-b06e-4bd8b71f6653.png</url>
      <title>DEV Community: MobileSuperDev</title>
      <link>https://dev.to/mobilesuperdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mobilesuperdev"/>
    <language>en</language>
    <item>
      <title>How does vector search work and why does it matter for app developers</title>
      <dc:creator>MobileSuperDev</dc:creator>
      <pubDate>Sun, 09 Aug 2026 23:29:22 +0000</pubDate>
      <link>https://dev.to/mobilesuperdev/how-does-vector-search-work-and-why-does-it-matter-for-app-developers-2dge</link>
      <guid>https://dev.to/mobilesuperdev/how-does-vector-search-work-and-why-does-it-matter-for-app-developers-2dge</guid>
      <description>&lt;p&gt;Vector search is a powerful information retrieval technique that looks beyond exact keyword matches to understand the underlying meaning or context of data. How Vector Search Works Embedding Generation: Raw data (text, images, audio, or video) is passed through a machine learning model (an embedding model) to convert it into a vector—which is essentially a long array of numbers (e.g., 1536 dimensions) representing its semantic features. Vector Space Mapping: These vectors are plotted in a high-dimensional mathematical space where items with similar meanings or characteristics are positioned close to one another. Distance Calculation: When a user inputs a query, it is also converted into a vector. The system calculates the mathematical distance (such as Cosine Similarity or Euclidean Distance) between the query vector and the stored data vectors. Ranking &amp;amp; Retrieval: The items with the shortest distance (highest similarity scores) to the query are retrieved and ranked as the most relevant results. Why It Matters for App Developers Semantic Understanding: Apps can handle natural, conversational human queries rather than forcing users to guess the exact keywords or database tags. Multimodal Search: You can build features where an image can search for similar images, or text can search for relevant audio and video clips seamlessly. The Foundation of RAG (Retrieval-Augmented Generation): It allows developers to ground Large Language Models (LLMs) in private or real-time company data, massively reducing hallucinations and enabling smart enterprise AI assistants. Scalability with Specialized Databases: Modern vector databases and extensions (like Pinecone, Milvus, or pgvector for PostgreSQL) make it fast and efficient to query billions of items in milliseconds. Would you like to see a code example of how to implement vector search using a specific database or framework like Python and pgvector or Pinecone?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>search</category>
    </item>
    <item>
      <title>A small debounce for search-as-you-type in Flutter</title>
      <dc:creator>MobileSuperDev</dc:creator>
      <pubDate>Wed, 29 Jul 2026 08:49:52 +0000</pubDate>
      <link>https://dev.to/mobilesuperdev/a-small-debounce-for-search-as-you-type-in-flutter-10ln</link>
      <guid>https://dev.to/mobilesuperdev/a-small-debounce-for-search-as-you-type-in-flutter-10ln</guid>
      <description>&lt;p&gt;The first time I built a search box in Flutter I wired the &lt;code&gt;TextField&lt;/code&gt; straight to an API call and moved on. Then I opened the network tab. Typing "flutter" had fired seven requests, and six of them were for queries I'd already replaced by the time they came back.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftimpv5yg8ab17fe8nito.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftimpv5yg8ab17fe8nito.gif" alt="Search firing a request on every keystroke, versus one debounced request" width="760" height="1120"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It gets worse on a slow connection. The responses come back in whatever order the server feels like, so &lt;code&gt;q=flu&lt;/code&gt; can land after &lt;code&gt;q=flutter&lt;/code&gt; and the list flickers back to stale results for a second. That reads as a broken app, even though every request did its job.&lt;/p&gt;

&lt;p&gt;The fix is a debounce: wait until the user pauses, then send one request for what they actually typed. You don't need a package for it. A single &lt;code&gt;Timer&lt;/code&gt; does the job.&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="n"&gt;Timer&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;_debounce&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;_onChanged&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;_debounce&lt;/span&gt;&lt;span class="o"&gt;?.&lt;/span&gt;&lt;span class="na"&gt;cancel&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;_debounce&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Timer&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;Duration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;milliseconds:&lt;/span&gt; &lt;span class="mi"&gt;350&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="n"&gt;_search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&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;p&gt;Every keystroke cancels the pending timer and starts a fresh one, so &lt;code&gt;_search&lt;/code&gt; only runs once, 350ms after the last key. I've landed on somewhere between 300 and 400ms. Under that it's barely doing anything; over it, the results start to feel like they're lagging behind you.&lt;/p&gt;

&lt;p&gt;Then just point the field at it:&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="n"&gt;TextField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;decoration:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;InputDecoration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;hintText:&lt;/span&gt; &lt;span class="s"&gt;'Search'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;onChanged:&lt;/span&gt; &lt;span class="n"&gt;_onChanged&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;Two things that bit me early on.&lt;/p&gt;

&lt;p&gt;First, cancel the timer in &lt;code&gt;dispose&lt;/code&gt;. If you don't, a request can land after the widget is gone and you get a &lt;code&gt;setState() called after dispose&lt;/code&gt; warning in the console.&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="nd"&gt;@override&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;dispose&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;_debounce&lt;/span&gt;&lt;span class="o"&gt;?.&lt;/span&gt;&lt;span class="na"&gt;cancel&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;dispose&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;Second, debouncing cuts the number of requests but doesn't keep them in order. For search you usually care, so tag the latest query and drop any response that isn't the current one.&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;String&lt;/span&gt; &lt;span class="n"&gt;_latestQuery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;''&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;_search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;query&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="n"&gt;_latestQuery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;query&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;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&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;query&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;_latestQuery&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="c1"&gt;// a newer search already went out&lt;/span&gt;
  &lt;span class="n"&gt;setState&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;_results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;results&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;None of it is complicated. It's about fifteen lines total, and it's one of the first things I reach for now whenever there's a search field.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>mobile</category>
    </item>
  </channel>
</rss>
