Customization

Flutter customization

Android

Changing Applozic's default theme

Go to your YOUR-PROJECT/android/app/src/main/res/values/colors.xml file and paste the below color and change the values of applozic_theme_color_primary and applozic_theme_color_primary_dark

<color name="applozic_theme_color_primary">#FF03A9F4</color>
    <color name="applozic_theme_color_primary_dark">#FF0288D1</color>

Applozic customization json settings

  • Applozic provides an easy to customise setting for changing the colors/text/background of different icons and layouts. Download theapplozic-settings.json file from here and add it in YOUR-PROJECT/android/app/src/main/assets directory. If the directory does not exists, create it. Refer here for the attributes and customisation you can do using applozic-settings.json file.

iOS

📘

Note

When using the AppLogic Flutter Plugin in your app, you need to open the iOS/Runner.xcworkpsace file in Xcode to do the customizations as this plugin uses CocoaPods.

To customize Applozic settings for iOS, follow the below steps:

  1. Open the ios/Runner.xcworkspace in Xcode.

  2. Create (if not present) a file by the name of ApplozicWrapper.swift at ios/Runner. Add the code given here to it.

  3. Right click on your Runner target name in Xcode -> Add files to "Runner" -> Select the ApplozicWrapper.swift file created in step 2.
    Ignore if this file is already added. If your app does not have the Bridging header file, Xcode will show a dialog to add the file, click Yes.

  4. If your Flutter iOS project is in Objective-c then follow step 4 else ignore if your project is Swift

  • Click on YourApp in Xcode and select Build Settings -> Build Options -> Always Embed Swift
    Standard Libraries -> Yes

  • Open AppDelegate.m file and add the below import (Ignore if already done):

#import "Runner-Swift.h"
  1. Open the ApplozicWrapper.swift add the following code at the bottom :
@objc func useCustomConfigurations() {
   // To apply the configuration use the ALChatManager.defaultConfiguration 
   // Example in below im setting the background color for chat detail screen
   // ALChatManager.defaultConfiguration.backgroundColor = UIColor.red
 }
  • Then in ApplozicWrapper.swift file find the method didFinishLaunchingWithOptions add the
    below code just below the registerForNotification() :
useCustomConfigurations()
  • In the ApplozicWrapper.swift file and add the configurations you want to customise inside the function. Refer this doc for different configurations provided by ApplozicSwift SDK.

What’s Next

Logout

Did this page help you?