Docly Child

Flutter Configuration

Estimated reading: 3 minutes

Changing the App's Name

 In the main directory go to the lib -> configs.dart

const app_name = 'YOUR APP NAME';

Changing the Walk Through Text

 In the main directory go to the lib -> configs.dart

const walk_titles = ["TITLE_ONE", "TITLE_TWP", "TITLE_THREE"];
const walk_sub_titles = [
"SUBTITLE_ONE",
"SUBTITLE_TWO",
"SUBTITLE_THREE",
];

Change App Colors

In Main directory goto the lib ->utils -> resources -> colors.dart.

import 'package:flutter/material.dart';

const colorPrimary = Color(0xFFE50914);
const colorPrimaryDark = Color(0xFFE50914);
const textColorPrimary = Color(0xFF212121);
const textColorSecondary = Color(0xFF757575);

Change your Default Language

  • Open lib -> configs.dart file and change defaultLanguage variable value with your domain.
const defaultLanguage = 'en';

Change your base URL

  • Open lib -> configs.dart file and change mBaseUrl variable value with your domain.
const mBaseUrl = 'your base URL';

Changing WooCiommerce Consumer Secret and Consumer Key

  • Open lib -> configs.dart file and change your keys.
/// Woo Commerce keys
const CONSUMER_KEY = 'YOUR_CONSUMER_KEY'
const CONSUMER_SECRET = 'YOUR_CONSUMER_SECRET';

Setup Onesignal push notification

  1. Create a OneSignal Account

      Follow below steps

  • Click on to New App/Website button.
  • Enter the App/website name in AppName Field.
  • Select one platform configure, for Example(iOS,Android,Web push).
  • After Select Any One platform to configure. we can get Firebase Server Key and Firebase Sender Id. If you can select the iOS platform then you can require the production Push Certificate.(.p12 Certificate) and then get the Firebase server Key. Then Click on Save Button.
  • After getting the Firebase Server key and Sender ID. Goto the firebase app and on the left side you see Project overview and settings click on it and select Project Settings. and In Setting. select Cloud messaging. and Enter Server Key and Sender ID and at the end Click into Save Button.
  1. Configure OneSignal on App
  • We have already added code for SDK and other configurations for one signal push notification. Open lib -> configs.dart file and replace your OneSignal app ID with mOneSignalAPPKey.
  • For Android and iOS:-
    Follow instructions for OneSignal Configure Here.

Setup AdMob

  • For AdMob setup, you just need to change the app id, banner id, and interstitial id.
  • For that, you have to create a firebase account and create a new application in AdMob. and then create two ad units.
  1. Banner Ad
  2.  Interstitial Ad
  • Refer Link
  • Now come back to the Application source code.
  • Open lib -> configs.dart file.
  • And replace mAdMobAppIdmAdMobBannerIdmAdMobInterstitialId ids
  • Now run the application. your ads are now live.

Leave a Comment

Share this Doc
CONTENTS