DartSpawner class
Class capable to spawn a Dart script/File/Uri into an Isolate.
Methods
-
cleanDartPubGetGeneratedFiles({required String confirmProjectName, bool verbose = false})
→ Future<bool>
-
Deletes files generated by
dart pub get
:
inherited
-
ensureProjectDependenciesResolved()
→ Future<bool>
-
Ensures that projectDirectory has the dependencies resolved.
If not resolved runs
dart pub get
, calling runDartPubGet.
inherited
-
executablePath(String executableName, {bool refresh = false})
→ Future<String?>
-
Returns an executable binary path for
executableName
.
inherited
-
existsProjectPackageConfigUri()
→ FutureOr<bool>
-
Returns
true
if projectPackageConfigUri exists.
inherited
-
getProjectDependencyVersion(String package)
→ FutureOr<String?>
-
Returns the version string of
package
at the target project dependencies.
inherited
-
isDartFilePath(dynamic dartEntryPoint)
→ bool
-
Returns
true
if dartEntryPoint
is a String and a File path with a '.dart' extension.
-
launchObservatory(String url)
→ Future<ProcessResult>
-
Launches the observatory
url
.
-
log(String type, dynamic message)
→ void
-
Logs a message.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
projectSubDirectory(String filePath)
→ FutureOr<Directory>
-
Returns a sub-Directory inside projectDirectory.
inherited
-
projectSubFile(String filePath)
→ FutureOr<File>
-
Returns a sub-File inside projectDirectory.
inherited
-
projectSubUri(String filePath)
→ FutureOr<Uri>
-
Returns a sub-Uri inside projectDirectory.
inherited
-
runDartPubGet()
→ Future<bool>
-
Runs
dart pub get
in the projectDirectory.
inherited
-
runDartVM(String entrypoint, List<String> args, {bool enableVMService = false, String? vmServiceAddress, int? vmServicePort, bool pauseIsolatesOnStart = false, bool pauseIsolatesOnExit = false, bool pauseIsolatesOnUnhandledExceptions = false, String? workingDirectory, bool handleSignals = false, bool redirectOutput = false, bool catchOutput = false, String stdoutFilter(String o)?, String stderrFilter(String o)?, void onSignal(ProcessSignal signal)?})
→ Future<ProcessInfo>
-
Runs a new Dart VM.
inherited
-
runProcess(String commandName, List<String> args, {bool resolveCommandPath = true, String? workingDirectory, bool handleSignals = false, bool redirectOutput = false, bool catchOutput = false, String stdoutFilter(String o)?, String stderrFilter(String o)?, void onSignal(ProcessSignal signal)?})
→ Future<ProcessInfo>
-
Runs a Process command and returns it.
inherited
-
spawnDart(dynamic dartEntryPoint, List<String> args, {String? debugName, bool enableObservatory = false, bool runObservatory = false, bool usesSpawnedMain = false})
→ Future<SpawnedIsolate>
-
Spawn a Dart entry point (script, File or Uri).
-
spawnDartFile(File dartFile, List<String> args, {String? debugName, bool enableObservatory = false, bool runObservatory = false, bool usesSpawnedMain = false})
→ Future<SpawnedIsolate>
-
Spawn a Dart File.
-
spawnDartScript(String dartScript, List<String> args, {String? debugName, bool enableObservatory = false, bool runObservatory = false, bool usesSpawnedMain = false})
→ Future<SpawnedIsolate>
-
Spawn a Dart script.
-
spawnDartURI(Uri dartUri, List<String> args, {String? debugName, bool enableObservatory = false, bool runObservatory = false, bool usesSpawnedMain = false})
→ Future<SpawnedIsolate>
-
Spawn a Dart Uri.
-
supportsLaunchObservatory()
→ Future<bool>
-
Returns
true
if this environment supports observatory launch.
-
toString()
→ String
-
A string representation of this object.
override