boot static method

Future<bool?> boot({
  1. required String pluginKey,
  2. String? memberId,
  3. String? memberHash,
  4. String? email,
  5. String? name,
  6. String? mobileNumber,
  7. String? avatarUrl,
  8. Language? language,
  9. bool? unsubscribeEmail,
  10. bool? unsubscribeTexting,
  11. bool? trackDefaultEvent,
  12. bool? hidePopup,
  13. Appearance? appearance,
})

Implementation

static Future<bool?> boot({
  required String pluginKey,
  String? memberId,
  String? memberHash,
  String? email,
  String? name,
  String? mobileNumber,
  String? avatarUrl,
  Language? language,
  bool? unsubscribeEmail,
  bool? unsubscribeTexting,
  bool? trackDefaultEvent,
  bool? hidePopup,
  Appearance? appearance,
}) {
  Map<String, dynamic> config = {
    'pluginKey': pluginKey,
    if (memberId != null) 'memberId': memberId,
    if (memberHash != null) 'memberHash': memberHash,
    if (email != null) 'email': email,
    if (name != null) 'name': name,
    if (mobileNumber != null) 'mobileNumber': mobileNumber,
    if (avatarUrl != null) 'avatarUrl': avatarUrl,
    if (language != null) 'language': language.value,
    if (unsubscribeEmail != null) 'unsubscribeEmail': unsubscribeEmail,
    if (unsubscribeTexting != null) 'unsubscribeTexting': unsubscribeTexting,
    if (trackDefaultEvent != null) 'trackDefaultEvent': trackDefaultEvent,
    if (hidePopup != null) 'hidePopup': hidePopup,
    if (appearance != null) 'appearance': appearance.value,
  };

  return ChannelTalkFlutterPlatform.instance.boot(config);
}