Skip to content

Commit

Permalink
fix(Form)!: use named parameters for optional fields
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Jan 22, 2022
1 parent 1592a0d commit fef084e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/src/definitions/form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,17 @@ class Form {
/// Creates a new [Form] object.
///
/// An [href] has to be provided. A [contentType] is optional.
Form(this.href, [this.contentType]);
Form(this.href,
{this.contentType,
this.subprotocol,
this.security,
this.scopes,
this.response,
Map<String, dynamic>? additionalFields}) {
if (additionalFields != null) {
this.additionalFields.addAll(additionalFields);
}
}

/// Creates a new [Form] from a [json] object.
Form.fromJson(Map<String, dynamic> json) {
Expand Down

0 comments on commit fef084e

Please sign in to comment.