setStaticField method
Implementation
void setStaticField(String name, Object? value) {
if (staticFields.containsKey(name)) {
final fieldValue = staticFields[name];
if (fieldValue is LateVariable) {
// Assign to the late variable
fieldValue.assign(value);
return;
}
}
// Check if field exists? Dart allows adding fields implicitly usually,
// but for static maybe we should be stricter? For now, allow setting.
staticFields[name] = value;
}