Skip to content

Commit

Permalink
feat!(InteractionOutput): make form field required
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Jan 27, 2024
1 parent 8643ab3 commit f0b4afe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions lib/src/core/implementation/interaction_output.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ class InteractionOutput implements scripting_api.InteractionOutput {
/// payload contained in the [Content] object.
InteractionOutput(
this._content,
this._contentSerdes, [
this._contentSerdes,
this._form,
this._schema,
]) : _data = _content.body;
) : _data = _content.body;

final Content _content;
final Form? _form;

final Form _form;

final DataSchema? _schema;
final Stream<List<int>> _data;

Expand Down Expand Up @@ -76,5 +78,5 @@ class InteractionOutput implements scripting_api.InteractionOutput {
DataSchema? get schema => _schema;

@override
Form? get form => _form;
Form get form => _form;
}
4 changes: 2 additions & 2 deletions test/core/interaction_output_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void main() {
final interactionOutput = InteractionOutput(
content,
contentSerdes,
null,
Form(Uri.parse("http://example.org")),
const DataSchema(),
);

Expand All @@ -54,7 +54,7 @@ void main() {
final interactionOutput = InteractionOutput(
content,
contentSerdes,
null,
Form(Uri.parse("http://example.org")),
const DataSchema(),
);

Expand Down

0 comments on commit f0b4afe

Please sign in to comment.