boot method
Implementation
@override
Future<bool?> boot(Map<String, dynamic> config) {
final Map<String, dynamic> bootOption = {
'pluginKey': config['pluginKey'],
'memberId': config['memberId'],
'customLauncherSelector': config['customLauncherSelector'],
'hideChannelButtonOnBoot': config['hideChannelButtonOnBoot'],
'zIndex': config['zIndex'],
'language': config['language'],
'trackDefaultEvent': config['trackDefaultEvent'],
'trackUtmSource': config['trackUtmSource'],
'profile': {
if (config['email'] != null) 'email': config['email'],
if (config['mobileNumber'] != null)
'mobileNumber': config['mobileNumber'],
if (config['name'] != null) 'name': config['name'],
if (config['avatarUrl'] != null) 'avatarUrl': config['avatarUrl'],
},
'unsubscribeEmail': config['unsubscribeEmail'],
'unsubscribeTexting': config['unsubscribeTexting'],
'memberHash': config['memberHash'],
'hidePopup': config['hidePopup'],
'appearance': config['appearance'],
};
channel_talk_service.boot(
'boot',
bootOption.jsify(),
// BootOption(
// pluginKey: config['pluginKey'],
// memberId: config['memberId'],
// customLauncherSelector: config['customLauncherSelector'],
// hideChannelButtonOnBoot: config['hideChannelButtonOnBoot'],
// zIndex: config['zIndex'],
// language: config['language'],
// trackDefaultEvent: config['trackDefaultEvent'],
// trackUtmSource: config['trackUtmSource'],
// profile: config['email'] != null ||
// config['mobileNumber'] != null ||
// config['avatarUrl'] != null ||
// config['name'] != null
// ? Profile(
// email: config['email'],
// mobileNumber: config['mobileNumber'],
// name: config['name'],
// avatarUrl: config['avatarUrl'],
// )
// : null,
// unsubscribeEmail: config['unsubscribeEmail'],
// unsubscribeTexting: config['unsubscribeTexting'],
// memberHash: config['memberHash'],
// hidePopup: config['hidePopup'],
// appearance: config['appearance'],
// ),
);
return Future.value(true);
}