Skip to content

Commit 81f3440

Browse files
committed
refactor: add externalDataContext temporarily in the data context
1 parent 43917e3 commit 81f3440

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/framework/data_context.dart

+4
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ class DataContext {
274274
[SourceLocation? startLoc]) {
275275
try {
276276
_contextMap['getStringValue'] = Utils.optionalString;
277+
// TODO: Added temporarily because the externalDataContext datas are not exposed when it's inside the nested callback methods
278+
// Ex: Not working when this (widget.dataContext.addDataContext({'messageText': 'Data - EnsembleUI'});) inside the
279+
// addPostFrameCallback method in screen.dart
280+
_contextMap.addAll(Ensemble.externalDataContext);
277281
return JSInterpreter(codeBlock, program, _contextMap).evaluate();
278282
} on JSException catch (e) {
279283
if (e.detailedError is EnsembleError) {

0 commit comments

Comments
 (0)