<?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: Joao Pedro Gonçalves</title>
    <description>The latest articles on DEV Community by Joao Pedro Gonçalves (@uxjp2).</description>
    <link>https://dev.to/uxjp2</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%2F1035812%2F42c094b1-63d5-4907-bfef-3de6a2a10342.png</url>
      <title>DEV Community: Joao Pedro Gonçalves</title>
      <link>https://dev.to/uxjp2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/uxjp2"/>
    <language>en</language>
    <item>
      <title>Managing Feature Flags with Unleash - Flutter - Setting Env Vars</title>
      <dc:creator>Joao Pedro Gonçalves</dc:creator>
      <pubDate>Tue, 28 Feb 2023 18:27:22 +0000</pubDate>
      <link>https://dev.to/uxjp2/managing-feature-flags-with-unleash-flutter-setting-env-vars-6h6</link>
      <guid>https://dev.to/uxjp2/managing-feature-flags-with-unleash-flutter-setting-env-vars-6h6</guid>
      <description>&lt;p&gt;Setting up Environment Variables(Env Vars) is a strategy to avoid exposing sensitive information. Usually we use a file name &lt;code&gt;.env&lt;/code&gt; containning fields with sensitive information.&lt;/p&gt;

&lt;p&gt;To not expose the data we put &lt;code&gt;.env&lt;/code&gt; in the &lt;em&gt;.gitignore&lt;/em&gt;. Pretty net right ?&lt;/p&gt;

&lt;p&gt;Using the &lt;a href="https://pub.dev/packages/unleash"&gt;unleash package&lt;/a&gt; for Dart we need to pass two arguments: &lt;code&gt;instanceId&lt;/code&gt;, &lt;code&gt;unleashApi&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Like is done in this &lt;a href="https://github.com/GeoSales-Evolution/unleash-multi-tenant-flutter-poc/pull/12/files#diff-dd8d160935565b40db44872c86b7fa07b0c8a4247b1abc8bd03ed89aa9850ed7R75"&gt;Unleash POC in Flutter Project&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're using gitlab you can find this two informations in:&lt;br&gt;&lt;br&gt;
Your Project &amp;gt; Deployments &amp;gt; Feature Flags &amp;gt; Configure&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdq81wz6m511d1vabnkgm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdq81wz6m511d1vabnkgm.png" alt="Gitlab" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the fields values and put in the &lt;code&gt;.env&lt;/code&gt;. One-liner below to easy your work:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s2"&gt;"URL_API=&amp;lt;URL_API&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;INSTANCE_ID=&amp;lt;INSTANCE_ID&amp;gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .env2   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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