{"id":68,"date":"2025-04-22T12:14:17","date_gmt":"2025-04-22T12:14:17","guid":{"rendered":"https:\/\/documentation.iqonic.design\/pawlly\/?p=68"},"modified":"2025-06-14T04:51:57","modified_gmt":"2025-06-14T04:51:57","slug":"flutter-configuration","status":"publish","type":"post","link":"https:\/\/documentation.iqonic.design\/pawlly\/flutter-configuration\/","title":{"rendered":"Flutter Configuration"},"content":{"rendered":"<div class=\"nolwrap\">\n<p>Setting up Flutter for your Pawlly Project<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Change The App Name<\/strong><\/h2>\n\n\n\n<p>In the main directory, go to&nbsp;<code>lib -&gt; configs.dart<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">const APP_NAME = 'YOUR APP NAME';<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Reconfiguring The Server URL<\/strong><\/h2>\n\n\n\n<p>In the main directory, go to&nbsp;<code>lib -&gt; utils -&gt; configs.dart<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">const DOMAIN_URL = \"ADD YOUR DOMAIN URL\";<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Change The Default Language<\/strong><\/h2>\n\n\n\n<p>In the main directory, go to&nbsp;<code>lib -&gt; configs.dart<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">const DEFAULT_LANGUAGE = \"LANGUAGE CODE\"; \/\/ (e.g., \"en\", \"ar\", \"de\", \"pt\", \"es\")<\/pre>\n\n\n\n<p><strong>TIP<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Set the language code from the provided list&nbsp;<code>[\"en\", \"ar\", \"de\", \"pt\", \"es\"]<\/code>&nbsp;for supported languages in the application. For other languages, customization is required.<\/li>\n\n\n\n<li>Use only the language code, not the entire language name. You can find the language codes&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Change The App Font<\/strong><\/h2>\n\n\n\n<p>In the main directory, go to&nbsp;<code>lib -&gt; app_theme.dart<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">fontFamily: GoogleFonts.FONT_NAME().fontFamily,<br>textTheme: GoogleFonts.FONT_NAMETextTheme(),<\/pre>\n\n\n\n<p><strong>TIP<\/strong><\/p>\n\n\n\n<p>Remember to apply these steps to both the DarkTheme and LightTheme in the app_theme.dart file to ensure consistent behavior across your app&#8217;s themes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Change Primary &amp; Secondary Color<\/strong><\/h2>\n\n\n\n<p>In the main directory, go to&nbsp;<code>lib -&gt; utils -&gt; colors.dart<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">var primaryColor = Color(0xFF9D67EF);<br>var secondaryColor = Color(0xFFFD866E);<\/pre>\n\n\n\n<p><strong>TIP<\/strong><\/p>\n\n\n\n<p>Best practice and setting the hex value after 0xFF, you can avoid unexpected color rendering issues and ensure consistent appearance of your UI elements.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Add FirebaseOptions<\/strong><\/h2>\n\n\n\n<p><strong>INFO<\/strong><\/p>\n\n\n\n<p>After completion of&nbsp;<a href=\"https:\/\/documentation.iqonic.design\/pawlly\/configurations-customization\/firebase-configuration\">Firebase Configuration<\/a>&nbsp;you can proceed further.<\/p>\n\n\n\n<p>In the main directory, go to&nbsp;<strong>lib -&gt; config.dart<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">final FirebaseOptions firebaseConfig = FirebaseOptions(<br>  appId: isIOS?\"FIREBASE iOS APP ID\":\"FIREBASE ANDROID APP ID\",<br>  apiKey: 'FIREBASE API KEY',<br>  projectId: 'FIREBASE PROJECT ID',<br>  messagingSenderId: 'FIREBASE SENDER ID',<br>  storageBucket: 'FIREBASE STORAGE BUCKET',<br>  iosBundleId: 'FIREBASE iOS',<br>);<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open your Firebase Console.<\/li>\n<\/ul>\n\n\n\n<p>For&nbsp;<strong>apiKey<\/strong>&nbsp;go to Project Settings and Click on General Tab you\u2019ll find&nbsp;<strong>Web API Key<\/strong>&nbsp;and&nbsp;<strong>Project ID<\/strong>&nbsp;and paste it all blocks in dart file mentioned above.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"417\" src=\"https:\/\/documentation.iqonic.design\/pawlly\/wp-content\/uploads\/sites\/12\/2025\/04\/Flutter_Configuration1.png\" alt=\"\" class=\"wp-image-350\" \/><\/figure>\n\n\n\n<p>Scroll Down and in Your Apps section you\u2019ll find App Id in Android and iOS section. Copy respective App ID and paste it to appId.<br>Copy Bundle ID and paste it to&nbsp;<strong>iosBundleId<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"553\" src=\"https:\/\/documentation.iqonic.design\/pawlly\/wp-content\/uploads\/sites\/12\/2025\/04\/Flutter_Configuration2.png\" alt=\"\" class=\"wp-image-351\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"580\" src=\"https:\/\/documentation.iqonic.design\/pawlly\/wp-content\/uploads\/sites\/12\/2025\/04\/Flutter_Configuration3.png\" alt=\"\" class=\"wp-image-352\" \/><\/figure>\n\n\n\n<p>For&nbsp;<strong>messagingSenderId<\/strong>&nbsp;Click on Cloud Messaging you will see&nbsp;<strong>Sender ID<\/strong>. Copy that paste it to&nbsp;<strong>messagingSenderId<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"497\" src=\"https:\/\/documentation.iqonic.design\/pawlly\/wp-content\/uploads\/sites\/12\/2025\/04\/Flutter_Configuration4.png\" alt=\"\" class=\"wp-image-353\" \/><\/figure>\n\n\n\n<p>For&nbsp;<strong>storageBucket<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Navigate to&nbsp;<strong>android \u2192 app<\/strong><\/li>\n\n\n\n<li>Open&nbsp;<strong>google-service.json<\/strong><\/li>\n\n\n\n<li>Under&nbsp;<strong>&#8220;project_info<\/strong>&nbsp;find&nbsp;<strong>&#8220;storage_bucket&#8221;<\/strong>&nbsp;and Copy value and paste it into<strong>storageBucket<\/strong>.Note &#8211; You can leave it empty as well.<\/li>\n<\/ul>\n\n\n\n<p><strong>Assign firebaseConfig in Firebase Initialization<a href=\"https:\/\/apps.iqonic.design\/documentation\/pawlly-doc\/build\/docs\/getting-started\/app-configuration\/configuration-&amp;-customization\/flutter-configuration#assign-firebaseconfig-in-firebase-initialization\" target=\"_blank\" rel=\"noopener\">\u200b<\/a><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open&nbsp;<strong>main.dart<\/strong><\/li>\n\n\n\n<li>You will find Firebase.initializeApp in void main() method.<\/li>\n\n\n\n<li>assign&nbsp;<strong>firebaseConfig<\/strong>&nbsp;to&nbsp;<strong>options<\/strong>.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"> await Firebase.initializeApp(options: firebaseConfig);<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Update Notification Icon Name<\/strong><\/h2>\n\n\n\n<p>After creating notification icon you can perform this change.<\/p>\n\n\n\n<p><a href=\"https:\/\/documentation.iqonic.design\/pawlly\/configurations-customization\/android-configuration\">How generate notification icon?<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open&nbsp;<strong>lib \u2192 utils \u2192 firebase_messaging_utils.dart<\/strong>.<\/li>\n\n\n\n<li>In showNotification() method find lines below<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">  const AndroidInitializationSettings initializationSettingsAndroid = AndroidInitializationSettings('@drawable\/YOUR NOTIFICATION ICON NAME');<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">var androidPlatformChannelSpecifics = AndroidNotificationDetails(<br>    'notification',<br>    'Notification',<br>    importance: Importance.high,<br>    visibility: NotificationVisibility.public,<br>    autoCancel: true,<br>    \/\/color: primaryColor,<br>    playSound: true,<br>    priority: Priority.high,<br>    icon: '@drawable\/YOUR NOTIFICATION ICON NAME',<br>  );<br><\/pre>\n\n\n\n<p>for android devices do configure steps mention in the documentation &#8211;&nbsp;<a href=\"https:\/\/documentation.iqonic.design\/pawlly\/configurations-customization\/android-configuration\">here<\/a>&nbsp;for iOS devices do configure steps mention in the documentation &#8211;&nbsp;<a href=\"https:\/\/documentation.iqonic.design\/pawlly\/configurations-customization\/ios-configuration\">here<\/a><\/p>\n\n\n\n<p><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Setting up Flutter for your Pawlly Project Change The App Name In the main directory, go to&nbsp;lib -&gt; configs.dart const APP_NAME = &#8216;YOUR APP NAME&#8217;; Reconfiguring The Server URL In the main directory, go to&nbsp;lib -&gt; utils -&gt; configs.dart const DOMAIN_URL = &#8220;ADD YOUR DOMAIN URL&#8221;; Change The Default Language In the main directory, go [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"parent":66,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-pawlly"],"featured_image_src":null,"author_info":{"display_name":"laraveladminiq","author_link":"https:\/\/documentation.iqonic.design\/pawlly\/author\/laraveladminiq\/"},"children":[],"_links":{"self":[{"href":"https:\/\/documentation.iqonic.design\/pawlly\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/documentation.iqonic.design\/pawlly\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/documentation.iqonic.design\/pawlly\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/pawlly\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/pawlly\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":8,"href":"https:\/\/documentation.iqonic.design\/pawlly\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":566,"href":"https:\/\/documentation.iqonic.design\/pawlly\/wp-json\/wp\/v2\/posts\/68\/revisions\/566"}],"up":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/pawlly\/wp-json\/wp\/v2\/posts\/66"}],"wp:attachment":[{"href":"https:\/\/documentation.iqonic.design\/pawlly\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/pawlly\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/pawlly\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}