spawnDartScript method
Spawn a Dart script.
Implementation
Future<SpawnedIsolate> spawnDartScript(String dartScript, List<String> args,
{String? debugName,
bool enableObservatory = false,
bool runObservatory = false,
bool usesSpawnedMain = false}) {
final dataUri = Uri.parse(
'data:application/dart;charset=utf-8,${Uri.encodeComponent(dartScript)}');
return _spawnDart(dartScript, '<script>', dataUri, args,
debugName: debugName,
enableObservatory: enableObservatory,
runObservatory: runObservatory,
usesSpawnedMain: usesSpawnedMain);
}