{"id":165,"date":"2025-02-20T06:40:16","date_gmt":"2025-02-20T06:40:16","guid":{"rendered":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/?p=165"},"modified":"2025-06-13T06:20:48","modified_gmt":"2025-06-13T06:20:48","slug":"flutter-configuration","status":"publish","type":"post","link":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/flutter-configuration\/","title":{"rendered":"Flutter Configuration"},"content":{"rendered":"<div class=\"nolwrap\">\n<pre class=\"wp-block-preformatted\">Estimated reading: 1 minute<\/pre>\n\n\n\n<p>Setting up Flutter for your KiviLabs Project<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Change App Name<\/strong><\/h2>\n\n\n\n<p>In the main directory, go to&nbsp;<strong>lib \u2192 configs.dart<\/strong><\/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>Change App Logo<\/strong><\/h2>\n\n\n\n<p>In the main directory go to&nbsp;<strong>&#8216;assets <strong>\u2192<\/strong>logos&#8217;<\/strong><\/p>\n\n\n\n<p>Replace &#8220;<strong>app_logo<\/strong>&#8221; image with same name just replace file<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Reconfigure Server URL<\/strong><\/h2>\n\n\n\n<p>In the main directory, go to&nbsp;<strong>lib \u2192 configs.dart<\/strong><\/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 Default Language<\/strong><\/h2>\n\n\n\n<p>In the main directory, go to&nbsp;<strong>lib \u2192 configs.dart<\/strong><\/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<div class=\"wp-block-comments\">\n<p><strong>TIP<\/strong><\/p>\n\n\n\n<p>1. Set the language code from the provided list\u00a0<strong>[\u201cen\u201d, \u201car\u201d, \u201cde\u201d, \u201cpt\u201d, \u201ces\u201d]<\/strong>\u00a0for supported languages in the application. For other languages, customization is required.<br>2. Use only the language code, not the entire language name. You can find the language codes\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Change App Font<\/strong><\/h2>\n\n\n\n<p>In the main directory, go to&nbsp;<strong>lib \u2192 configs.dart<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">const FONT_FAMILY = 'YOUR FONT_FAMILY NAME';<\/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\u2019s 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;<strong>lib \u2192 utils \u2192 constant<\/strong>s <strong>\u2192<\/strong> <strong>colors.dart<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">const appPrimaryColor = Color(0xFF5670CC);<br>const appSecondaryColor= Color(0xFFF67E7D);<\/pre>\n<\/div>\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>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<ul class=\"wp-block-list\">\n<li>Open&nbsp;<strong>lib \u2192 utils \u2192 push_notification_service.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<h2 class=\"wp-block-heading\"><strong>Add FirebaseOptions<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>INFO<\/strong><\/h3>\n\n\n\n<p>After completion of&nbsp;<a href=\"https:\/\/documentation.iqonic.design\/kivilab-laravel\/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; default_firebase_options.dart <\/strong>and update values for respective object.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">static const FirebaseOptions android = FirebaseOptions(<br>  appId: \"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>);<br><br>static const FirebaseOptions ios = FirebaseOptions(<br>  appId: \"FIREBASE iOS 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<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1358\" height=\"665\" src=\"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-content\/uploads\/sites\/6\/2025\/02\/image-2.png\" alt=\"\" class=\"wp-image-756\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open your Firebase Console.<\/li>\n<\/ul>\n\n\n\n<p><strong>For&nbsp;apiKey<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to Project Settings and click on&nbsp;<strong>General<\/strong>&nbsp;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.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1206\" height=\"491\" src=\"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-content\/uploads\/sites\/6\/2025\/02\/firebase_default_2.png\" alt=\"\" class=\"wp-image-228\" \/><\/figure>\n\n\n\n<p><strong>For Android App ID and iOS App Id<a href=\"https:\/\/apps.iqonic.design\/documentation\/kivicare-laravel-doc\/build\/docs\/getting-started\/app\/Configuration\/flutter#for-android-app-id-and-ios-app-id\" target=\"_blank\" rel=\"noopener\">\u200b<\/a><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>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>.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"845\" height=\"638\" src=\"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-content\/uploads\/sites\/6\/2025\/02\/firebase_default_appId_iOS.png\" alt=\"\" class=\"wp-image-230\" \/><\/figure>\n\n\n\n<p>For&nbsp;<strong>messagingSenderId<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click on&nbsp;<strong>Cloud Messaging<\/strong>&nbsp;you will see&nbsp;<strong>Sender ID<\/strong>. Copy that paste it to&nbsp;<strong>messagingSenderId<\/strong>.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1334\" height=\"647\" src=\"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-content\/uploads\/sites\/6\/2025\/02\/firebase_default_3.png\" alt=\"\" class=\"wp-image-229\" \/><\/figure>\n\n\n\n<p><strong>For&nbsp;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&#8221;<\/strong>&nbsp;find&nbsp;<strong>&#8220;storage_bucket&#8221;<\/strong>&nbsp;and copy value and paste it into&nbsp;<strong>storageBucket<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p><strong>Assign firebaseConfig in Firebase Initialization<\/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>verify&nbsp;<strong>DefaultFirebaseOptions<\/strong>&nbsp;is assigned to&nbsp;<strong>options<\/strong>.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">  await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);<\/pre>\n\n\n\n<p><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Estimated reading: 1 minute Setting up Flutter for your KiviLabs Project Change App Name In the main directory, go to&nbsp;lib \u2192 configs.dart const APP_NAME = &#8216;YOUR APP NAME&#8217;; Change App Logo In the main directory go to&nbsp;&#8216;assets \u2192logos&#8217; Replace &#8220;app_logo&#8221; image with same name just replace file Reconfigure Server URL In the main directory, go [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"parent":163,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-165","post","type-post","status-publish","format-standard","hentry","category-kivilab"],"featured_image_src":null,"author_info":{"display_name":"","author_link":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/author\/"},"children":[],"_links":{"self":[{"href":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-json\/wp\/v2\/posts\/165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-json\/wp\/v2\/comments?post=165"}],"version-history":[{"count":18,"href":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-json\/wp\/v2\/posts\/165\/revisions"}],"predecessor-version":[{"id":853,"href":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-json\/wp\/v2\/posts\/165\/revisions\/853"}],"up":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-json\/wp\/v2\/posts\/163"}],"wp:attachment":[{"href":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-json\/wp\/v2\/media?parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-json\/wp\/v2\/categories?post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivilab-laravel\/wp-json\/wp\/v2\/tags?post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}