{"id":52,"date":"2025-03-05T06:11:56","date_gmt":"2025-03-05T06:11:56","guid":{"rendered":"https:\/\/documentation.iqonic.design\/streamit-tv\/?p=52"},"modified":"2026-02-27T11:19:26","modified_gmt":"2026-02-27T11:19:26","slug":"flutter-configuration","status":"publish","type":"post","link":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/flutter-configuration\/","title":{"rendered":"Flutter Configuration"},"content":{"rendered":"<div class=\"nolwrap\">\n<pre class=\"wp-block-preformatted\">Estimated reading: 3 minutes<\/pre>\n\n\n\n<p>Setting up Flutter for your Streamit TV Project<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Change The App&#8217;s Name<\/strong><\/h2>\n\n\n\n<p>In the main directory go to the&nbsp;<strong>&#8216;lib \u2192 configs.dart&#8217;<\/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>Reconfiguration The Server URL<\/strong><\/h2>\n\n\n\n<p>In the main directory go to the&nbsp;<strong>&#8216;lib \u2192 configs.dart&#8217;<\/strong><\/p>\n\n\n\n<p>Note : Do not add (&#8216;\/&#8217;) at the end of DOMAIN_URL<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">const DOMAIN_URL = \"ADD YOUR BASE URL\" ;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Change Primary Color<\/strong><\/h2>\n\n\n\n<p>In the main directory go to the&nbsp;<strong>&#8216;lib \u2192 utils \u2192 colors.dart&#8217;<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><br>const primaryColor = Color(0xFF5F60B9);<br><br>const appSecondaryColor = Color(0xFF68685);<br><\/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&#8217;<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Change Logo on splash.screen.dart\n<ul class=\"wp-block-list\">\n<li>Replace &#8220;<strong>app_logo<\/strong>&#8221; image with same name just replace file.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Change Logo on home.screen.dart\n<ul class=\"wp-block-list\">\n<li>Replace &#8220;<strong>ic_icon<\/strong>&#8221; icon with same name just replace file.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>After completing Firebase configuration. Please make sure you update Firebase Options<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Update Firebase Option<\/strong><\/h2>\n\n\n\n<p>In the main directory go to the &#8216;lib \u2192 firebase_options.dart&#8217;<\/p>\n\n\n\n<p><strong>Note : <\/strong>Values available android\/app\/google-services.json<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">static const FirebaseOptions android = FirebaseOptions(<br>    apiKey: 'FIREBASE WEB API KEY',<br>    appId: 'FIREBASE ANDROID APP KEY',<br>    messagingSenderId: 'FIREBASE SENDER ID',<br>    projectId: 'FIREBASE PROJECT ID',<br>    storageBucket: 'FIREBASE STORAGE BUCKET',<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&nbsp;<strong>Project Settings<\/strong>&nbsp;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.<\/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\/streamit-tv\/wp-content\/uploads\/sites\/8\/2025\/03\/firebase_default_1.png\" alt=\"\" class=\"wp-image-252\" \/><\/figure>\n\n\n\n<p>Scroll Down and in Your Apps section you\u2019ll find App Id in Android  section. Copy respective values and paste it to&nbsp;<strong>appId<\/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\/streamit-tv\/wp-content\/uploads\/sites\/8\/2025\/03\/firebase_default_2.png\" alt=\"\" class=\"wp-image-253\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>For&nbsp;<strong>messagingSenderId<\/strong>&nbsp;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>.<\/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\/streamit-tv\/wp-content\/uploads\/sites\/8\/2025\/03\/firebase_default_3.png\" alt=\"\" class=\"wp-image-254\" \/><\/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>.Note &#8211; You can leave it empty as well.<\/li>\n<\/ul>\n\n\n\n<p><strong>Note<\/strong> &#8211; You can leave it empty as well.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"verify-default-firebase-options-in-firebase-initialization\">Verify Default Firebase options in Firebase Initialization<a href=\"https:\/\/apps.iqonic.design\/documentation\/streamit-laravel-documentation\/build\/docs\/getting-started\/app\/configuration\/flutter#verify-default-firebase-options-in-firebase-initialization\" target=\"_blank\" rel=\"noopener\">\u200b<\/a><\/h4>\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() and firebaseMessagingBackgroundHandler() method.<\/li>\n\n\n\n<li>verify that Default Firebase Options for current platform is initialized or not.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">  await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform).then((value) {<br>    PushNotificationService().initFirebaseMessaging();<br>    if (kReleaseMode) FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;<br>  }).catchError(onError);<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">Future&lt;void&gt; firebaseMessagingBackgroundHandler(RemoteMessage message) async {<br>  await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);<br>}<\/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<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 initializePlatformSpecificNotificationChannel() 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<ul class=\"wp-block-list\">\n<li>In showNotification() method find lines below<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">var androidPlatformChannelSpecifics = AndroidNotificationDetails(<br>    ...<br>    ...<br>    icon: '@drawable\/YOUR NOTIFICATION ICON NAME',<br>  );<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Set up AdMob<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace Google AdMob IDs for different types of ads in&nbsp;<strong>lib -&gt; config.dart<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/\/Android<br>const String interstitialAdId = 'YOUR_INTERSTITIAL_AD_ID';<br>const String bannerAdId = 'YOUR_BANNER_AD_ID';<br><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"if-you-havent-set-up-admob-yet-follow-these-steps\">If you haven\u2019t set up AdMob yet, follow these steps:<a href=\"https:\/\/apps.iqonic.design\/documentation\/streamit-laravel-documentation\/build\/docs\/getting-started\/app\/configuration\/flutter#if-you-havent-set-up-admob-yet-follow-these-steps\" target=\"_blank\" rel=\"noopener\">\u200b<\/a><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Set up your app in your AdMob account\n<ul class=\"wp-block-list\">\n<li>Register your app as an AdMob app by completing the following steps:<\/li>\n\n\n\n<li><a href=\"https:\/\/admob.google.com\/home\/\" target=\"_blank\" rel=\"noreferrer noopener\">Sign in to<\/a>&nbsp;or&nbsp;<a href=\"https:\/\/support.google.com\/admob\/answer\/7356219\" target=\"_blank\" rel=\"noreferrer noopener\">sign up <\/a>for&nbsp;an AdMob account.<\/li>\n\n\n\n<li>This step creates an AdMob app with a unique&nbsp;<a href=\"https:\/\/support.google.com\/admob\/answer\/7356431\" target=\"_blank\" rel=\"noreferrer noopener\">AdMob App ID<\/a>&nbsp;that is needed later in this guide.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Return to your Application source code.<\/li>\n\n\n\n<li>Open the&nbsp;<strong>lib \u2192 configs.dart<\/strong>&nbsp;file.<\/li>\n\n\n\n<li>To ensure proper functionality , replace the variables &#8211; Keys to replace:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">   \/\/\/Android<br>   const String interstitialAdId <br>   const String bannerAdId<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Change the Google AdMob App ID in AndroidManifest.xml and Info.plist<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/documentation.iqonic.design\/streamit-tv-app\/configurations-customization\/android-configuration\">Change Google AdMob App ID in AndroidManifest.xml<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Estimated reading: 3 minutes Setting up Flutter for your Streamit TV Project Change The App&#8217;s Name In the main directory go to the&nbsp;&#8216;lib \u2192 configs.dart&#8217; const APP_NAME = &#8216;YOUR APP NAME&#8217;; Reconfiguration The Server URL In the main directory go to the&nbsp;&#8216;lib \u2192 configs.dart&#8217; Note : Do not add (&#8216;\/&#8217;) at the end of DOMAIN_URL [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"parent":50,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-streamittv"],"featured_image_src":null,"author_info":{"display_name":"laraveladminiq","author_link":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/author\/laraveladminiq\/"},"children":[],"_links":{"self":[{"href":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":16,"href":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":691,"href":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/wp-json\/wp\/v2\/posts\/52\/revisions\/691"}],"up":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/wp-json\/wp\/v2\/posts\/50"}],"wp:attachment":[{"href":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/streamit-tv-app\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}