{"id":37,"date":"2025-04-15T12:11:15","date_gmt":"2025-04-15T12:11:15","guid":{"rendered":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/?p=37"},"modified":"2025-07-14T05:32:23","modified_gmt":"2025-07-14T05:32:23","slug":"flutter-configuration","status":"publish","type":"post","link":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/flutter-configuration\/","title":{"rendered":"\ud83d\udcf2Flutter 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 KiviCare &#8211; Laravel 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>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<a href=\"https:\/\/apps.iqonic.design\/documentation\/kivicare-laravel-doc\/build\/docs\/getting-started\/app\/Configuration\/flutter#change-default-language\" target=\"_blank\" rel=\"noopener\">\u200b<\/a><\/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<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;<strong>[&#8220;en&#8221;, &#8220;ar&#8221;, &#8220;de&#8221;, &#8220;pt&#8221;, &#8220;es&#8221;]<\/strong>&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 App Font<\/strong><\/h2>\n\n\n\n<p>In the main directory, go to&nbsp;<strong>lib \u2192 app_theme.dart<\/strong><\/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;<strong>lib \u2192 utils \u2192 colors.dart<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">const appColorPrimary = Color(0xFF5670CC);<br>const appColorSecondary = Color(0xFFF67E7D);<\/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>Update Notification Icon Name<a href=\"https:\/\/apps.iqonic.design\/documentation\/kivicare-laravel-doc\/build\/docs\/getting-started\/app\/Configuration\/flutter#update-notification-icon-name\" target=\"_blank\" rel=\"noopener\">\u200b<\/a><\/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<p><strong>INFO<\/strong><\/p>\n\n\n\n<p>After completion of&nbsp;<a href=\"https:\/\/documentation.iqonic.design\/kivicare-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; firebase_options.dart<\/strong>&nbsp;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=\"1024\" height=\"417\" src=\"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-content\/uploads\/sites\/10\/2025\/04\/Flutter_Configuration1.png\" alt=\"\" class=\"wp-image-319\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open your Firebase Console.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"for-apikey\">For&nbsp;<strong>apiKey<\/strong><a href=\"https:\/\/apps.iqonic.design\/documentation\/kivicare-laravel-doc\/build\/docs\/getting-started\/app\/Configuration\/flutter#for-apikey\" target=\"_blank\" rel=\"noopener\">\u200b<\/a><\/h4>\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=\"768\" height=\"553\" src=\"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-content\/uploads\/sites\/10\/2025\/04\/Flutter_Configuration2.png\" alt=\"\" class=\"wp-image-320\" \/><\/figure>\n\n\n\n<p><strong>For Android App ID and iOS App Id<\/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=\"768\" height=\"580\" src=\"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-content\/uploads\/sites\/10\/2025\/04\/Flutter_Configuration3.png\" alt=\"\" class=\"wp-image-321\" \/><\/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=\"1024\" height=\"497\" src=\"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-content\/uploads\/sites\/10\/2025\/04\/Flutter_Configuration4.png\" alt=\"\" class=\"wp-image-322\" \/><\/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&#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 KiviCare &#8211; Laravel Project Change App Name In the main directory, go to&nbsp;lib \u2192 configs.dart const APP_NAME = &#8216;YOUR APP NAME&#8217;; Reconfigure Server URL In the main directory, go to&nbsp;lib \u2192 configs.dart const DOMAIN_URL = &#8220;ADD YOUR DOMAIN URL&#8221;; Change Default Language\u200b In the main directory, [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"parent":35,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-37","post","type-post","status-publish","format-standard","hentry","category-kivicare-laravel"],"featured_image_src":null,"author_info":{"display_name":"laraveladminiq","author_link":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/author\/laraveladminiq\/"},"children":[],"_links":{"self":[{"href":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-json\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":6,"href":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":701,"href":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-json\/wp\/v2\/posts\/37\/revisions\/701"}],"up":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-json\/wp\/v2\/posts\/35"}],"wp:attachment":[{"href":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivicare-laravel\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}