getVariable method

dynamic getVariable(
  1. String scope,
  2. String name
)

Get variable from specific scope

Implementation

dynamic getVariable(String scope, String name) {
  try {
    final scopes = _context['scopes'] as Map<String, dynamic>? ?? {};
    final scopeData = scopes[scope] as Map<String, dynamic>? ?? {};
    return scopeData[name];
  } catch (e) {
    return null;
  }
}