Skip to content

Commit 6df9d87

Browse files
committed
refactor: replace _ClientAndForm class with Record
1 parent 98cd71d commit 6df9d87

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

lib/src/core/consumed_thing.dart

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class ConsumedThing implements scripting_api.ConsumedThing {
7272
/// [scheme].
7373
bool hasClientFor(String scheme) => servient.hasClientFor(scheme);
7474

75-
_ClientAndForm _getClientFor(
75+
({ProtocolClient client, Form form}) _getClientFor(
7676
List<Form> forms,
7777
OperationType operationType,
7878
_AffordanceType affordanceType,
@@ -117,7 +117,7 @@ class ConsumedThing implements scripting_api.ConsumedThing {
117117
final form =
118118
foundForm.resolveUriVariables(options?.uriVariables) ?? foundForm;
119119

120-
return _ClientAndForm(client, form);
120+
return (client: client, form: form);
121121
}
122122

123123
@override
@@ -423,12 +423,3 @@ class ConsumedThing implements scripting_api.ConsumedThing {
423423
_subscribedEvents.clear();
424424
}
425425
}
426-
427-
/// Private class providing a tuple of a [ProtocolClient] and a [Form].
428-
class _ClientAndForm {
429-
_ClientAndForm(this.client, this.form);
430-
431-
// TODO(JKRhb): Check if this class is actually needed
432-
final ProtocolClient client;
433-
final Form form;
434-
}

0 commit comments

Comments
 (0)