Flutter Configuration

Estimated reading: 3 minutes 5416 views
NOTE
  1. The Section 

Changing the App's Name

  • For User & Provider app
    •  In the main directory go to the lib -> utils -> configs.dart
const APP_NAME = 'YOUR APP NAME';
const APP_NAME_TAG_LINE = 'YOUR APP TAG LINE'; (Used only for user app)

Changing the Default Language

  • For User & Provider app
    •  In the main directory go to the lib -> utils -> configs.dart
const DEFAULT_LANGUAGE = "LANGUAGE CODE" ; (eg. "en","ar","de","pt","es")

Reconfiguring the Server URL

  • For User & Provider app
    •  In the main directory go to the lib -> utils -> configs.dart
const DOMAIN_URL = "ADD YOUR BASE URL" ;

Changing the App Font

  • For User & Provider app
    • In the main directory go to the lib -> app_theme.dart
fontFamily: GoogleFonts.FONT_NAME().fontFamily,

Changing Primary Color

  • For User & Provider app
    •  In the main directory go to the lib -> utils -> configs.dart
var defaultPrimaryColor = Color(0xFF5F60B9);

Changing About Us URL

  • For User & Provider app
    •  In the main directory go to the lib -> utils -> configs.dart
const TERMS_CONDITION_URL = 'YOUR_URL_HERE';
const PRIVACY_POLICY_URL = 'YOUR_URL_HERE';
const HELP_SUPPORT_URL = 'YOUR_URL_HERE';

Changing Google Map Key

  • For User & Provider app 
    • In the main directory go to the booking_system_flutter/android/app/src/main/AndroidManifest.xml
    • Change the existing key
<meta-data
    android:name="com.google.android.geo.API_KEY"
    android:value="YOUR_MAP_KEY" />

Changing "Register as Partner's" link

  • For User & Provider app
    • In the main directory go to the lib -> utils -> configs.dart
const PROVIDER_PACKAGE_NAME = 'YOUR_PROVIDER_APPLICATION_ID'; // You can change this to your provider package name

hourly Calculation Updation

  • For User & Provider app
    • In the main directory go to the lib -> utils -> configs.dart
    • Please update this date when you provide a new version to production. 
    • Logic behind this is if the bookings are after the release date then it will accept the new hourly calculation or else it will take old calculation. 
DateTime todayDate = DateTime(2022, 8, 24);

How To Generate Google Map Key

Step:1

Navigate to Google Maps Platform > Credentials. We’ve included a screenshot below.

Link:https://console.cloud.google.com/projectselector2/google/maps-apis/credentials

Step:2

 After that you have to click on Select a project. We’ve included a screenshot below.

Step:3

After that a dialog will open if you don’t have a project then you have to click on New Project. We’ve included a screenshot below.

Step:4

After clicking on the New Project, a new screen will open in which you have to add the project name and location and then click on the CREATE button. We’ve included a screenshot below.

Step:5

After the project is done, you have to click on the select project option and select the project you have done. We’ve included a screenshot below.

Step:6

After that you have to click on CREATE CREDENTIALS. We have provided the screenshot below.

Step:7

After that a dialog will open from which you have to click on the API key. We’ve included a screenshot below.

Step:8

 After that, a dialog will appear in which you can find the API key and add it to your project by following the steps outlined below. We’ve included a screenshot below.

PATH: android/app/src/main/AndroidManifest.xml

Great! You have successfully configured Flutter!

Leave a Comment

Share this Doc

Flutter Configuration

Or copy link

CONTENTS