<?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 Martino Yovo on Medium]]></title>
        <description><![CDATA[Stories by Martino Yovo on Medium]]></description>
        <link>https://medium.com/@martinoyovo?source=rss-aafc16086deb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*E8sou4uIoO4h4h7YM8dwsw.jpeg</url>
            <title>Stories by Martino Yovo on Medium</title>
            <link>https://medium.com/@martinoyovo?source=rss-aafc16086deb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 03:34:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@martinoyovo/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[Firebase Remote Config with Flutter]]></title>
            <link>https://medium.com/@martinoyovo/flutter-firebase-remote-config-14c7bab0d0e4?source=rss-aafc16086deb------2</link>
            <guid isPermaLink="false">https://medium.com/p/14c7bab0d0e4</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[firebase-remote-config]]></category>
            <category><![CDATA[remote-config]]></category>
            <dc:creator><![CDATA[Martino Yovo]]></dc:creator>
            <pubDate>Sat, 19 Mar 2022 02:26:25 GMT</pubDate>
            <atom:updated>2022-03-21T08:04:20.040Z</atom:updated>
            <content:encoded><![CDATA[<h3>Firebase Remote Config in Flutter</h3><h3><strong>Introduction</strong></h3><blockquote>Updating an app in production often takes a lot of time and effort, and especially the waiting time for the review process to complete. With Remote Config we can change the behaviour and appearance of our app without requiring user to download updates.</blockquote><h3>What we’ll build</h3><p>We are going to build a <strong>splash screen </strong>with a background image, a background color and an app title. To illustrate the use of config based on conditions, we are going to set the different background colors on iOS and Android.</p><h3>App Preview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*EV0e4ql4owOVjgpOUbGU3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*vZqnkajNvHj10LQJTd7VlQ.jpeg" /></figure><h3>Get Started</h3><p>First <a href="https://docs.flutter.dev/get-started/codelab">create an empty Flutter project</a> an then <a href="https://firebase.flutter.dev/docs/manual-installation">add Firebase to the project</a>.</p><h3>1. Configuration</h3><p>Go to your Firebase project and select Remote Config from the left-hand sidebar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vu8S4oNFjlNusc_V" /></figure><h3>2. Adding a parameter</h3><p>Click on the<strong> Create configuration</strong> button to add your first parameter or Add parameter button to add another parameter with key and value as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*N4_VaKqFwfJ6q3e-" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9A_m-ZWsOw0MWxf1" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bK1RZPnkURfYAzH-" /></figure><h3>3. Adding a condition to a parameter</h3><p>You can provide different parameter values that depend on several conditions(app version, platform, country/region, languages, date time, etc). Click the <strong>Add new</strong> button that is associated with your parameter, then select <strong>Conditional value &gt; Create new condition</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*as2hxCWeU8jhCDOQ" /></figure><h3>4. Define a condition</h3><p>Create 2 new conditions named <strong>ios</strong> and <strong>android. </strong>In our case it will help us set the background color our app depending on the device platform (android/ios). Do the following to define the conditions.</p><blockquote><em>Warning: The Colour property in the console is just to differentiate your conditions.</em></blockquote><figure><img alt="Condition of iOS" src="https://cdn-images-1.medium.com/max/1024/0*9vCdEf9Gda-LWPSg" /><figcaption>iOS condition of background color</figcaption></figure><figure><img alt="Android condition of background color" src="https://cdn-images-1.medium.com/max/1024/0*tzyGYm92gwiRBdxo" /><figcaption>Android condition of background color</figcaption></figure><h3>5. Save a condition</h3><p>Now add hex string value <em>#FF474</em> for the<strong> ios</strong> condition and <em>#000D46</em><strong> </strong>for the <strong>android</strong> condition then click on the <strong>save</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G89wfcAaenrDg66R" /></figure><h3><strong>6. Publish your changes</strong></h3><p>Now you can click on <strong>Publish changes</strong> to publish your changes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o0g4MBrt9w9u9hhB" /></figure><h3><strong>7. Code</strong></h3><p>Now that all is set up you can look into.</p><ol><li>Install the <a href="https://pub.dev/packages/firebase_remote_config/install">firebase_remote_config</a> plugin by adding the following to the <strong>dependencies </strong>block in your <strong>pubspec.yaml</strong>:</li></ol><p>Or executing this command:</p><pre>flutter pub add firebase_remote_config</pre><p>2. The final code in <strong>main.dart</strong> with explanations:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a6f3a4c06b15766979b343308e83f2f5/href">https://medium.com/media/a6f3a4c06b15766979b343308e83f2f5/href</a></iframe><p><a href="https://github.com/martinoyovo/remote_config/blob/main/lib/remote_config_page.dart">remote_config/remote_config_page.dart at main · martinoyovo/remote_config</a></p><p>Run your code and see the result!</p><h3>Conclusion</h3><p>You’ve learned how to use Firebase Remote Config to change the behaviour of your app without requiring the user to update. If you’d like to explore more content follow me on Twitter (<a href="https://twitter.com/martinoyovo">https://twitter.com/martinoyovo</a>).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14c7bab0d0e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Internationaliser votre appli Flutter]]></title>
            <link>https://medium.com/@martinoyovo/flutter-internationalization-codelab-7f792418b118?source=rss-aafc16086deb------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f792418b118</guid>
            <dc:creator><![CDATA[Martino Yovo]]></dc:creator>
            <pubDate>Wed, 09 Mar 2022 18:33:22 GMT</pubDate>
            <atom:updated>2022-03-09T18:53:59.286Z</atom:updated>
            <content:encoded><![CDATA[<h3>Programme</h3><ul><li><strong>Définition</strong></li><li><strong>Configurer une application internationalisée</strong></li><li><strong>Ajouter vos propres messages localisés</strong></li><li><strong>Options avancées</strong></li><li><strong>Pratique: Créer une application bilingue avec Flutter</strong></li><li><strong>Ressources</strong></li></ul><p><strong><em>LET’S GOOOOO 🚀🚀</em>🚀🚀🚀🚀!</strong></p><h3>Définition</h3><blockquote><em>Internationaliser une app veut dire l’adapter à plusieurs langues, écrire l’application d’une manière à ce qu’on puisse localiser des valeurs telles que le texte et les mises en page pour chaque langue ou paramètre régional pris en charge par l’application.</em></blockquote><h3>Configurer une application internationalisée</h3><p>Par défaut, Flutter ne fournit que des localisations en anglais américain. Pour ajouter la prise en charge d’autres langues, une application doit spécifier des propriétés MaterialApp (ou CupertinoApp) supplémentaires et inclure un package appelé flutter_localizations qui supporte 78 langues depuis Novembre 2020.</p><p><strong>Les différentes étapes:</strong></p><ul><li>Ajouter flutter_localizations comme un package à votre fiichier pubspec.yaml.</li></ul><pre>dependencies:<br>  flutter:<br>    sdk: flutter<br>  flutter_localizations: # Add this line<br>    sdk: flutter         # Add this line</pre><p>Ensuite, faire pub get packages, puis importer la librairie flutter_localizations enfin d’ajouter localizationsDelegates et supportedLocales au MaterialApp.</p><pre>import &#39;package:flutter_localizations/flutter_localizations.dart&#39;<br><br>return const MaterialApp(<br>  title: &#39;Localizations Sample App&#39;,<br>  localizationsDelegates: [<br>    GlobalMaterialLocalizations.delegate,<br>    GlobalWidgetsLocalizations.delegate,<br>    GlobalCupertinoLocalizations.delegate,<br>  ],<br>  supportedLocales: [<br>    Locale(&#39;en&#39;, &#39;&#39;), // English, no country code<br>    Locale(&#39;fr&#39;, &#39;&#39;), // French, no country code<br>  ],<br>  home: MyHomePage(),<br>);</pre><h3>Ajouter vos propres messages localisés</h3><p>Une fois le package flutter_localizations ajouté, vous pouvez désormais ajouter vos propres messages.</p><p><strong>Les différentes étapes</strong></p><ul><li>Ajouter le package intl au pubspec.yaml:</li></ul><pre>dependencies:<br>  flutter:<br>    sdk: flutter<br>  flutter_localizations:<br>    sdk: flutter<br>  intl: ^0.17.0 # Add this line</pre><ul><li>De plus, dans le fichier pubspec.yaml , activez l&#39;indicateur de génération generate. Ceci est ajouté à la section du pubspec qui est spécifique à Flutter, et vient généralement plus tard dans le fichier pubspec.</li></ul><pre>flutter:<br>	uses-material-design: true<br>	generate: true # Add this line</pre><ul><li>Ajoutez un nouveau fichier yaml au répertoire racine du projet Flutter appelé l10n.yaml avec le contenu suivant :</li></ul><pre>arb-dir: lib/l10n<br>template-arb-file: app_en.arb<br>output-localization-file: app_localizations.dart</pre><ul><li>Ce fichier configure l’outil de localisation ; dans cet exemple, les fichiers d’entrée se trouvent dans ${FLUTTER_PROJECT}/lib/l10n, le fichier app_en.arb fournit le modèle et les localisations générées sont placées dans le fichier app_localizations.dart.</li><li>Dans ${FLUTTER_PROJECT}/lib/l10n, ajouter le fichier modèle app_en.arb.</li></ul><pre>{<br>    &quot;helloWorld&quot;: &quot;Hello World!&quot;,<br>    &quot;@helloWorld&quot;: {<br>      &quot;description&quot;: &quot;The conventional newborn programmer greeting&quot;<br>    }<br>}</pre><ul><li>Ensuite, ajouter un fichier app_fr.arb dans le même dossier pour la traduction française du même message:</li></ul><pre>{<br>    &quot;helloWorld&quot;: &quot;Bonjour le monde!&quot;<br>}</pre><ul><li>Maintenant, exécutez votre application pour que la génération du code ait lieu. Vous devriez voir les fichiers générés dans ${FLUTTER_PROJECT}/.dart_tool/flutter_gen/gen_l10n</li><li>Importer le fichier app_localizations.dart par ce chemin import &#39;package:flutter_gen/gen_l10n/app_localizations.dart&#39;;. Vous pouvez ainsi faire appel au AppLocalizations.delegate and le MaterialApp.</li></ul><pre>import &#39;package:flutter_gen/gen_l10n/app_localizations.dart&#39;;<br>return const MaterialApp(<br>  title: &#39;Localizations Sample App&#39;,<br>  localizationsDelegates: [<br>    AppLocalizations.delegate, // Add this line<br>    GlobalMaterialLocalizations.delegate,<br>    GlobalWidgetsLocalizations.delegate,<br>    GlobalCupertinoLocalizations.delegate,<br>  ],<br>  supportedLocales: [<br>    Locale(&#39;en&#39;, &#39;&#39;), // English, no country code<br>    Locale(&#39;fr&#39;, &#39;&#39;), // French, no country code<br>  ],<br>  home: MyHomePage(),<br>);</pre><ul><li>Vous pouvez now utiliser le AppLocalizations partout dans votre code. Les textes localisés peuvent désormais être utilisés avec cette syntaxe AppLocalizations.of(context)!.helloWorld</li><li>Vous pouvez également utiliser la liste générée localizationsDelegates et supportedLocales au lieu de les fournir manuellement.</li></ul><pre>const MaterialApp(<br>  title: &#39;Flutter Int App&#39;,<br>  localizationsDelegates: AppLocalizations.localizationsDelegates,<br>  supportedLocales: AppLocalizations.supportedLocales,<br>);</pre><p>💡 Le code ci-dessus génère un widget Texte qui affiche “Hello World!” si les paramètres régionaux de l’appareil cible sont définis sur l’anglais, et « Bonjour le monde! » si les paramètres régionaux de l’appareil cible sont définis sur le français. Dans les fichiers arb, la clé de chaque entrée est utilisée comme nom de méthode du getter, tandis que la valeur de cette entrée contient le message localisé.</p><h3>Options avancées</h3><p>La plupart des options avancées ont été abordées <a href="https://docs.flutter.dev/development/accessibility-and-localization/internationalization#advanced-topics-for-further-customization">ici</a> mais nous, nous allons aborder <strong>comment spécifier les langues à supporter</strong>.</p><p><strong>Spécifier les langues suppportées par votre app</strong></p><p>Bien que la bibliothèque flutter_localizations prenne actuellement en charge 78 langues et variantes linguistiques, seules les traductions en anglais sont disponibles par défaut. C&#39;est au développeur de décider exactement quelles langues prendre en charge.</p><p>Le paramètre MaterialApp supportedLocales limite les changements de paramètres régionaux. Lorsque l&#39;utilisateur modifie les paramètres régionaux sur son appareil, le widget Localisations de l&#39;application ne s’adapte que si le nouveau paramètre régional fait partie de cette liste. Si une correspondance exacte pour les paramètres régionaux de l&#39;appareil n&#39;est pas trouvée, le premier paramètre régional pris en charge avec un languageCode correspondant est utilisé. En cas d&#39;échec, le premier élément de la liste supportedLocales est utilisé.</p><p>Une application qui souhaite utiliser une autre méthode de « résolution locale » peut fournir un localeResolutionCallback.</p><p>Par exemple, pour que votre application accepte n’importe quel type de paramètres régionaux sélectionnés par l’utilisateur if faut faire:</p><pre>MaterialApp(<br>  localeResolutionCallback: (<br>    Locale? locale,<br>    Iterable&lt;Locale&gt; supportedLocales,<br>  ) {<br>    return locale;<br>  },<br>);</pre><p>Pour une app qui n’accepte que les paramètres régionaux supportés seulement par elle il faudra faire:</p><pre>MaterialApp(<br>  localeResolutionCallback: (<br>    Locale? locale,<br>    Iterable&lt;Locale&gt; supportedLocales,<br>  ) {<br>    for (var supportedLocale in supportedLocales) {<br>      if (supportedLocale.languageCode == locale.languageCode &amp;&amp;<br>          supportedLocale.countryCode == locale.countryCode) {<br>        return supportedLocale;<br>      }<br>    }<br>    return supportedLocales.first;<br>  },<br>)</pre><h3>Pratique: Create une application bilingue avec Flutter</h3><h3>Ressources</h3><ul><li><a href="https://docs.flutter.dev/development/accessibility-and-localization/internationalization">Documentation officielle</a></li><li><a href="https://docs.google.com/document/d/10e0saTfAv32OZLRmONy866vnaw0I2jwL8zukykpgWBc/edit">https://docs.google.com/document/d/10e0saTfAv32OZLRmONy866vnaw0I2jwL8zukykpgWBc/edit</a></li><li>Getx Localization</li></ul><p><a href="https://github.com/martinoyovo/getx_localization-">https://github.com/martinoyovo/getx_localization-</a></p><p><a href="https://github.com/martinoyovo/getx_localization-">https://github.com/martinoyovo/getx_localization-</a></p><ul><li><a href="https://medium.com/flutter-community/multi-language-support-in-flutter-a12de708f833">https://medium.com/flutter-community/multi-language-support-in-flutter-a12de708f833</a></li><li><a href="https://medium.com/@podcoder/flutter-localization-a39402757a42">https://medium.com/@podcoder/flutter-localization-a39402757a42</a></li></ul><p>💡 Basé sur les fichiers de traductions JSON</p><ul><li><a href="https://pub.dev/packages/localization">https://pub.dev/packages/localization</a></li><li><a href="https://pub.dev/packages/easy_localization">https://pub.dev/packages/easy_localization</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f792418b118" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>