setConfig method

  1. @override
Future<void> setConfig({
  1. required String clientId,
  2. String? userId,
  3. String? recipeId,
  4. String? fcmToken,
  5. String? userName,
  6. String? userEmail,
  7. String? userPhone,
  8. Map<String, String>? userVariables,
  9. Map<String, String>? roomVariables,
})
override

Implementation

@override
Future<void> setConfig({
  required String clientId,
  String? userId,
  String? recipeId,
  String? fcmToken,
  String? userName,
  String? userEmail,
  String? userPhone,
  Map<String, String>? userVariables,
  Map<String, String>? roomVariables,
}) async {
  try {
    await verloopMethods.invokeMethod('setConfig', <String, dynamic>{
      'USER_ID': userId,
      'CLIENT_ID': clientId,
      'RECIPE_ID': recipeId,
      'FCM_TOKEN': fcmToken,
      'USER_NAME': userName,
      'USER_EMAIL': userEmail,
      'USER_PHONE': userPhone,
      'USER_CUSTOM_FIELDS': userVariables,
      'ROOM_CUSTOM_FIELDS': roomVariables,
    });
  } on PlatformException catch (e) {
    log("Failed to set config for the widget: '${e.message}'.");
  }
}