File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -361,8 +361,29 @@ class PredefinedVariableData extends VariableData {
361361class RuntimeVariableData extends VariableData {
362362 /// Creates a new [PredefinedVariableData] .
363363 RuntimeVariableData ({
364+ String ? id,
364365 required super .name,
365366 super .value = '' ,
366367 super .type = VariableType .text,
367- }) : super (id: generateId ());
368+ }) : super (id: id ?? generateId ());
369+
370+ @override
371+ RuntimeVariableData copyWith ({
372+ String ? id,
373+ String ? name,
374+ Object ? value,
375+ VariableType ? type,
376+ bool ? isUsed,
377+ Set <String >? nodes,
378+ }) {
379+ final String ? sanitizedValue = value == null
380+ ? null
381+ : sanitizeValueForVariableType (value, type ?? this .type);
382+ return RuntimeVariableData (
383+ id: id ?? this .id,
384+ name: name ?? this .name,
385+ value: sanitizedValue ?? this .value,
386+ type: type ?? this .type,
387+ );
388+ }
368389}
You can’t perform that action at this time.
0 commit comments