Customization

To change theme and resources (text, images and videos) on Android platform please look at a guide here.

To change resources on iOS platform please look at a guide here.

setTheme

To change theme on iOS platform specify JSON theme configuration and call IncodeOnboardingSdk.setTheme(theme: theme):

Map<String, dynamic> theme = {
 "colors": {
  "accent": "#00B2FD",
  "primary": "#20263D",
  "background": "#FFFFFF",
  "secondaryBackground": "#E9E9EB",
  "success": "#0CD5A2",
  "error": "#FF5C6F",
  "warning": "#F3AB3C",
  "cancel": "#20263D"
 },
 "fonts": {
  "buttonBig": {
   "name": "CircularXXTT-Black",
   "size": "20"
  },
  "buttonMedium": {
   "name": "CircularXXTT-Black",
   "size": "16"
  },
  "buttonSmall": {
   "name": "CircularXXTT-Black",
   "size": "12"
  },
  "title": {
   "name": "CircularXXTT-Black",
   "size": "25"
  },
  "hugeTitle": {
   "name": "CircularXXTT-Black",
   "size": "40"
  },
  "subtitle": {
   "name": "CircularXXTT-Black",
   "size": "18"
  },
  "boldedSubtitle": {
   "name": "CircularXXTT-Bold",
   "size": "18"
  },
  "smallSubtitle": {
   "name": "CircularXXTT-Black",
   "size": "14"
  },
  "info": {
   "name": "CircularXXTT-Black",
   "size": "16"
  },
  "body": {
   "name": "CircularXXTT-Medium",
   "size": "14"
  },
  "boldedBody": {
   "name": "CircularXXTT-Bold",
   "size": "14"
  },
  "textFieldBig": {
   "name": "CircularXXTT-Black",
   "size": "20"
  },
  "textFieldMedium": {
   "name": "CircularXXTT-Black",
   "size": "15"
  }
 },
 "buttons": {
  "primary": {
   "states": {
    "normal": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "#00B2FD",
     "borderColor": "",
     "borderWidth": 0,
     "cornerRadius": 32,
     "shadowColor": "#000000",
     "shadowOffset": [0,5],
     "shadowOpacity": 0.15,
     "shadowRadius": 9,
     "textColor": "#FFFFFF",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    },
    "highlighted": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "#20263D",
     "borderColor": "",
     "borderWidth": 0,
     "cornerRadius": 32,
     "shadowColor": "#000000",
     "shadowOffset": [0,5],
     "shadowOpacity": 0.15,
     "shadowRadius": 9,
     "textColor": "#00B2FD",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    },
    "disabled": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "#E9E9EB",
     "borderColor": "",
     "borderWidth": 0,
     "cornerRadius": 32,
     "shadowColor": "#000000",
     "shadowOffset": [0,5],
     "shadowOpacity": 0,
     "shadowRadius": 9,
     "textColor": "#FFFFFF",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    }
   },
   "big": {
    "height": 64,
    "minWidth": 200,
    "contentInsets": {
     "top": 19,
     "left": 32,
     "bottom": 19,
     "right": 32
    },
    "kerning": 0
   },
   "medium": {
    "height": 46,
    "minWidth": 0,
    "contentInsets": {
     "top": 12,
     "left": 24,
     "bottom": 12,
     "right": 24
    },
    "kerning": 0
   }
  },
  "secondary": {
   "states": {
    "normal": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "#FFFFFF",
     "borderColor": "#20263D",
     "borderWidth": 1,
     "cornerRadius": 32,
     "shadowColor": "",
     "shadowOffset": [0,0],
     "shadowOpacity": 0,
     "shadowRadius": 0,
     "textColor": "#20263D",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    },
    "highlighted": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "#20263D",
     "borderColor": "#20263D",
     "borderWidth": 1,
     "cornerRadius": 32,
     "shadowColor": "",
     "shadowOffset": [0,0],
     "shadowOpacity": 0,
     "shadowRadius": 0,
     "textColor": "#00B2FD",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    },
    "disabled": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "#FFFFFF",
     "borderColor": "#E9E9EB",
     "borderWidth": 1,
     "cornerRadius": 32,
     "shadowColor": "",
     "shadowOffset": [0,0],
     "shadowOpacity": 0,
     "shadowRadius": 0,
     "textColor": "#E9E9EB",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    }
   },
   "big": {
    "height": 64,
    "minWidth": 200,
    "contentInsets": {
     "top": 19,
     "left": 32,
     "bottom": 19,
     "right": 32
    },
    "kerning": 0
   },
   "medium": {
    "height": 46,
    "minWidth": 0,
    "contentInsets": {
     "top": 12,
     "left": 24,
     "bottom": 12,
     "right": 24
    },
    "kerning": 0
   }
  },
  "text": {
   "states": {
    "normal": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "",
     "borderColor": "",
     "borderWidth": 0,
     "cornerRadius": 0,
     "shadowColor": "",
     "shadowOffset": [0,0],
     "shadowOpacity": 0,
     "shadowRadius": 0,
     "textColor": "#20263D",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    },
    "highlighted": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "",
     "borderColor": "",
     "borderWidth": 0,
     "cornerRadius": 0,
     "shadowColor": "",
     "shadowOffset": [0,0],
     "shadowOpacity": 0,
     "shadowRadius": 0,
     "textColor": "#00B2FD",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    },
    "disabled": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "",
     "borderColor": "",
     "borderWidth": 0,
     "cornerRadius": 0,
     "shadowColor": "",
     "shadowOffset": [0,0],
     "shadowOpacity": 0,
     "shadowRadius": 0,
     "textColor": "#E9E9EB",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    }
   },
   "big": {
    "height": 40,
    "minWidth": 200,
    "contentInsets": {
     "top": 8,
     "left": 16,
     "bottom": 8,
     "right": 16
    },
    "kerning": 0
   },
   "medium": {
    "height": 30,
    "minWidth": 0,
    "contentInsets": {
     "top": 12,
     "left": 24,
     "bottom": 12,
     "right": 24
    },
    "kerning": 0
   }
  },
  "help": {
   "states": {
    "normal": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "#00B2FD",
     "borderColor": "",
     "borderWidth": 0,
     "cornerRadius": 32,
     "shadowColor": "#000000",
     "shadowOffset": [0,5],
     "shadowOpacity": 0.15,
     "shadowRadius": 9,
     "textColor": "#FFFFFF",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    },
    "highlighted": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "#20263D",
     "borderColor": "",
     "borderWidth": 0,
     "cornerRadius": 32,
     "shadowColor": "#000000",
     "shadowOffset": [0,5],
     "shadowOpacity": 0.15,
     "shadowRadius": 9,
     "textColor": "#00B2FD",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    },
    "disabled": {
     "animateStateChange": true,
     "alpha": 1,
     "backgroundColor": "#E9E9EB",
     "borderColor": "",
     "borderWidth": 0,
     "cornerRadius": 32,
     "shadowColor": "#000000",
     "shadowOffset": [0,5],
     "shadowOpacity": 0,
     "shadowRadius": 9,
     "textColor": "#FFFFFF",
     "transform": {
      "a": 1,
      "b": 0,
      "c": 0,
      "d": 1,
      "tx": 0,
      "ty": 0
     }
    }
   },
   "big": {
    "height": 64,
    "minWidth": 200,
    "contentInsets": {
     "top": 19,
     "left": 32,
     "bottom": 19,
     "right": 32
    },
    "kerning": 0
   },
   "medium": {
    "height": 46,
    "minWidth": 0,
    "contentInsets": {
     "top": 12,
     "left": 24,
     "bottom": 12,
     "right": 24
    },
    "kerning": 0
   }
  }
 },
 "labels": {
  "title": {
   "textColor": "#20263D",
   "kerning": 0
  },
  "secondaryTitle": {
   "textColor": "#FFFFFF",
   "kerning": 0
  },
  "subtitle": {
   "textColor": "#20263D",
   "kerning": 0
  },
  "secondarySubtitle": {
   "textColor": "#FFFFFF",
   "kerning": 0
  },
  "smallSubtitle": {
   "textColor": "#20263D",
   "kerning": 0
  },
  "info": {
   "textColor": "#636670",
   "kerning": 0
  },
  "secondaryInfo": {
   "textColor": "#FFFFFF",
   "kerning": 0
  },
  "body": {
   "textColor": "#20263D",
   "kerning": 0
  },
  "secondaryBody": {
   "textColor": "#FFFFFF",
   "kerning": 0
  },
  "code": {
   "textColor": "#20263D",
   "kerning": 16
  }
 },
 "customComponents": {
  "cameraFeedback": {
   "alpha": 0.8,
   "backgroundColor": "#000000",
   "cornerRadius": 20,
   "textBackgroundColor": "",
   "textColor": "#FFFFFF"
  },
  "idCaptureHelp": {
   "commonIssueLayoutOrientation": "horizontal"
  },
  "idSideLabel": {
   "alpha": 1,
   "backgroundColor": "#FFFFFF",
   "borderColor": "",
   "borderWidth": 0,
   "cornerRadius": 5
  },
  "separator": {
   "alpha": 1.0,
   "color": "#20263D",
   "cornerRadius": 0,
   "padding": 24,
   "thickness": 1
  },
  "signature": {
   "signatureColor": "#04BD19",
   "canvasBorderColor": "#EC03FC"
  },
  "idAutocaptureCountdown": {
   "backgroundColor": "#00B2FD",
   "numberColor": "#FFFFFF"
  }
 },
};

UXV1 / UXV2 (ID v2 customization)

Both platforms support the customization of ID v2 experience via IncodeOnboardingSdk.setTheme(theme: theme):

Android configuration guide for ID V2 scan flow can be found here.

iOS configuration guide for ID V2 scan flow can be found here.

setLocalizationLanguage

To programmatically set localization language in runtime, call IncodeSdk.setLocalizationLanguage.

Parameters available for IncodeSDK.setLocalizationLanguage method:

IncodeOnboardingSdk.setLocalizationLanguage('es');

Additionally, on the Android platform, a new dependency needs to be added in your app/build.gradle:

  implementation 'com.incode.sdk:extensions:1.2.1'

setString

To programmatically set and update strings in runtime, call IncodeSdk.setString.

Parameters available for IncodeSDK.setString method:

    Map<String, dynamic> strings = {
      /// iOS labels
      'incdOnboarding.idChooser.title': 'My Custom chooser title',

/// Android labels
      'onboard_sdk_id_type_chooser_title': 'My Custom chooser title',
    };
    IncodeOnboardingSdk.setString(strings: strings);

Additionally, on the Android platform, a new dependency needs to be added in your app/build.gradle:

  implementation 'com.incode.sdk:extensions:1.2.1'

For iOS, please check the documentation here.

For Android, please check the documentation here.