Flutter Configuration

Change App Font

1.In the main directory, go to font folder and add respective font file.

2.After Adding ttf file in fonts folder open add this code end of the pubspec.yaml file.

fonts:
- family: YOUR_FONT_FAMILY_NAME
fonts:
- asset: fonts/YourRegularFontFamilyName.ttf
- asset: fonts/YourBoldFontFamilyName.ttf

Important:

pattern follow when add code in Pubspec.yaml file.

3. Click in to pub get

4. Open Strings.dart file inside lib/utils/ folder and change font value as your family name.

const font = "YOUR_FONT_FAMILY_NAME";

Change App Colors

In Main directory goto the utils folder and open Colors.dart file  and Change Color code.

import 'package:flutter/material.dart';

const Color primaryColor = Color(0xff4268cd);
const Color accentColor = Color(0xfff49b4d);
.....
....
....

Configure app with your server

In Main directory Goto the lib/network folder and open NetworkUtils.dart file and change your url.

String url = 'https://Your_Server_Url/wp-json/';

Configure your "consumerSecret" and "consumerKey"

In Main directory Goto the lib/network folder and open NetworkUtils.dart file and change your keys.

String consumerSecret = 'cs_d8906e96e5ca786786b0deff6bb29869ssa66437';
String consumerKey = 'ck_a9f66d00a1e59d6158c9bd2432ab6sas191de65';

Update your loader effect

If you want to update loader effect for your app loading, book loader, load more book loader and Download book loader then change below json file with your new json file and put into assets folder.

Download your new json file from: https://lottiefiles.com/

const BOOK_LOADER = 'assets/book_loader.json';
const MORE_DATA_LOADER = 'assets/more_data_loader2.json';
const APP_LOADER = 'assets/app_loader.json';
const FILE_DOWNLOAD_LOADER = 'assets/downloading.json';

How to change default language of app.

In Main directory Goto the lib/utils folder and open Constants.dart file and change your language code.

const String DEFAULT_LANGUAGE_CODE = "en";

How to change app language

Open Global/select app language and click on save changes.

Supported language code:

  • English (“en”)
  • Hindi (“hi”)
  • French (“fr”)
  • Spanish (“es”)
  • German (“de”)
  • Indonesian (“in”)
  • Afrikaans (“af”)
  • Portuguese (“pt”)
  • Turkish (“tr”)
  • Arabic (“ar”)
  • Vietnamese (“vi”)

How to add language of app

1. In the Main directory Goto the lang folder and create a new file.

The file name must be languagecode.json.

For example: en.json

{
"key":"value",
...
}

Important:

The key name must be same as other. Only value is changed

2. After Adding json file in lang folder.Open pubspec.yaml file and add this code in asset.

assets:
- lang/filename.json

Important:

pattern follow when add code in Pubspec.yaml file.

3. Click in to pub get

4. In Main directory Goto the lib folder and open app_localization.dart file and add your language code.

5. In Main directory Goto the lib folder and open app_state.dart file and add code.

6. In Main directory Goto the lib folder and open main.dart file and add code.

Change Admob App ID

  • Open the android project and open AndoridManifest.xml file. and change your App Id.
<application
android:name="io.flutter.app.FlutterApplication"
android:label="BookKart"
android:icon="@mipmap/ic_launcher">
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="YOUR ADS APPLICATION ID"/>
  • In iOS open iOS project and open info.plist and change Admob App Id.
  • open utils folder and open Constants.dart file and change banner id and interstital id.
const bannerAdIdForAndroid = "YOUR BANNER AD ID FOR ANDROID";
const bannerAdIdForIos = "YOUR BANNER AD ID FOR iOS";
const InterstitialAdIdForAndroid = "YOUR INTERSTITIAL AD ID FOR ANDROID";
const interstitialAdIdForIos = "YOUR INTERSTITIAL AD ID FOR iOS";

Unable and Disable Admob Ads

In Main directory goto the utils folder and open Constants.dart file and change your isAdsLoading value. if isAdsLoading value true then ads show otherwise can’t show ads.

const isAdsLoading = true;