loadInlineScript function
Implementation
Future<ScriptElement> loadInlineScript(
String src,
String id, {
String type = 'text/javascript',
}) {
var element = document.getElementById(id) as ScriptElement?;
if (element == null) {
element = ScriptElement()
..type = type
..id = id
..innerHtml = src;
document.head!.append(element);
}
return waitLoad<ScriptElement>(element);
}