From d50fc60a17a58e0ca7299b0ea75402aeca837bc4 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Thu, 28 Dec 2023 13:56:17 +0100 Subject: [PATCH] fixup! feat: improve DataSchemaValue handling --- lib/src/core/interaction_output.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/core/interaction_output.dart b/lib/src/core/interaction_output.dart index 933959b3..5237a7c8 100644 --- a/lib/src/core/interaction_output.dart +++ b/lib/src/core/interaction_output.dart @@ -34,8 +34,8 @@ class InteractionOutput implements scripting_api.InteractionOutput { bool _dataUsed = false; - // TODO: Name these fields - (bool, Object?) _value = (false, null); + ({bool read, Object? internalValue}) _value = + (read: false, internalValue: null); @override Future arrayBuffer() async { @@ -48,8 +48,8 @@ class InteractionOutput implements scripting_api.InteractionOutput { @override Future value() async { - if (_value.$1) { - return _value.$2; + if (_value.read) { + return _value.internalValue; } final schema = this.schema; @@ -64,7 +64,7 @@ class InteractionOutput implements scripting_api.InteractionOutput { ); _dataUsed = true; - _value = (true, value); + _value = (read: true, internalValue: value); return value; }