evalSync method

Object? evalSync(
  1. String code, {
  2. Duration? timeout,
  3. String name = '<eval>',
  4. Map<String, Object?> tempGlobals = const {},
})

Evaluates immediately in this context and converts the returned value.

Implementation

Object? evalSync(
  String code, {
  Duration? timeout,
  String name = '<eval>',
  Map<String, Object?> tempGlobals = const {},
}) {
  _ensureOpen();
  return _engine.evalSync(
    code,
    timeout: timeout,
    name: name,
    tempGlobals: tempGlobals,
  );
}