start method

  1. @override
Future<MontyProgress> start(
  1. String code, {
  2. List<String>? externalFunctions,
  3. MontyLimits? limits,
  4. String? scriptName,
})
override

Starts iterative execution of code in the background Isolate.

If scriptName is non-null, it overrides the default filename.

Implementation

@override
Future<MontyProgress> start(
  String code, {
  List<String>? externalFunctions,
  MontyLimits? limits,
  String? scriptName,
}) async {
  final response = await _send<_ProgressResponse>(
    _StartRequest(
      _nextId++,
      code,
      externalFunctions: externalFunctions,
      limits: limits,
      scriptName: scriptName,
    ),
  );

  return response.progress;
}