initWebSDK static method

void initWebSDK(
  1. String fcmPath
)

Implementation

static void initWebSDK(String fcmPath) {
  try{
    html.Element? head = html.document.querySelector('head');
    html.ScriptElement script = html.ScriptElement();
    script.defer = true;
    script.src = "https://sdk.rsut.io/handlers/5f7a2e8e1bdb47399d28278a2759394c.sdk";
    script.setAttribute('fcm_service_path', fcmPath.toString());
    head?.append(script);
    setupCustomEventListener(fcmPath);
  }catch(e){
    debugPrint("$e");
  }
}