<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hamed on Medium]]></title>
        <description><![CDATA[Stories by Hamed on Medium]]></description>
        <link>https://medium.com/@hamed_abbasi?source=rss-bba3fc48b9ff------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eJAx-Eqi0KiMxMy1hWPYEA.jpeg</url>
            <title>Stories by Hamed on Medium</title>
            <link>https://medium.com/@hamed_abbasi?source=rss-bba3fc48b9ff------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:46:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hamed_abbasi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Creating a Google Chrome Extension Using Flutter]]></title>
            <link>https://medium.com/@hamed_abbasi/creating-a-google-chrome-extension-using-flutter-f40c7018c777?source=rss-bba3fc48b9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/f40c7018c777</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-web]]></category>
            <category><![CDATA[flutter-chrome-extension]]></category>
            <category><![CDATA[chrome-extension]]></category>
            <category><![CDATA[google-chrome]]></category>
            <dc:creator><![CDATA[Hamed]]></dc:creator>
            <pubDate>Thu, 06 Mar 2025 20:06:48 GMT</pubDate>
            <atom:updated>2025-03-06T20:06:48.945Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5EDEk5KmHOcWNr5_mLFcgA.jpeg" /></figure><p><strong>Want to experience creating a browser extension?</strong></p><p>Flutter, as a versatile framework, can bring you this.</p><p><em>Let’s get to work.</em></p><p>First, create your Flutter project.</p><p>In this article, we will use Flutter’s default project.</p><p>After creating your project, you need to change the manifest.json configuration file of your web. To do this, go to this path <strong>project_folder/web/manifest.json</strong> and replace the current configuration with the following configuration:</p><pre>{<br>    &quot;manifest_version&quot;: 3,<br>    &quot;name&quot;: &quot;extension name&quot;,<br>    &quot;version&quot;: &quot;1.0&quot;,<br>    &quot;description&quot;: &quot;A Flutter-based Chrome extension&quot;,<br>    &quot;action&quot;: {<br>      &quot;default_popup&quot;: &quot;index.html&quot;,<br>      &quot;default_icon&quot;: &quot;favicon.png&quot;<br>    },<br>    &quot;permissions&quot;: [<br>      &quot;storage&quot;,<br>      &quot;activeTab&quot;<br>    ],<br>    &quot;content_security_policy&quot;: {<br>      &quot;extension_pages&quot;: &quot;script-src &#39;self&#39; &#39;wasm-unsafe-eval&#39;; object-src &#39;self&#39;;&quot;<br>    }<br>  }</pre><p>Let me explain this configuration.</p><pre>&quot;manifest_version&quot;: 3</pre><p>This key specifies that you’re using Manifest V3, the latest standard for Chrome extensions. It introduces changes in security and performance compared to previous versions.</p><pre>&quot;name&quot;: &quot;extension name&quot;,<br>&quot;version&quot;: &quot;1.0&quot;,<br>&quot;description&quot;: &quot;A Flutter-based Chrome extension&quot;</pre><p>Provides general information about your extension.</p><pre>&quot;action&quot;: {<br>      &quot;default_popup&quot;: &quot;index.html&quot;,<br>      &quot;default_icon&quot;: &quot;favicon.png&quot;<br>}</pre><p><strong>default_popup </strong>: Points to “index.html” which will be loaded when a user clicks the extension icon.</p><p><strong>default_icon:</strong> Specifies the icon image (“favicon.png”) used in the toolbar.</p><pre>&quot;permissions&quot;: [<br>      &quot;storage&quot;,<br>      &quot;activeTab&quot;<br>]</pre><p>Specifies the permissions of the extension. For example, here we have given the extension access to storage to store or retrieve information and access the content of the current web page.</p><pre>&quot;content_security_policy&quot;: {<br>      &quot;extension_pages&quot;: &quot;script-src &#39;self&#39; &#39;wasm-unsafe-eval&#39;; object-src &#39;self&#39;;&quot;<br>}</pre><p>In this section we define the security requirements of our extension. For example, we have specified certain insecure evaluations that are required for WebAssembly code (commonly used in Flutter web apps).</p><blockquote>Now is the time to take action and see the results of our work.</blockquote><p>Build your project using the following command:</p><pre>flutter build web --no-web-resources-cdn</pre><p>Your build output will be saved in the path: <strong>project_folder/build/web</strong></p><p>Go to the Chrome Extensions Management tab and click on the Loud unpacked button.<br>Then, go to your project path and select the web folder in the <strong>project_folder/build path</strong>.<br>You will notice that after this your project has been added to the extensions list.<br>Now you can click on your extension icon and run it.</p><p>The problem is that your extension will open as a small square. To fix this, go back to your project and go to the path:<br><strong>project_folder/web/index.html</strong> and give the project Html tag a size style. Like this:</p><pre>&lt;html style=&quot;height: 600px; width: 400px;&quot;&gt;</pre><p>Now, run the <strong>build </strong>command from the project again and add the correct version to Chrome.</p><p>This time, your extension will open to the size you specified.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f40c7018c777" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a progress bar in Flutter for video and audio]]></title>
            <link>https://medium.com/@hamed_abbasi/creating-a-progress-bar-in-flutter-for-video-and-audio-215924bf2628?source=rss-bba3fc48b9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/215924bf2628</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[pwa]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[progress-bar]]></category>
            <dc:creator><![CDATA[Hamed]]></dc:creator>
            <pubDate>Mon, 10 Feb 2025 14:12:19 GMT</pubDate>
            <atom:updated>2025-02-10T14:22:36.053Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FeIArCttaGjtDscxKuN9PQ.jpeg" /></figure><p>Sometimes you need to play video or audio in your application and to do this you need to show the user the progress of the content or allow the user to move between frames of the content. To do this you need to use a progress bar.</p><p>Sometimes you need to announce to the user the different parts of the content that is playing, like YouTube which separates the different parts.</p><p>Now I want to introduce you to a package that not only allows the user to have control over the content, but you can also show the user the content sections.</p><p><strong>progress_bar_marked package</strong></p><p><a href="https://pub.dev/packages/progress_bar_marked">progress_bar_marked | Flutter package</a></p><p>Let me show you how you can use this package:</p><p>First add the package to pubspec.yaml</p><pre>progress_bar_marked: ^version</pre><p>Now you can add the following code to your project</p><pre>ProgressBarMarked(<br>    activeColor: Colors.orange,<br>    markColor: Colors.red,<br>    thumbColor: Colors.orangeAccent,<br>    strokeHeight: 10,<br>    duration: , // Full content time<br>    position: , // Current position of the content<br>    markers: [<br>      // You can specify different points that you need to see in the progress bar.<br>    ],<br>    onUpdate: (duration) {},<br>    onUpdateStart: () {},<br>    onUpdateEnd: () {},<br>),</pre><p>In this package we will work with <strong>Duration </strong>and all data will be specified with Duration, including:</p><ul><li>duration</li><li>position</li><li>markers</li><li>onUpdate call back</li></ul><p>Good luck.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=215924bf2628" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to update the Android version of your Flutter project from within the app]]></title>
            <link>https://medium.com/@hamed_abbasi/how-to-update-the-android-version-of-your-flutter-project-from-within-the-app-e72ea4783ac6?source=rss-bba3fc48b9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/e72ea4783ac6</guid>
            <category><![CDATA[new-version]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[google-play-store]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[in-app-update]]></category>
            <dc:creator><![CDATA[Hamed]]></dc:creator>
            <pubDate>Fri, 10 Jan 2025 10:44:49 GMT</pubDate>
            <atom:updated>2025-03-06T19:09:33.265Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>How to update the Android version of your Flutter project from within the app</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*adMGIz71MpeKMWqE8adUnw.jpeg" /></figure><blockquote>For this we will use the <a href="https://pub.dev/packages/in_app_update"><strong>in_app_update </strong></a>package.</blockquote><p><a href="https://pub.dev/packages/in_app_update">in_app_update | Flutter package</a></p><p><strong>Let’s go.</strong></p><p>To check if there is a new update for your application, you should call the following method:</p><pre> await InAppUpdate.checkForUpdate();</pre><p>This method will return the following status if there is a new update:</p><pre>UpdateAvailability.updateAvailable</pre><p>Well, if there is a new update, you should start updating the application according to its type.</p><p>Two types of typing are specified for updates</p><pre>immediateUpdateAllowed</pre><pre>flexibleUpdateAllowed</pre><p>In an immediate update, the user cannot use the application while it is being updated and must wait for the update to complete.</p><p>In flexible update, the user can use the application when downloading the application.</p><blockquote>Note: Up until now, when publishing an application on Google Play, no type is specified for the new version, my advice is to consider all updates immediately.</blockquote><p>Full code:</p><pre>   try {<br>      final info = await InAppUpdate.checkForUpdate();<br>      if (info.updateAvailability == UpdateAvailability.updateAvailable) {<br><br>          if (info.immediateUpdateAllowed) {<br><br>            InAppUpdate.performImmediateUpdate().then((appUpdateResult) {<br>              if (appUpdateResult == AppUpdateResult.success) {<br>                // Do Somthing<br>              }<br>            });<br>          } else if (info.flexibleUpdateAllowed) {<br>            InAppUpdate.startFlexibleUpdate().then((appUpdateResult) {<br>              if (appUpdateResult == AppUpdateResult.success) {<br>                InAppUpdate.completeFlexibleUpdate();<br>              }<br>            });<br>          }<br>       <br>      }<br>    } catch (e) {<br>      handleUpdateError(e);<br>    }</pre><pre> void handleUpdateError(dynamic error) {<br>    String message;<br>    if (error is PlatformException) {<br>      if (error.code == &#39;TASK_FAILURE&#39; &amp;&amp;<br>          error.message?.contains(&#39;ERROR_APP_NOT_OWNED&#39;) == true) {<br>        message = &#39;This app version is not installed from the Play Store. &#39;<br>            &#39;Please install the app from Play Store to enable updates.&#39;;<br>      } else {<br>        message = &#39;Update error: ${error.message}&#39;;<br>      }<br>    } else {<br>      message = &#39;Update check failed: $error&#39;;<br>    }<br>    debugPrint(message);<br>  }</pre><blockquote>Note: It is up to you where in the application you want to invoke the update check.</blockquote><p><strong>How to test?</strong></p><blockquote>Note: If the app is already installed on your device, you will need to uninstall it.</blockquote><p>1- To test an internal app update, first get a release of the changes.</p><p>2- In your Google Play Console, go to the internal app sharing tab.</p><p>3- Click on the link in the Manage uploaders section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*83PMUZ2O6X0rqWOdzgCE1w.jpeg" /></figure><p>4- Upload the new version in this section.</p><p>5- Click the Copy button on the uploaded item to copy the file link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P7Yns-KQrlZrzNXii9KUDQ.jpeg" /></figure><p>6- On the device where you want to install your app, open Google Play and go to Settings &gt; About.</p><p>7- Tap on Play Store version several times to enable developer mode for you.</p><p>8- After enabling Developer Mode, go to General, select an added option called Developer options, and enable the Internal app sharing check box.</p><p>9- Now open the link you copied through your device’s browser and click on the Go to Google Play button.</p><p>10- Download and install the application.</p><p>Get a new and higher version of your application and upload it according to the previous steps.</p><p>Copy the link to the new version, open it in your browser, and go to Google Play, but <strong>don’t install</strong> it this time.</p><blockquote>This will notify your device that there is a new update.</blockquote><p>Now open your app, install the detected update.</p><blockquote>Congratulations, you did it.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e72ea4783ac6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to push the Android version of our Flutter project to Google Play using GitLab CI/CD]]></title>
            <link>https://medium.com/@hamed_abbasi/how-to-push-the-android-version-of-our-flutter-project-to-google-play-using-gitlab-ci-cd-2081793e2f02?source=rss-bba3fc48b9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/2081793e2f02</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[deployment-automation]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Hamed]]></dc:creator>
            <pubDate>Sun, 08 Dec 2024 18:29:26 GMT</pubDate>
            <atom:updated>2025-02-10T14:25:18.324Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQaaTTadIlDHxwK7T8svRg.jpeg" /></figure><p><strong>Prerequisites for this:</strong><br>- <em>Set up a Google play account<br>- Set up a Google cloud account<br>- Set up Runner on the GitLab project</em></p><blockquote>Note: This requires you to manually upload and publish your app to Google Play once.</blockquote><p>After launching Google Cloud, go to the project you want, go to the APIs and Services section, and click the Enable APIs and Services button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lJcLC-gjYJEdqsm6DEZ_ow.jpeg" /></figure><p>After enabling this, search for <strong>Google Play Developer Reportting API</strong> in the search field and click the Enable button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J914edQiFw1yWWeQHfn5qw.png" /></figure><p>Now search for <strong>Google Play Android Developer API</strong> and click the Enable button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cV23Yrf1GoLRZIaw8s255A.png" /></figure><p>Now select a <strong>Service Account</strong> from the <strong>Credentials </strong>section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*cr8-DvkkyDqUafNDHsTpgw.png" /></figure><p>In this section you need to create a Service account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yrQnk2JDopCUmNAJsgcatA.png" /></figure><p>Give your Service account a name and click Done.</p><p>After creating the <strong>Service account</strong>, you should see the name you provided as an email in the Service account list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dAesR1vH6cCcx7nbuw6_AA.png" /></figure><p>Click the Edit button, then go to the Permissions tab and click Grant Access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HztaXv_DZgpR-STUo0zJQw.png" /></figure><p>And give your Service the appropriate Role.</p><blockquote>such as <strong>Service Account</strong> User or <strong>Service Account Admin</strong><br>and save the changes.</blockquote><p>Now go to your <strong>Google Play Console</strong><br>Go to <strong>Users and permissions</strong> from the left menu and invite a new user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wh2JRTgcskiNsjXyxLaYZQ.jpeg" /></figure><p>Enter your <strong>Service Account</strong> email Select the desired application and grant the new user <strong>Admin access</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*-gChBdfAUn8oxJrKphoE_w.png" /></figure><p>Now go back to your <strong>Google cloud</strong> and create a <strong>key </strong>for your <strong>Service account</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yj8p6lALwoCTn9uDvrlpHA.png" /></figure><blockquote>Note: Create the key in <strong>Json </strong>format.</blockquote><blockquote>The key will be downloaded automatically.</blockquote><p>Then convert the downloaded key to <strong>base64 </strong>and save the resulting value in the CI/CD Variable section with a specific name.</p><p>For example :</p><ul><li>Name: GOOGLE_PLAY_KEY_FILE</li><li>Value: base64 file</li></ul><p>Do the same for your app keystore.</p><p>Convert to base64 and save in a variable with a suitable name.</p><p>For example :</p><ul><li>Name: KEYSTORE_FILE</li><li>Value: base64 file</li></ul><p>Also store the <strong>keystore </strong>file password in a variable.</p><p>If you don’t have a .gitlab-ci.yml file in your project root, create it and run the following script:</p><pre>stages:<br>  - deploy<br><br><br>android-publish:<br>  stage: deploy<br>  only:<br>    - tags<br>  image: &quot;ghcr.io/cirruslabs/flutter:3.24.5&quot;<br>  before_script:<br>    - flutter pub global activate dart_code_metrics<br>    - export PATH=&quot;$PATH:$HOME/.pub-cache/bin&quot;<br>    - curl --silent &quot;https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer&quot; | bash<br>    - mv -fv ./.secure_files/ android/app/.secure_files<br>    - ls -Al android/app<br>    - echo &quot;storeFile=./.secure_files/keystore.jks&quot; &gt; android/key.properties<br>    - echo &quot;$RELEASE_REQUIREMENTS&quot; &gt;&gt; android/key.properties<br>    - apt-get update<br>    - apt-get install -y ruby-full<br>    - gem install fastlane<br>  script:<br>    - echo &quot;$KEYSTORE_FILE&quot; | base64 -d &gt; keystore.jks<br>    - echo &quot;$GOOGLE_PLAY_KEY_FILE&quot; | base64 -d &gt; play-credentials.json<br>    - flutter build appbundle <br>    # Deploy to Google Play using Fastlane<br>    - fastlane supply --json_key play-credentials.json --package_name co.go2train --aab build/app/outputs/bundle/prodRelease/app-prod-release.aab --track production --release_status draft</pre><p><a href="https://fastlane.tools/">fastlane - App automation done right</a></p><p>Different release upload statuses</p><p>— release_status draft: The build will be taken and uploaded to the draft section (recommended)</p><p>— release_status halted: The build will be taken and uploaded, but users will not be able to see the new version</p><p>— release_status in_progress: The build will be taken and will be released (not recommended)</p><p>— release_status completed: The build will be taken and will be released (not recommended)</p><p>Flutter Continuous Delivery Document:</p><p><a href="https://docs.flutter.dev/deployment/cd">Continuous delivery with Flutter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2081793e2f02" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>