<?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: Mohammad Hammad Ahmad</title>
    <description>The latest articles on DEV Community by Mohammad Hammad Ahmad (@mhammadapp).</description>
    <link>https://dev.to/mhammadapp</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3976417%2F9875cedd-5447-44cc-96d8-bf0562d6c002.png</url>
      <title>DEV Community: Mohammad Hammad Ahmad</title>
      <link>https://dev.to/mhammadapp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mhammadapp"/>
    <language>en</language>
    <item>
      <title>Flutter_Deepseek Package !</title>
      <dc:creator>Mohammad Hammad Ahmad</dc:creator>
      <pubDate>Tue, 09 Jun 2026 17:47:00 +0000</pubDate>
      <link>https://dev.to/mhammadapp/flutterdeepseek-package--7np</link>
      <guid>https://dev.to/mhammadapp/flutterdeepseek-package--7np</guid>
      <description>&lt;p&gt;*&lt;em&gt;I wanted DeepSeek streaming in Flutter to feel like Flutter.&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Not:&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;final&lt;/span&gt; &lt;span class="n"&gt;response&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;deepseek&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;createChatCompletion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
   &lt;span class="n"&gt;ChatCompletionRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;model:&lt;/span&gt; &lt;span class="s"&gt;'deepseek-chat'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;messages:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="cm"&gt;/* your messages */&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="nl"&gt;stream:&lt;/span&gt; &lt;span class="kc"&gt;true&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="c1"&gt;// Handle stream using Dio's response stream...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But this:&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="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;for&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;token&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;chatStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
   &lt;span class="nl"&gt;messages:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ChatMessage&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Explain Flutter'&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;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;response&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;token&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;Each token reaches your widget the moment DeepSeek generates it.&lt;br&gt;
No waiting for the full response. No manual SSE parsing. Just a Dart Stream that works naturally with Flutter.&lt;/p&gt;

&lt;p&gt;So I built flutter_deepseek — the only Flutter DeepSeek package with true Stream, reasoner support, and function calling, all in one.&lt;/p&gt;

&lt;p&gt;Features:&lt;br&gt;
→ Real-time SSE streaming with Stream&lt;br&gt;
→ deepseek-reasoner support&lt;br&gt;
→ Reasoning stream and final answer available separately&lt;br&gt;
→ Function calling / tool use&lt;br&gt;
→ Typed exceptions: AuthException · RateLimitException · BadRequestException · ServerException · NetworkException&lt;br&gt;
→ Zero Dio dependency (built on dart:http)&lt;br&gt;
→ Fully injectable http.Client for testing&lt;br&gt;
→ 160 pub points on day one&lt;/p&gt;

&lt;p&gt;I built and shipped DeepSeek-powered features in production before writing this package.&lt;/p&gt;

&lt;p&gt;That experience shaped the API far more than the documentation did.&lt;/p&gt;

&lt;p&gt;Open source. MIT licensed. Actively maintained.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://lnkd.in/dTHDxKYH" rel="noopener noreferrer"&gt;https://lnkd.in/dTHDxKYH&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>pubdev</category>
      <category>flutter</category>
      <category>deepseek</category>
    </item>
  </channel>
</rss>
